diff --git a/.gitignore b/.gitignore index 03883f652e8..90010e3f1bb 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 183f5b46cc1..00000000000 --- 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 a0e8eb8545e..a32ac8471b6 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 f86cec8758d..cd0480dd393 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 3d676816b10..c723e6574b6 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 54d7bacdffc..e3e1cb18020 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 1263da1914f..b72efcbda8c 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 966681fad50..597f785367a 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 0ba8bc54634..3afbba10504 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 1c65e51279b..9640869fb86 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 7a469c43289..4c6a7e27a06 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 34d518d7a2e..63dfba3b427 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 86566ecb795..6a39f578da1 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 9fc452980fa..b7de1f23e6e 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 06b7db3a0c6..76eeb3a4d0e 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 12d2811b497..5bdb22aebda 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 df208e338cc..9fd292d9ec2 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 d0ecdac4722..2bd7d00283f 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 8f93d64af52..cc78fdece5c 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 9e6c9c847cd..c60de7366c4 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 ede80d63605..a6f5ef8e3e6 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 50fb86fc625..d9d8aed8329 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 f9e3b1af868..7033bef14ec 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 c0acff14636..f1ea238487a 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 7b5b47de8cd..70ef3faf4ff 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 dc6b1ba1d21..326129eecfe 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 1c158e3505b..d34633cc1f6 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 d5a99b705af..a1527539a82 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 808533263ce..746b36d0e2b 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 f5f561bb7de..0b1d544d5db 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 ecc18d45742..d51a195571d 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 832b0505996..0c56312196a 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 bf1a881e487..5e7aa9f52dd 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 2b9c2f701fd..2606b016f45 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 7c753312545..7ca28166aa0 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 3387a393045..b2bb90d7c0d 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 1d6398a4b71..1b24a97e3a4 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 71781a1f2c2..36e662b6f6c 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 8e87e7987a7..b8521bac4e9 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 7f76b1f190b..4549dfee9fb 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 27c6841082f..6e564100753 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 9f82e647afc..b23983af6ca 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 8d944a52c42..b0ea6edb1af 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 b8ddcad955e..a08bae90c6e 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 85a2b208b36..e12d87f1a73 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 49367753699..34149253497 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 7ca3d05d0b1..c51bcd95167 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 d736b4142f5..00000000000 --- 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 6353a43cee4..f78b3c3c162 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 657d86065b9..d36b99b1061 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 1e7c6005b30..9e2b79c614c 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 fe27c9a09b1..5c3b2a160c7 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 4f7d66fd770..fd215d7ff98 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 83be5be27e4..016f7046f34 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 9ae5e6cbc96..452a952325f 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 aaee287f927..ed67263b25b 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 ee41aa4013c..325077709fe 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 cd057138533..3a8aa8c675e 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 21a9cbc7c6f..11c4f11eb8a 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 771322e934e..8a93a5504ff 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 580cce9a430..a4181271c6e 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 a4a49f1db8f..a96bb2ec86e 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 9c154e19c1f..b841d9f5b5b 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 1d260cf6444..8957342e40d 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 d2cfd065562..6986835a651 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 fd01e35b793..f2c906ce861 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 eea16b8fbd0..f3837b4d367 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 837bed470c5..583a4ac79d4 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 89c1e2d64b7..8add0f4f22a 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 17e5b13de8e..7beb9c49b7c 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 73783c35c15..4f1dbe4339e 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 31314ab0815..fce6e79ca60 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 f11598f1b66..3b380808afd 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 c89e200f83a..cef4cd93ac6 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 2b596872280..041696af2b5 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 5ed2d7e2ddd..176cb762885 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 45ca5c0e2bf..0ca6a0a0d07 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 9b04f447a6c..4a7ba8655ca 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 a10ec8770f8..3fbb41af67a 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 45ffdf8716d..a70557b2382 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 f192fe72daf..2bb27d078a2 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 e7ece6e2093..2c49ae89f98 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 653a2d75bcb..2d0fcb9a4c2 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 42cd28d2750..f8195fdd061 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 b811363c0d5..50a55599deb 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 aa1e42817e1..051690ccc85 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 6e3682f499a..5726b903e88 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 4da3ae637f7..40c514eb726 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 7894fd54aa2..d0bdb2c9bd8 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 3a1ee6bacbd..e4f5876a2a8 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 c3ccf89e4f5..66a95ff59ca 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 26b0c140564..8415d933ff2 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 ffcaff36743..ae467142055 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 e8614e294a4..b7ba9f0303a 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 10fb4b26f16..d09dc77833d 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 b57e32a10cb..546f82cad73 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 e37a783c867..568bd98695d 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 4dbff23b162..5babd22f298 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 14a51f4d289..a8adc585013 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 4a46affea85..c4315d7da17 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 9004146a72a..12b384b84c7 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 94fc35e2fe8..e982ed81bad 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 4fdc2df4d4f..e5f7ada7289 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 16e31604f82..8d8dd279834 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 37da06830f7..30c9408bf7d 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 e751755d04a..0a29b835981 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 869e3987649..c057351e96c 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 ] [-prefix-install] [-bindir ] [-libdir [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile] [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility] [-accessibility] [-no-stl] [-stl] [-no-sql-] [-sql-] - [-plugin-sql-] [-system-sqlite] [-no-qt3support] [-qt3support] + [-plugin-sql-] [-system-sqlite] [-platform] [-D ] [-I ] [-L ] [-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 ....... Build Qt for - Example values for : x86 ppc x86_64 ppc64 - Multiple -arch arguments can be specified. + -arch ....... Build Qt for . Supported arch values: x86 x86_64. + Only one arch value can be specified. -sdk ......... Build Qt using Apple provided 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 '\' > /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 '\' > /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 '\' > /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 '\' > /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 6037038f53a..e27966e3cd6 100644 Binary files a/configure.exe and b/configure.exe differ diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index cec264337f8..e8709430d6a 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 header. + by including the 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 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. 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 8cae97c972e..ca9bcc6b479 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 9e839edb24a..e745d127d58 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 597210e789c..0a4756f8996 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 d843f834a50..535c4cc8f28 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 46921106b66..d8f9501748e 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 befbde190be..0350f19be42 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 821147fcfdf..f976e74c7da 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 3fdb64b02dd..0d1654c9f09 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 09707f5dfc5..547c7fc50cd 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 cab50c6fe29..c38a7f31412 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 4de1550f182..37f4a40853a 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 c4a2695ad39..2a29de30b72 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 114c22b3d75..b1889155661 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 2d70fa8951b..b817e8a980c 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 18dc47950f0..39d60d5c680 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 f56282967cd..247a76c7647 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 63cbb0e9dc8..f1c15057d4f 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 e4fceecdf58..d6c8b62a88b 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 87942e5a868..3aa119c6d22 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 f3ba3325dd4..e9c62d144ec 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 fbc34e6c54d..e45cc36154a 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 27428704310..730823806b2 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 a8c64f0519a..c96bf5c85cf 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 dbe9f02a402..e3d7c51ef97 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 a638d1272c6..f44914919c3 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 d35ed4c3398..f3f6f40bcd7 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 3a6d4331a72..6e15a92eaa8 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 9fa7fdfc8cd..294ce7850cd 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 94cd3d9ef3f..a3580d6698a 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 92db09d3d7b..8ca40afcf96 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 409b491dd84..95b76cf1815 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 2cb0a1324d1..18afa73de94 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 5a20329251a..090fd74bfc0 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 c7dc0139b72..0db17caa41e 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 32bc547ebe3..a4de05b6a26 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 f72082a1bfa..e8c66a2bb2a 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 285d6a40cb8..05e0e4f516c 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 af82f1bebe6..a42514e08fb 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 07b12f99601..37a8c63c01e 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 53d09361f92..b228fde4114 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 91fb6a2c863..44e69b6e826 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 435f650e9af..372842fa367 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 34060bdb906..461508799cb 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 e852f5e8f3f..9019ba0901e 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 d4a4e6d1d91..6a8d19febe7 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 677353b8c5c..96da41a598f 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 53ca3dbf7ad..d9cda294d69 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 37c8f834f99..9a33bd62ca9 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 166b25af414..3d419ff3aa2 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 d0b39e6d6b2..b893bd325ff 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 e1fd1727fd6..02f6386049b 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 f0d5698d02c..8c7d23c6653 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 8c402ac972d..1e3b12b0049 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 b9693543c15..fa0e3b7568d 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 fc6b7935fd9..7598965652b 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 793b5fc28ce..43b8926b7f1 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 a435cc9ebe9..08d3f6af1f8 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 1a810532481..f3d425392f8 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 7d3c0e6bc34..9cfcedbd62b 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 ae3b18216b7..10a09bef063 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 acee4d65aaf..0a3541fbeef 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 6d2ce7a372a..5cc6e5bd36b 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 b46a286c9ec..4862b3a324b 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 03e3ec6aee4..83e66f34c97 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 c68f6cc9995..f60fdc1ff3a 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 0337431c243..ca6fb20f4de 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 14d07b65ef9..edac9cf48b8 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 13c4117f256..2d1ab6bb9ab 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 bf17427a137..d7396919e2e 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 b8314e330c4..be29e94b70b 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 1a7657d826e..f1b9bebcafe 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 cadd4855731..3a7325b5749 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 8be30377509..a4602c1b6f1 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 7b4563172b1..5b610df3e17 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 5bfe0f85518..68369e4cbf4 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 685bcf8e221..94ef6f4d356 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 c66e9c13696..fdfedc5c3de 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 a2c3590be84..e7533e24cf7 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 a317189443f..ef7764b30cd 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 7e0732475df..3661ea3d63a 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 9e64b0ae5cb..cb952f5c453 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 4c03aac6406..6e009a57a6b 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 49078b66adc..3c9f9daf194 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 378bfcaf477..773047a3c98 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 f3b5e321978..536373684bb 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 194a7339148..ac0c051b9c9 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 b3caa9f2068..05921089a81 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 0c74143b4ea..85822540695 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 2fb7f25089b..67b0ef2946f 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 cbe8f3f5e39..6e501efee3a 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 84908018ea9..e5217782782 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 a21926bb55c..88f5a69662b 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 743a6240c47..9e8bd4ed551 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 4b658483431..aa73931bb65 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 430ce3ce872..9b33a5e6ec1 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 a04243785b4..c0e3236c323 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 dbd672e3290..08973bbe225 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 fdc7ab5d16e..b21dd2ef609 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 4b7c4b74044..04d6f034d73 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 23365f1afb8..6af27d27a65 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 ab03683d2b1..7c55d6f6c1f 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 2ce47e10af4..f379d190122 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 82ff9948e10..67a62a16f2b 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 cd08de4edff..b0d95f30487 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 24a1276dce7..6834482ba2d 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 be47c7dd87c..ee6e9fe4524 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 54920f0d0de..3e8520d9b0f 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 0be40fda852..ea50bda7165 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 1e11732db35..12cc9d42a62 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 815a42a428b..ff9bd1f6625 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 0b5b8079195..6f1b60d958f 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 03b4f27199e..e01aea5511d 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 56ead19ea26..6bce3d49c38 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 7a26ff875b9..cd4ef0a195a 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 a5d810ac976..aaf507c83ce 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 d245398f4ff..bc7ba881627 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 de53ba4a8c8..7c37b9d22d8 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 ef9d1286282..b374d65c7fd 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 c4a6a49bf13..37533eee293 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 16ddb3e01c3..7dda40a3472 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 4f64fa128ff..20887b20b9d 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 0a31ca80cc9..a72ea75f4f8 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 590153b439a..fb7531e91b2 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 e5ce3be8d19..71205338fd3 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 bd5726ca658..249dc60a728 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 1a0f3b57486..7ad6ee45b36 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 55b3804d2d2..2297cc0e9b9 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 fa125f0da9f..973592e71db 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 bd8288f9c96..bec37e12b77 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 7ab56da7fe4..00caf896f66 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 f55a6507bc9..ef25b6f6572 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 12f9756944a..b9c178b339c 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 6838e0a49f8..15dbc7d701c 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 acf9772de9a..e002dd5e27a 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 b433a428147..d22ed0270b6 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 0c496b4bc7b..7c78d21b549 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 280f329ddc6..6f362a6650a 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 04a8bb489fc..d7c1a1d484f 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 c4a29a49a3f..0aacb538e78 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 b6d1fd65239..86507634c84 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 2a9d286a4d0..a23560fe66d 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 554ae2191cb..dc5273b3146 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 85f6b07abc8..a3771779456 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 ae5be0f7072..a5e34f58d4b 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 048df0169c4..5c2cc1922ce 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 7b97156378e..bbac541da96 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 f23c69c9e7a..cb4899dad2c 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 e93886b6940..c13fff32cd0 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 9554842d055..5528c90da0f 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 c9d6438b854..bc2cb6cdd42 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 e912372747f..226041128f2 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 190b175389a..7ccee8fbc06 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 b09f570c515..3d6a8b18dc5 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 5e3eb79ac64..45c306e477f 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 30ba16a34ce..5e8681a3b81 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 aeced47d0a7..5bb6822f6a0 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 a0fcc175439..72b7ca7ab08 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 e66b3efc5aa..23ff4027fae 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 2f4088bd4a5..4b80c68ca91 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 3c02009988b..9f8be4a1b2f 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 b7fae915fe9..2a671e6d9d8 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 00464b290ef..9f10177b555 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 60837fc9d94..aa41ec2161d 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 349ab1815ae..65dfe6bde52 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 721acaefbee..619d87a433e 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 50d5b9c1ead..3f7de678a56 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 e87faf152ad..7c52f05f73b 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 8bcecc99edd..c8648ec8ad7 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 f7ec7951a85..57d8f94c8b4 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 cf1a15831d8..40bf5405322 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 92005b40f1c..83d9acbc261 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 3b009d50571..3bb80b440b6 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 815c9690d35..6a0f5adc564 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 8c35fe17f8c..cce3bf2e535 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 f3ab3b17d69..9a48517d801 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 59729c7e23b..d4bb5e2c41a 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 5258c1972e8..c880c180fd9 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 a82d0d1e082..3af2ae45c16 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 0c8e5874638..b2b64da78e0 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 dbdad0f26ce..004ed920c26 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 76f79e5d475..0ff9a6731b5 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 919d61c3db6..c6c81ade777 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 b192645a0ae..ef4ee624ae4 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 bd81763d95f..bd074dc079e 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 ce4ab2a1f0c..b2be39c69b4 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 e37d2b67bb8..b4fd5cf2ebf 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 1a1171d5422..1e202c4888b 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 fc6d2ba8405..ff31ed8fcd2 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 52bde78187e..6891f57fcc1 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 87da0541e3e..3ee5e0cdd40 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 2b39bf9c5fe..81343fbfe0d 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 86c0b0c75c2..9682c2f7e9b 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 828195e7b80..7d62e072717 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 74c1a8450a2..7117e207dba 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 4caba0d03f2..b4242a99853 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 e654a78ae9d..bf8e0c58b7c 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 de6cc6088aa..1532170699f 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 b42615e9579..dd5c4a9da8f 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 29c320ab05b..75c3fb86f8f 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 15372ecb58c..98c218bc5c5 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 0d0cd1b9e01..35230689e7c 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 3685741f654..dcdcbb1893d 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 e690c3701ec..c625b583d88 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 98bee624da6..261667e6b29 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 96eebd01e04..5c953d59798 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 a5675091860..8fa771c965a 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 9db4ca534a3..a745575eba9 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 old mode 100755 new mode 100644 diff --git a/doc/src/images/dummy_tree.png b/doc/src/images/dummy_tree.png old mode 100755 new mode 100644 diff --git a/doc/src/images/example_model.png b/doc/src/images/example_model.png old mode 100755 new mode 100644 diff --git a/doc/src/images/list_table_tree.png b/doc/src/images/list_table_tree.png old mode 100755 new mode 100644 diff --git a/doc/src/images/modelview-header.png b/doc/src/images/modelview-header.png old mode 100755 new mode 100644 diff --git a/doc/src/images/modelview.png b/doc/src/images/modelview.png old mode 100755 new mode 100644 diff --git a/doc/src/images/qcompleter.png b/doc/src/images/qcompleter.png old mode 100755 new mode 100644 diff --git a/doc/src/images/readonlytable_role.png b/doc/src/images/readonlytable_role.png old mode 100755 new mode 100644 diff --git a/doc/src/images/selection2.png b/doc/src/images/selection2.png old mode 100755 new mode 100644 diff --git a/doc/src/images/standardwidget.png b/doc/src/images/standardwidget.png old mode 100755 new mode 100644 diff --git a/doc/src/images/tree_2_with_algorithm.png b/doc/src/images/tree_2_with_algorithm.png old mode 100755 new mode 100644 diff --git a/doc/src/images/treeview.png b/doc/src/images/treeview.png old mode 100755 new mode 100644 diff --git a/doc/src/images/widgetmapper.png b/doc/src/images/widgetmapper.png old mode 100755 new mode 100644 diff --git a/doc/src/network/files-and-resources/datastreamformat.qdoc b/doc/src/network/files-and-resources/datastreamformat.qdoc index 69f49d892f7..826fc523e02 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 d6e320bf041..8ca19f37035 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 3d0262aa95d..9578a716d2f 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 93ba24815d0..122aa5784bb 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 0bbcd8afb79..3b483b99249 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 afaa4653e7a..2bfe8cb68e8 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 c8d6efbc39f..1dfa03db945 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 2b313c27649..4119e3cb4b5 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 57a219242c4..19466ae89fa 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 783c4c249af..9ac8518b065 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 a5e91087cd3..535db295d25 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 fa300f916bd..2035a06b1df 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 1ebb2159417..a79af2f9acd 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 08e07476958..c124bb3c3a1 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 c834b9ff26d..13016646970 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 ee3c36784fd..972ad53ece9 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 d7bffc02270..478febaed4e 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 a69a7bf772b..1f9d853a88c 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 9dbcb0af45a..1373d4d8d39 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 411c49fb8d1..91f028e4afb 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 8ca57511f74..ba4a0045a55 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 c86f8ace40c..ac35aa436bf 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 1870385de7a..b89b26ad948 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 1abcdc21cc0..b0d1beaff1f 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 1084d238e79..c207f3fec07 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 3c34818662c..49d66b00926 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 cdc2366b570..28c5d542e24 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 f7b8f48f3d6..0ed2e686c57 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 2d5fd97280f..168bd922ce3 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 47db36bb3af..8610fb5b0ed 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 cd92a49eea5..67019f83e59 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 b5a103db0bd..51af3d90388 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 0438105865d..dab3b8930b9 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 81fa3cf2795..f44c194f29d 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 82b1bd3429a..6da868faa87 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 c5128623256..52318ceedad 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 6b5ce6a41d5..1bd7ad1d3f9 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 a9a061e2c71..1482e068857 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 fdacc08c3ab..80fb1787094 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 f3444e273aa..1609b9c0d66 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 4a4953d4522..1b88b022390 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 12462e2d740..bf6108eda9c 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 d0c758e6447..18c0c782712 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 effe3cd561a..98a0b241d80 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 35916eacf1e..e83f4dd4545 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 fd1c819ac05..c34742d3f12 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 dd3405c7251..896c1d40447 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 7100f1a7509..8f1a2c75457 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 f6c3a5ae7d1..35044761a5e 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 9c0c16e14b6..5213857d034 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 4e318467351..7bab18bdd97 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 5413fd2ccff..f79a1446552 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 d69b2ceaddd..a3b9d47f4b3 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 a9383301f58..af6794056f2 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 b965cbeb296..6ac82958276 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 0b727da4613..3bdfaf06a4f 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 56e4f9bcdbf..3da646b4861 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 46cd1b3f3ee..8773372736d 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 a2a6fa96940..dbfd5c72539 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 3faaf2d037d..2e651a1bc1f 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 99b31c93870..b0fd441d036 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 d7b982758b7..a3f3cfd3d41 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 623c526f7be..8c461f453a8 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 31e240ad356..87b40ff5752 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 698c0b652e9..93e3dfd52e4 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 684884f4009..d0ad958e8b0 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 7e106bfb9c2..09cb3efe1e9 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 291e2f4f4ec..505c83a1b86 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 9f12e936fcd..bbf7dbd4716 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 85f3551b62a..702abe15a58 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 d18f1e51656..69a69a321fc 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 c48ce1e6ae6..239c0292df5 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 11f5163f501..5eddbca22a3 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::split(char sep) const' in a separate thread QByteArray bytearray = "hello world"; -QFuture > future = QtConcurrent::run(bytearray, &QByteArray::split), ','); +QFuture > future = QtConcurrent::run(bytearray, &QByteArray::split, ','); ... QList result = future.result(); //! [4] @@ -84,7 +84,7 @@ QList result = future.result(); //! [5] // call 'void QImage::invertPixels(InvertMode mode)' in a separate thread QImage image = ...; -QFuture future = QtConcurrent::run(image, &QImage::invertPixels, QImage::InvertRgba); +QFuture 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 6262cb1a11d..a0bdd9334d7 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 c79a714192c..84ec44ba604 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 74ef79fa873..96b9aa2d893 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 cd9632c8852..2f7b6f9b73b 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 51262f711cb..801f8681952 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 e7a93d4021e..5b611bb6e5d 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 158971e9caa..d873ca43ab9 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 85e00052f79..1e32f83f058 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 1e2a976c77e..5ba01a4d8f5 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 64fb17a7c74..75d5a8fbe65 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 064cf2cf341..17597f51317 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 4cdc54a6c4d..11f9a073461 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 1fb1ccd77d0..bdcfbf9c4de 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 b3483a9b108..8028132ad99 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 18f36da9f45..98d8e37ebd3 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 8f0a5c7ec8a..c63b4052031 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 5919c010854..d39271cccd2 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 0e6c16f6dea..0deb5db7f1c 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 86bad5e825f..9683f2ce578 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 eb913f42313..89ac8add0b9 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 fcfc662f45c..481dc1fe902 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 b6d0e39ab0c..fad0ef7dfee 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 1f5c5acda45..32a7bdd706d 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 ef06fd84b23..2e5b4f4cea6 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 8b1bcbf41df..fd87d6c9265 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 8943e924754..1e4f8b66cc1 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 88cdb545153..7deb859acf1 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 9909b1b6e2f..e56a8fa2143 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 a70c187b7dc..d43a6fed77f 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 7800a4da2d1..b52709c5ce6 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 5163fe54f80..c3619461331 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 9b325a785d3..c0a5f60416f 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 72a15dee2c1..023e0942160 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 2b2422f7de8..fd0dbdeb062 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 49574cb36da..ad940b2edf6 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 11621dcf92c..5e780ad3381 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 4f3d8dda914..9b717249bad 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 3c53394a3bd..56cc1dea5c3 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 59ae1b551c4..ebfeebb891f 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 a6bedb957ed..7c3fc25a760 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 2bfafc81b43..cbb338461a9 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 f580ba1940f..7d939fdd79b 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 674b6f6313e..4d41bf38225 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 13715435f11..2242feb2afb 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 f5c6ec996cf..5025fe6dbcc 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 6b5509aa1a1..dcf916f1f61 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 3a3d0deec0a..d8206da2d53 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 ccb6382723f..4756030f587 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 be28d56eb28..300da70f226 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 701627eb206..935cfdf2322 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 4a43ac0f77d..72361c91694 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 3374995bb2b..9d0e0f2da7c 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 fc46d913d32..b2c05eb478e 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 fe08cea4c91..5e781d770b3 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 84eb1cd1ac7..a3af95082a9 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 bc5d296e07a..f4a042b27f7 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 ef146324370..e8e379575f9 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 ef906d7e7ed..d6a3dfec617 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 7db6e264aeb..196f995a1ed 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 0a8c033a26c..6832a87cc45 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 1fa1717fd64..3668734694e 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 38d17e80334..def46ebdcbf 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 31db87037a6..fe2cf77ef52 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 dc5a77300f3..4ceada7606f 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 cb902e5ed42..5becd28c8a2 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 0d5294be08c..461c8936238 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 defa56a9e26..a7998759bcc 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 fb4178bda05..0224eade125 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 c4cf6749956..ac069815a47 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 492827a9d1f..55765085e17 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 470b1505da1..da56f20fc5b 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 383a8efbb7e..d139507e563 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 9ad042bc82c..b114ec73030 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 0fffc4be40e..498c475add3 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 aed1787984f..f85aa2f53c2 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 7b388433b5f..8abb2c09c18 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 cf6469eaaec..10464ee1fa9 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 cbfdf14cc11..8b69a7adeef 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 f4c64c165fb..c3c44f26ada 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 e44442ba7e1..7379320e4d4 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 4efbac52b9b..903f0d313bc 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 11e021201db..cd5f126639b 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 08973b851d6..39c0b17042e 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 2d9c78f5791..aa48e701253 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 75ada3acd25..e011b841b11 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 a3b90e2c1ed..945111c6b34 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 bef6711da07..233511bc280 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 1277506cd00..87bda3365f2 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 60051798433..d9dd951a409 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 4035ca8e131..a7983b618cc 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 4f5bc37d365..a72139f7fd7 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 bfc613b36eb..0591c01cc83 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 bb0cdde2006..649068719fc 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 a73f65de62e..f36ce640c18 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 dd052d790b9..c8414abf8a0 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 d0627b2b445..1874e836b9b 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 94e6b1bd902..b27b007eff3 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 1672dc7e854..8350170b0d6 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 35da7cd89e0..eb5bedc4d53 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 306b822bdfd..cf706c1a9bd 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 16bdda87993..35e9aa0a695 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 db8edb46f31..99caa909b4b 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 ebaeead9cb2..0a68fd37bb3 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 d142d56a1ab..6cfb9bdf348 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 c2ce61ea35b..383433bd6a2 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 31434f2d966..0334235e02c 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 6822d818aef..d4988023018 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 63dfd6d493a..afc1c79128a 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 da566ed43aa..048ea4404e7 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 b2a9dcf5c73..3cf2d64b91f 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 8674516fbc6..68b2be75927 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 660138d4610..ef52660a36d 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 2eddeea506b..c239d84a11a 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 24b1a359e1b..bf379200dd8 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 e3b537a9c2a..191bb8e4eab 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 b4cd0b65d00..bdb64572d59 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 40fb230c02b..f6471db89be 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 ba65d3f5eae..9cbecace8f2 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 5694d6aab05..5c432cf11e6 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 3be333d22a2..929957ccedd 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 a273f333a58..64068a48a25 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 9e99c4b6760..9ce2566f539 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 8165086d095..299967adbf8 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 feb5219c1a8..9f51f071e43 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 bfc1b54cbd6..7d903aa72ab 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 c878b71b6ca..885268a7ac5 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 2eccd71015f..f022d963adb 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 3bfe1d2aaa0..073f49bf312 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 3a73308e63e..c35ca00916c 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 336a4064b58..9b4bf904faf 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 785d0cfd936..f2e03f04aa5 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 73253f79f17..2d0f69634a9 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 fd1d81769ba..15f7de40f1e 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 5fb45c1f77a..b2c56b2e180 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 0f4a5b8afaa..9242a849fae 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 cda00fa3496..80f24f779a3 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 7b9e1837039..40b11e408a8 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 d465c7013de..4d631217bea 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 f2dd1ccf524..332725a6f3d 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 98eafb42393..a1d24e5c350 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 4b0219d68c8..93c077adf2e 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 099d087dcbf..36c490a2918 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 3dc031c383e..7b29d18cbd5 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 3289344c435..c0bfc3331a1 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 64f8d293df8..25f20ad6ab8 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 d4022d790e9..ff88a52b35d 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 c8ee298c785..17bd6f85367 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 05f907a7e6e..3fdc5d4eb14 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 12e962c970d..6fdc7980c97 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 8ad9deb4ea1..4078b3bd6be 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 5ee24a04d36..8284247cc38 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 4a104ddc339..bcdfb0b5aa5 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 fd1a43bf136..22ac81afaba 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 621d10de0b0..b6047185aa8 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 374f1f2121c..1922563f623 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 7c2e0ac6332..2b6032316ba 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 e70fead992d..3a16253d818 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 327d58f2262..c8818e94c4f 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 8d775bb20ed..2a0b5a62f90 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 01f66bc63c9..90d26f900b8 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 685eb0c3bc3..75da0909dbd 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 af1a3e84dfb..19d103a60d8 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 bd203862c9b..8f5524ef7cf 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 97d58ef32c3..585e8a46c39 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 393674c6f15..2eb9b19edcf 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 8021b80733d..2170f9b17fb 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 9a6e5c2830b..ddc9174d5b7 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 85cf4d7a62d..2f72f128870 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 6dca8b6054c..6be3a5c1109 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 47f00b6b45c..e087831c715 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 679f41e1b4c..c64fce45ee2 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 96fe1afdd59..b15463c9649 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 d415bae034f..24365a30055 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 6ef049ac90d..98c1fc08c2e 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 3bd780ba457..9371700c1fb 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 6825ebfab87..89593484c2c 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 812adf967f2..634412a078c 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 ba1b902a7ae..be378bfd444 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 125dc332a94..4ee70a69ecd 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 312b8bb5455..040afa59daa 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 425a736d289..1cd7afe304c 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 3774c106435..6013fcb16ce 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 2e6b33a6bd1..ea8048070bc 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 b5f1a514641..cf872b1245c 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 50ea67c104b..4316b04324d 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 d49b6e0e192..9e695b83616 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 cb45abf3369..38a9f6a31fc 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 bf04f2befb2..f86fb3b68bb 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 c739a9f499e..c4861f4e9e0 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 96bb9fbbae8..d267a7bb023 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 0d85803dc06..3bf255f6260 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 e49bcf40eef..f25879879ed 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 7cd7a33b76c..45e489d48d6 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 b2e90722f26..d9f6e530246 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 6a87d754210..9d695fdab7c 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 b040f7563ec..18f61f98fa8 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 de9a2d1e04d..b31557c5542 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 10b7531ec42..d820ee330bb 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 0b3f64213ac..6fc87810bc2 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 6556f05bf0c..ed614e13894 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 ede4aa97d25..bf1a2985956 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 2b6cdaaba82..b6e33a8d5b1 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 d0fc9f54dd2..7162da7ba79 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 2c2c0d01a88..f0c2bb6bd2c 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 62d83089d34..d89aa818b6c 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 55800d33f38..b9aede2def4 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 1cf7e5560d1..e64b89b3668 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 2fdde849906..2fce924e872 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 70e638e7afe..c090636b76b 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 c7eb0b59435..43d50cd0d10 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 9d626a3f8d0..1928ddd254a 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 9a41ed84d5d..ed27fc61197 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 02cecb4f879..4d1c3525b2f 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 5d457124b2c..b7cf337aae9 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 3cead763e18..a0a68ff633b 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 b4ff3839cbf..270ae0c18f7 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 8b81db668dd..30e2ec6ce4e 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 ff3ea9053ee..b850dd3e9b5 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 0ee8dbdc56b..99434bb6ce5 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 a545b734bfa..3e14ab0fb1d 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 1ab3488780d..7380923ef4a 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 8e668d17366..542bb0d322a 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 cdce0d545ac..3cbb20240f8 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 a72bab1d0ab..952b3cf9678 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 3e5b520f57c..4b503cac0f9 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 24ed6880019..c54eb1cf09b 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 0ec9c70ed35..ec770953c80 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 f83adeff230..53ff104dd9a 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 0ad98737a92..220e49a12eb 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 4d9103ccc6e..4fd64c53390 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 db030a855b2..a89887d418e 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 974095fe029..5fbf4a450d4 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 a5d097f3fe3..14203b11549 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 35f305570f8..716a37df853 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 095fc2c70ae..15c2b6317b9 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 9de0cea1dfd..2b8308e2ad6 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 0a4ebb5f199..047064d6607 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 8b6982e9e43..b05e0c34557 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 ca415e8be0e..cc38b6a34a4 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 7e72bfacbab..b269d81c57d 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 b609db856c6..997b1c4bd92 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 bbc9e98901e..00c33c286b2 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 b8acbc1e2ad..170c409be7a 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 3d56987b94f..d8e746030ba 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 a64ba2b687d..e6897e98038 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 c3ef7298ddb..69ba6588d7b 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 2c444d504b8..74b45a14ad2 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 e26031f6780..9c505dcd693 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 79a01f56d64..b21d8543691 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 68cff32ad5b..49f2a420433 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 a7e8277321a..6db7b462b4b 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 497540e0549..5f83bb3d61d 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 2b9acd2d3fa..8facf78ac70 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 989a5ef0755..31753dc5df8 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 38d6d282928..c8024afa107 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 4f82399699c..b8a270d198b 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 2e7deff168a..80dbe5d13a0 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 8d2b7feaccb..fb81e4ce796 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 2cbe1804be2..ef34d5ef55b 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 1cd2bde1bd4..765a48add8a 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 981e007b8de..aba6cc6be80 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 a8f53a738cf..2807421a7cd 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 49b69055c55..20dfd5d5a69 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 3706387d249..e2699b1570d 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 19a8b4d5cd7..a7cdc4eab0e 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 0671181f5f4..d5eb2cb9a28 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 b72eb02e4c0..b0d72698b12 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 6f76c57b41f..32d92f47d7f 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 505c431f6d1..692659f72aa 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 4f428c7f5b9..c40b6896ecf 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 cf03a46bc26..f905d12dc4d 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 23ab71b4859..18ed908f54f 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 8de7f7941ff..7dbdc7ecf6a 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 252720bc14e..421f0b8ec3c 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 8c267455e5e..eb0f582022b 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 735dbe55cea..9db45bf4321 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 6e40492c297..786218557c7 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 94e98b34008..9f05db4fc16 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 649a47bb16b..f307a49b6a0 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 bcbfce72b89..40e0c879164 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 19a7469c8f1..14cb03cfe5d 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 c432f4c8cd7..df6a360c94b 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 1e3b7c2a89f..7b5a9ac3d5e 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 3b28700ac38..01f55b667a9 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 5661757c9cf..f922e4f1b4c 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 9826208b38b..a85c6b8a5ca 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 b652069d685..67c67c795d2 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 015ab27387b..0481e255e1a 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 b1e3d74094c..87ff6ec7929 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 608fa3e62f8..9e0f6694f4d 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 2d7defc02c4..1038f9031a6 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 c6d39638072..b12baeef46f 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 a6ea3cb5d34..41171678bf4 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 e2a2f61ab17..95d32d7cf5f 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 fe9ef5cbe98..21aebcdb406 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 5047d0840d9..2e98f8f14e5 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 5d9994d63e2..5eeed234c51 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 be2cc5097f4..278905717c7 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 e5a9bf5c5a8..1aaf4765495 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 0e0e5cadd78..f0cc3212fe2 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 0be443c89e4..6b702668c1b 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 53b3e6fc15b..0de065631f3 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 d75e2cac2a2..09c067aef91 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 5ac15b9f397..0278f585b62 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 b0bfe1358bc..cd37688b1a0 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 316893edc48..e9069c18122 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 6d6fea7d1e6..6db1863d9a3 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 603650bc4b6..0f385db3438 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 ce6a7737769..7cf82b2b527 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 58622151b74..54decc12a63 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 91485a088f7..7a9d2e887eb 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 473d7e8da5f..eedd5a45773 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 1f600b98149..b971625b922 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 534da3e2bdf..2b61d55025e 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 4d1c79cc9ac..81b7becd44b 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 865321d4ad9..1ffec414b1f 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 394d5372934..ae5a4fed56d 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 3b705de973c..a47f8e9be66 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 8375587ce89..aa48a24225b 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 f3f65b67eb2..c3082c3cb5e 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 a90c01447aa..b09e07a5bc3 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 54f8c05e397..d332a45c9f7 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 f2b29c9d5b9..9938d097fe1 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 973abef07e0..2abc88cdef7 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 55dbd39ec1e..df8134c1691 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 55068c6a674..ed037edd1d4 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 5f6c4258272..298a0e3d13f 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 79368108122..f6ec6e42e89 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 208acd04fc2..d5d46aed995 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 51fa00d8598..e45368b9bb2 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 a5aba4549a9..50768728230 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 891254e0697..0efaa8ae24b 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 af7144be2c3..6563f9d6600 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 51edda6e63e..20350b3669c 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 0d422ab1d2b..2584aee8144 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 abd621df43c..4df7911dfa0 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 791b33eb2ec..17d18165573 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 ca1a052c396..18a4fa3b46f 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 208d346c5cd..c134a7ec7f2 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 3077dffb121..f7d9a02610e 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 cefb3a81acc..6e99d435177 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 d1bd9e42d1a..57de48795e2 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 e3d1f889268..a3a73a1d9a3 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 8b474579c2c..28c13dff8da 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 eeebbef283f..06f606af9e4 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 c7e230e3d2a..732c480cb88 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 429d6564853..3cfc74e0cdb 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 4ddf59e6a00..b614b78b7f0 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 71e3512fc34..75d53b3755f 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 4141671eb0d..d3fa73bceea 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 6811a27e883..26b041a65ca 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 222c3d029fc..eeb1bb690a5 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 d274ca3bde5..50a3a5e29f7 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 198b27101f3..1ed5a18a9d1 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 6fdc47ca205..cac02373939 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 81632a50a09..677d09a214c 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 0514776b755..19160e38432 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 be75bd1995c..d584d69ff87 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 f6fced9e975..b8ed147d9ee 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 426dedfbd4b..a623ea87229 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 9a8a5751118..c6b8a303437 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 593c8dfe8d0..69d699cb16f 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 aace3b502bb..890037a2699 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 db509380160..312733befdc 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 4f322cbd571..3ef2b4b5b40 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 2c8a5a2884f..0454751293f 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 852b63de367..cb334a27782 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 eb81c6604b7..f42e84f47cd 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 e2653361a11..050fd7713fc 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 1c62c8597e4..a249752c4a0 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 8c9bacfa384..9318797b6ca 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 a5ec24dabf6..2d3cd409732 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 4e174864391..5cda1a04a62 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 bf54e630a8a..6db508099b9 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 f16afd31215..696b2d3ce0d 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 cc05972f023..31ddd076ab1 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 532517394bb..1632e50adc3 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 33ba0f7a3ad..c52d0007d83 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 c7d7b6d2a80..999aa92d8d8 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 553e6e10cc0..a362b587740 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 2558ceb29fe..228204b755b 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 ea472506ded..c81204a7769 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 8db1b4f4206..2cfbecae790 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 40bb0323696..9890af53b60 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 532517394bb..1632e50adc3 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 67aaf571bc5..0d27e506046 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 a7c0ad392c6..96e537692ad 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 1b53f11bbcd..a1614e0c322 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 d42db25d105..497302b03b8 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 3db41d7770b..0b465ba2ec9 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 4ced1f5a9c4..9ef035ff871 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 c31779fed0d..7092e69f5d0 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 df68f6125bf..fec64c12074 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 e1e6ae4bece..094f04ca8cd 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 e7e3774c174..3d51fc49886 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 1303d9e218a..ba7baf41ffa 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 3fe172e2b7b..2f20ac7b4b4 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 c91edd3056b..ae0372bc8ba 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 c2930f75136..58fdcfdf027 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 683682ae522..6486c4076a1 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 03e0508575c..0caddb3f604 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 64039ae44fa..d4d69ad52ff 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 c2833ae07f2..377754b00ec 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 8609c0fa08a..14055e70257 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 d0f071440db..04af2dad590 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 3835daff868..48873dc447d 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 3b7b8c1c454..46fca2f01de 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 84949dd0753..9af22310347 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 ef35b3d0f37..4c1713407a0 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 6edaa065948..115d8eb72d4 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 0727bc2894a..b32fc96ae4c 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 b54c1293d19..d93e7b6f675 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 f2079f511bf..218d30316c3 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 d0515399d48..44f0a32f300 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 4dbb446e180..66aeead2d01 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 a1599145dec..e0ac2a9fd4f 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 432c0464445..ad10764bd7d 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 59e59ac720d..0e2434083ca 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 3dd37e368bf..5f772efb4ae 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 a97c20880b8..16daf857fc4 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 aa1151c0a99..05794921334 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 cb3e55fb63b..5fc8f658809 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 b4f898d89bf..e6c802fa7f3 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 11b6f50a0e3..d67a6a42f95 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 879b16d21e0..44b96a7c97f 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 e38946a8ff8..f99be2f4009 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 6ae1e15df56..1cc71beae99 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 5e3ef97694b..5ad9a20414c 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 7a788dfa479..9d7ee8adb1f 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 f41dbcdf932..252cce03046 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 7a80b92a8ab..b4f92005cd2 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 9eb5dfac0b5..a4f71d29a1b 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 55bf7c3d7cf..5662eb957a5 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 5287c998a31..dbf926c3864 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 89391a13132..8f9492b25ae 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 4d0a121337a..ce90a00ddff 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 c3cac7bf45c..ebacac47521 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 9c2259d4d08..ca30e80f88d 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 191470207e3..0e6034afb87 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 f4cb2a8f615..4e5313b56cc 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 8f57cb88a63..b053135791f 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 dd5ddb57d9f..ae973b7cc84 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 37ebb3a7cd1..a4de61ec0de 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 44b377ab891..726fd677e4e 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 787121e9e75..a1c0e52bf0e 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 ae2ecb4bde9..a3b14512146 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 60341948ab3..52c332b5a92 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 800213e442e..cbdb669ce65 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 283ce976605..e0f7aec6687 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 181cd56427d..ccbed762b05 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 967ade0c73f..468304a3d33 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 cee2596a61b..897af3ca567 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 2cc789c292c..496edbb1e05 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 10410f46696..d12d8afe787 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 f981b0f4dba..dbd7f9826dd 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 00771a5818a..58e24134a5c 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 af367b96c2a..cbf9206b799 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 2fbe1f139fa..19e13f532b0 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 27d84b52bc0..72dbf62ddf5 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 61e67b1a632..2289b43a60d 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 83d6d8eab8b..f66694f5ca6 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 3c9fed7ec7f..5a99999c019 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 5099653b71e..933a2b557b5 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 69063a56725..3769f0aeeb6 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 dfe84326313..a2c126be1c2 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 0c707a172b0..60433f6d5bf 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 3195d3297c6..6b32e06d953 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 9f862813176..28c8ead9a7b 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 c0beb9ea8cb..853679ff200 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 2b97abacd82..e46a672920d 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 45b5c188a22..eb6e4f88c47 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 999c355f252..c39428b4569 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 c1b43f07c73..b39ca5ac9aa 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 ac70a233167..d8855efefe9 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 e2a2eaa0bcd..0bacb16874f 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 64ba5c3e59e..63729c9958a 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 f2de58a1c1e..d1ea143957e 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 old mode 100755 new mode 100644 diff --git a/examples/embedded/styleexample/files/remove.png b/examples/embedded/styleexample/files/remove.png old mode 100755 new mode 100644 diff --git a/examples/embedded/styleexample/main.cpp b/examples/embedded/styleexample/main.cpp index d3c228a59e8..4a2c2f001e6 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 7bac8a84d78..9d499c2f2ca 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 11fa5348de7..7ecf4ac13bf 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 e12cb413631..d7f299285b9 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 1ee7d02224e..dd09a7b874a 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 4097a2fb312..78806777f85 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 329cfe3bfdb..e973dbcc78d 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 066b1ee6803..ea6a82cc9d1 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 d19dd38f748..575209583fd 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 0b1a10dd509..1d4ce5cb3eb 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 3d83d4cd88e..f51ee280de2 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 5edd1304036..296120fd40b 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 17a456e240a..33016be62ff 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 4efa1ecd3af..dbfcb33adcf 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 faf36016068..b0491b7d410 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 31acc4224ad..0016c261c7b 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 a9f1bcbefba..22ade01ecfe 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 462f9674f49..d00c63d566b 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 aeac2c2fedf..adadab8c58b 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 e12132b4cd8..5b501f573c0 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 fa3a964c222..e81a0268173 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 b712efe38b8..88e946b359e 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 f9c5dbcaa9c..751dbd8aa98 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 f023938b7b1..d10437d05f8 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 abaeeb97bc7..5e78ff287ce 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 e7dced71d24..42b8d331cbe 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 170ec3abef6..84d62af8b20 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 d24116578c9..226363de0bc 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 81ef8ae7d50..8cac5562a50 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 576c522bbbc..ad63ccb3a3f 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 10ab38a54c1..b591891c191 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 50580437076..b3d452d161e 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 e4e7c589d39..12f6abe0428 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 39cd0fcafda..bbe4f896e1d 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 357f955bb66..e79093df0eb 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 1bb864ce900..95d4a63cab7 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 cc3d5ade34d..ac0f41c9696 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 19950b252c6..4ce1411f5f0 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 b47069b20c7..e7978cdfeaa 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 460969451bb..fc57633004c 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 e983e4cca6b..d82a34cb2bd 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 a8f4675c132..c504a108c8c 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 a5ea9402d78..01bd3a1587f 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 072dafaed46..1169b30421b 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 7c587d4147f..2c3d6439760 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 5bba2756ce4..c3db8387464 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 4e89454f8d8..f5ad94bfefd 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 430e741d5bb..c85e351f44e 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 34142ff71b1..6ba8e8282ec 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 cc6ff9732d7..b6e2c503b45 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 31c9627f9ab..3b67346cca9 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 44a8b6dad56..96de11e8657 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 4ce5c68841d..c7ff12552f5 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 4ebe1d2a712..dfa9bd197f6 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 f8858f1f517..ddbd754489a 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 5e3505f6f00..3a4d6d9911e 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 bab04ef1aa0..d1d8445aa2b 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 edf7d3c3f30..382f47ba993 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 ad76395a699..3986e417257 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 24b8491a6b5..137faf7497c 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 e5874f910dc..72182420aa8 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 c90aef05993..ca68a17157d 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 df585a948fd..e073a85791d 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 e65f39426b8..60808a4df7d 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 652ab737fce..0431ff600c2 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 8f73edd7878..dfd6dd7c404 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 6c54ca23815..50dcf3348c0 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 354967bdd20..b65a2136855 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 1c04057d1e4..0aa551d4e5f 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 076d8232a1f..de8d31058a4 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 53af7182d0d..d2f3e7471b8 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 13f5f654c2b..cc1ec060904 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 0ac7c7afe49..d2762987095 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 f608fc55589..40ed950fd13 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 1c7051fac95..4098597577d 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 0dc61a49301..e70819efcc2 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 cb0ca1b2ded..2b261112231 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 67c3315736f..a1adc2e2a69 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 88bbb79d4c0..915eb479ca8 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 35bd931d39f..2ab4f5f515d 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 7697d708427..9a0d4d20f43 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 78f8281afdb..e59a0c776d2 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 0114b43a75b..ef3a1cbfda0 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 4cdf71c8e60..5f3eedb0f16 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 b714ebfb71c..7b7d7b632f7 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 0fcfde931f3..73dae93529f 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 0103de47fef..f32c8848844 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 a7d014f12a6..7bdf186533d 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 ee3b38c1a99..52a4ca9aa9c 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 4d0b58a824e..404880c1724 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 a909552f6ab..5536e2ea033 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 e87756b664d..30ac6487b96 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 e637cce3c9a..1236662bcaa 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 30dc482a4ac..c0532d8ad20 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 557ca3add0e..f56167009a6 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 ebae3fdd23c..afca00ca046 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 684c81fc92b..2d09bf53bbe 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 5f00ba4d2de..cd9203d469b 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 fd7535ed133..5a4fa752350 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 ff9eacbaec3..26677a94460 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 279c1c00476..6cda2b22f67 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 c5baddd1ea6..0352abe39c5 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 d274cfba09b..7d4e5b886d2 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 d9d3f46fed5..7d4d752a523 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 9442a3da7d3..28dac9dee38 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 0a0ccb7ac8b..f5dc9901371 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 0a08b726bb0..dec4d266f63 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 4f925dd1e49..436565b12d3 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 3a720f6cb45..01edd245751 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 b849c9d62d6..ad9afc25c2e 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 19612eb809c..536d2a4b4ef 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 2c30056766c..e398e5a3e0d 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 8f8a2a72058..7fa67ac71de 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 08bdc040090..c1d62b643ce 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 92b50083848..9810d03eddf 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 936654097f4..8d5f4ec9094 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 b98057e2e33..84814dae12d 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 4d45f1e4be8..c432bdbdd7d 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 ff6306e9eaa..04512f6d738 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 7afb3e51e6f..b0bc0d79934 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 ee540c603cc..0b1631c858f 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 2fdc23bb5e9..bf97dca4122 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 bbb1d25933c..e70150e37c4 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 aa7e9377b5d..194168ee0d0 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 5aad0c21b98..53b06ba6e57 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 41e756d8ad5..3cbf4b58805 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 8721a6a8e66..490b993e319 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 e890ce0edae..52625665010 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 34be2f682bf..458198740c4 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 358546350c8..99677e1ccd3 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 7ab7d590c28..8d081c0f6b9 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 95b5f581d76..8e640c0bc8f 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 15baffc2c64..6225d84d705 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 dbb5b7ae8cc..b76eca55665 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 5a2cc77465e..ced44b979c3 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 3080684e4f9..1754a291201 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 3dc8291d264..6608f48251e 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 00446aa89ba..34f3e881b87 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 7a54ce4f265..065c7483324 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 34168137faf..52e0b56c3f6 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 549a437012b..9c7af52d062 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 727c658a3d9..272742c27a4 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 9f0898eb8e2..6cd2094f57f 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 aedfd9f8d3c..027c8bd3d1a 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 676a4ae1a83..30c000edc95 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 f726caedcf9..5cbd6c3ea32 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 f76575a86d1..2d2e16cd3be 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 8ba8d17aa70..f9129898de1 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 f6aa489d053..947387e20d3 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 b9656c61851..83ea0ff1c80 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 60316157117..03cd7de036c 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 f0ae556ce3e..2389346a671 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 d0e315978bb..fdbe81cd02a 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 158f31dc0be..d71c0dafcbc 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 e7f45e3f42c..89a7f9e665f 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 15bd60e1b46..2e77fb94bb5 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 5dc2a908dbc..78a294dcc95 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 2260553cbb0..e92be749272 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 3ff73b53e5f..9ba8c85c76a 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 60341948ab3..52c332b5a92 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 5142de1cb2e..57b46fe266d 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 e242adb1735..a4b888d2702 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 4c53648210f..ddb6c062cd0 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 40079fe1c1d..5549a795d19 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 604c73d8f02..ee1ac78e294 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 2cc789c292c..496edbb1e05 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 ed266c71a1d..56bae8e7c24 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 0348218d320..b0acb21667f 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 2a04f7a840e..1593e1ec97d 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 0b91a115a68..f643c54aa5c 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 74a14b0f8c2..03cc08d21b7 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 11517c124b9..237f7b27cc6 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 6a0e6e5239e..eca751cfc44 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 1cca36328f3..338d5b4e19c 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 ac310e82263..5ade6aa7fba 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 a220a7d8bcf..43fd66391b7 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 de5b6f8d6ed..3551958e106 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 6d1adb6b17a..12d349a87b8 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 41e756d8ad5..3cbf4b58805 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 c3331b689d3..726c6f4a11a 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 57d191e1442..f993ee90080 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 ecc4f3eb3b1..8a689211e76 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 c7b2e7f1563..772b69f1c30 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 e078d7f2df5..1ef5bcb1d60 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 19bb3791246..ea94d89f45e 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 0962e28844a..501ef85509c 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 358aee008a2..641d6fd0c24 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 d3e57a5f4fc..f18f6543455 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 386a469c991..8877db98d4b 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 59f340ae3de..902f66af51a 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 7987f35499d..9d8b28637ab 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 74a1967a8ae..0429f9da358 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 c7764ea1deb..cc36f69841a 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 78245d005b9..838cf0ff5de 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 687ae0da2d9..16d43aa87f9 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 0e2a946c28f..37118f870f5 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 6a9092c058c..46ebe934252 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 9dfc503124b..a0bf1d18399 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 c77a40b3236..7ac80f32d4b 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 68b747b94c7..f685b77db4d 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 517cb7b2021..393087ebf9e 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 91ae01cb0d7..3814efe9f80 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 340740630b3..9f45ba6721f 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 767cf0f1686..30de9c1f587 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 c83ce0e4769..e8cee5b9bba 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 d59c33a38b3..ba6e868734a 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 f2079f511bf..218d30316c3 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 7501a7296c3..40e20b425fa 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 598bc0a3f70..cd4ca9bbbed 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 6e4f1efebca..4ee125d6249 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 f40d160363d..9c9a0f64adf 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 03ac9ad84c0..397075ff3ba 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 ddca09b71b7..54f3a29a44c 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 b54fc67b710..e30f9f1235c 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 f2079f511bf..218d30316c3 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 50782b98228..1d4521d934f 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 4b57f47be32..b7b650fb7b2 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 12e41474bf8..c742c5cdc04 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 f0c77dbf705..1418c89039d 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 23f62b2ebf2..8ca629a9142 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 9e141904cd0..e33687b5c98 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 3908c335b98..ad3c9c6039b 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 5d3e4d75a45..e9cfda8bccb 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 b2f21319271..231e32c65d8 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 337b7aa8c41..f33d16bfaf2 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 8febe1eb4ce..42432baf665 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 74ddc18b592..8ec0931ed8f 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 45073199e54..2dfe44617ba 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 9a9dc9ca76c..ac90a5481ba 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 fd8fa97e68a..6478146d265 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 9d40d300266..d7527f92f2a 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 5c846a4dada..4edb8702370 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 8ac897455f9..f55e29a27a7 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 6ac8ff3883e..b39dee2d8cb 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 6be34654ab5..14d3d6484c2 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 4ad0134ec71..db212aa3ee5 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 c984d803973..9b3c721d05e 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 dd16fddbe7c..db0f5dab455 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 555f1c6cd4d..7596446ae55 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 71cff13cb83..de58a59310d 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 15ee5bd927e..7a8dd22c7cd 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 aa01ffa1312..25d1e198ae4 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 1176ee54803..25a1468bc19 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 5b982ee73b4..83429d4b3fb 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 1a10a196199..ae1b9ebc19c 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 816c8094da5..84e2eee3ac4 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 906dee9bcac..0dcff1c9f9e 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 0b55ee52235..bfa0c4777f0 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 e136d7f9aee..9fc99da9186 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 01c8adae532..bfe61dcd01f 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 2a1c3da71d4..65d020de0b9 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 58b33fa2574..8230f2e8148 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 3bbf0137c1a..bf1c4c1303f 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 4a8011d64aa..71523d425fe 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 8c41502bf1e..07b106fa960 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 0fb8a0388d8..319c9b91fb1 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 7ae426d68ce..676e84d5ab9 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 c8ca63f38b4..b08c5dd8061 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 a543c937c62..d0d406da5ea 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 c4199d6230b..41672344c7e 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 cc6d918ee7a..eb073024330 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 eed3660ca0a..c827e393b1f 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 4b149930823..21488ab0a6c 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 8867e256788..2961f794980 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 99b97f13c5d..ba564d93115 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 ad3688bc5a2..41b1a9187ae 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 3f4ca25c86b..3e426fa7bb2 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 b67464089b7..d2eaf7a05af 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 748f4b5de1a..7b451e0192f 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 6a49046c91b..e9dec57452c 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 7a282d22530..a415c83cdae 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 7c70255aec3..e6109029757 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 33b34a4a4c5..9ddca66604b 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 666269f38e7..55bc7f2672d 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 1b7e54ba11a..22d3b1db13e 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 d58ffdf99d3..30f982e42ed 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 98e72b0f4c8..389982835ea 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 ed738472f76..cb1c015b840 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 0303752b4b0..cb986bd4899 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 3d2be5565a5..d42c357419d 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 27443659df5..1c5f1acf813 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 f4a76c4dc24..1573580ddad 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 f6c459ee90e..3678daece83 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 6c0e9ee9f3d..77e3efa0090 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 9ce6b650e0b..e73c97b1494 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 a04dfa9e71d..68402cad428 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 ed9ff6a20e9..ad8c94353de 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 6b4abff5d9b..b5787c8adca 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 f20e8f6c0e7..2f51df138b9 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 cf22fd1369b..00960d488e0 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 5ffcbc8614a..30dfae1c793 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 082dc910ca2..15492daff4c 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 0ec87af48a5..01d7ca1cd24 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 ae20f6f41cf..e66d2ea1fad 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 34fc999dcca..b7d970b5efe 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 8261b2279a0..0b55f7cd42a 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 03ac9ad84c0..397075ff3ba 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 041163178d5..b14e2229508 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 8db3042a4ed..767aef52c2b 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 fd1a67377fe..9a5796cd386 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 56e35c9540f..163dfcb655c 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 6172f070637..842f97579bf 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 75ce4c93eab..ebcbdd3bd3d 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 9ad042e05f3..732f43626a7 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 258206a9055..2007acac2c8 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 d9f594e8ac3..f80b3783eff 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 317fef36a89..9227b894a88 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 9171d1fc5f1..e02186fb855 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 5db5cc59e85..126ad536740 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 94a4dacae85..05afc004da7 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 a0374e7e7e9..d774ce41589 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 a061bbbb536..b100d196520 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 4a3a28298aa..f27cfa3894b 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 0d88c873daf..8222bd3c50a 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 f12a6a1d479..0496cbb2420 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 b598ab88296..00000000000 --- a/examples/network/qftp/ftp.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - images/cdtoparent.png - images/dir.png - images/file.png - - diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp deleted file mode 100644 index ba568d6ec0a..00000000000 --- 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 -#include - -#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(""))); - 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 f060bfc0cee..00000000000 --- 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 -#include -#include - -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 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 24b61808290..00000000000 Binary files a/examples/network/qftp/images/cdtoparent.png and /dev/null differ diff --git a/examples/network/qftp/images/dir.png b/examples/network/qftp/images/dir.png deleted file mode 100644 index 0ce5ae75fcf..00000000000 Binary files a/examples/network/qftp/images/dir.png and /dev/null differ diff --git a/examples/network/qftp/images/file.png b/examples/network/qftp/images/file.png deleted file mode 100644 index be6c53089ab..00000000000 Binary files a/examples/network/qftp/images/file.png and /dev/null differ diff --git a/examples/network/qftp/main.cpp b/examples/network/qftp/main.cpp deleted file mode 100644 index 15689b5a552..00000000000 --- 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 -#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 6149fe96df4..00000000000 --- 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 c554b37a033..00000000000 --- 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 9c9ffdeb4ca..a3976dac166 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 cc5cc34e8a1..3c54e2c2293 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 c15534b523a..349752d0cee 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 8d862c4c563..8527337e1b1 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 4e0bc1891fa..5c1317f131c 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 2340a6bc5a6..94a0c657e39 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 19a6fc2f477..1fdc4b21a0e 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 7179ba51e89..9363497f76c 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 785a72e27e8..8d1a6ed1514 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 e9878e06d79..18c8f1f25ad 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 1d6f5608d8f..b3b8a20ae47 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 0bf75aa18c2..1174b7e8270 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 c78535a309b..5e473df15e6 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 09aa48c354d..649296bdb23 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 edb04c6d6be..cccaede179e 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 de8b8ffd93d..6e137a62e36 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 889933ea839..7c55c1f6a2f 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 ef38507e458..90ce2841ec2 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 b4dfb25bcad..bcb53f26850 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 cf1a0f706b8..cd59b57f9d0 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 1023ae85a72..eaa637699bb 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 3d264eb272c..56a56ee1645 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 0d42c91ce44..12d9a4fea04 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 ba55ebace61..15efe7c30fa 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 afa824d74bc..39c8e17e08e 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 0d9580eeffa..fa51343db63 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 b8f8cb56e53..96d5c497707 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 47cf177ccbc..af497a44370 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 4949abb6412..20b7df46647 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 3df1bb886fe..46f44a853b3 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 7978e8e1f42..75bef55924c 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 7a9ff679729..ecc7ba098c2 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 2622384cfd4..fd939ae641f 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 0b9a5815c9c..43c60ac9bd7 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 +#include 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 de63a8f87fa..723b3aa4b7b 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 #include #include -#include +#include +#include +#include #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 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 800e947385e..318801db4bd 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 c012960f310..a395f8ac505 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 dc18c60a4be..b8484e9c612 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 380399fa500..ce74f27a702 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 aedfd9f8d3c..027c8bd3d1a 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 35eedae240a..0c682de8760 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 7a67aaf1bf0..d2c15342718 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 0186670f38f..29341d2a4e9 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 0f983d20ac0..f6f1700fdbc 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 c05dde56f84..3c5fe4fe8ce 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 e071ef6202d..ddb34fb3d30 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 ef6efdc4dcd..bdf1a7161f2 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 c095888f98a..60bef9e54e5 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 eb509d0d40e..90c1bd11cc9 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 7a5adf904d2..eb857971333 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 ccb46a3b83c..6cfceb84985 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 313e683da52..4c0b8420deb 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 52d0b2662a4..60974571bdb 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 f86d5d06d62..5f3981f8ae3 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 923c1f85149..18ff1806906 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 965c49ab1a6..7d0fdefa0cb 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 044d2a8dd71..48fc11f8b85 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 38333d85608..c30f4b7a007 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 1f12b11e324..877afa90f31 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 cc14a70bcc4..073d9e108d1 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 9f7d6be68b0..52f8a85143e 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 0ac3d64ee4a..90f26e0f38a 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 407cb533541..e8e00f53d49 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 f1f1f2ae183..bbcfc370d52 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 1b42a48fe18..a18db04e6ed 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 6db14e32bdd..bac2eea09b4 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 21f5add43e3..211a127e0bc 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 a22fbdacb88..fcff502d390 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 44b78d6120a..a23bee5c7ed 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 5693d7ad558..5148dd5ecc9 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 cd253fcd19a..4e0f7e570c4 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 a0a6adfc3ca..f7276a66c6d 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 742de251f4b..f02ce91e2ed 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 b257cef20f0..e88719348f9 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 36cbc414dd7..fa2309dc8bb 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 bb6d2b80706..228d6e1bf02 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 025e92bc00b..aaf9ff5af7c 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 4572e69644e..9a426db8b08 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 178fdf7fe54..7e68a3bc754 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 fd9b206b69d..c38793242bf 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 c672798558e..2d9a5ec6751 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 78539d7ff17..e3dda43d3e5 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 28e06ec4df1..8215fe0f4c7 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 631595a2d79..b5bd2feff62 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 5c985a3782a..bb870961d4b 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 f6f89e5a0ed..3272762bc61 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 7a8244f4f9c..651053eabaa 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 aac6d1939c7..0e0a133f44c 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 53b1c5f95ba..8d91e46f51b 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 515d5b44fce..2ca16ed4006 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 573b7f2cda5..25d80d56ce2 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 537dbd9bba7..615f026fcf3 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 1d9b7b54a19..d4f289a3ec2 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 c9405413274..67f9c922208 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 93b92809e01..afdf565fc0d 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 4c16ec1c4e0..070089e8125 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 4e74cf9d1d9..87252df2df8 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 86dc8891077..6f324048d9d 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 b477e7b05b2..4cfb015b5cf 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 16f402efabe..5c0789b4fed 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 571fae47bcc..71aee4b2c2b 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 19758938f88..8edd4971874 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 43f8ce4da1b..d6a3e972ead 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 0cf837cbdd5..cf0b26d885a 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 66627421666..e99c121588e 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 87e6c187d3e..a8b78f084f6 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 02e9b268f5f..f440a50d4b2 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 949f4c8179c..ce61e9a701f 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 2f939fb741d..18aae56053b 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 e376d907334..437dfaa512f 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 73d49bf227d..c63ffe3c158 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 3c6a16aaf54..6d4a2c3fdc4 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 1ffab639444..9ed2cd7929d 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 e8f583d643f..7276667d69e 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 f2079f511bf..218d30316c3 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 c4c5ed8e08a..c0949f01dc4 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 b5cc7d9a97e..253030fb926 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 c49117a2f2a..562176ba479 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 f80ef2b8bec..ecf14563e9c 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 73a1955082c..cfc5afe626e 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 01c8adae532..bfe61dcd01f 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 ad0ce55ede6..bd9f38554be 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 1b66c3c3703..9abd4818271 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 338d8ebabd1..13411bb4ac6 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 3277c4b21d8..45fa269c865 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 1d2f0d57750..ef0a010280c 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 fee4f2a3382..f206d1eeda5 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 2248ba3033d..601542b5b62 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 e70fa5fae90..1c530d1e353 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 f2079f511bf..218d30316c3 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 9bff70bb411..8f3ae8bd312 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 2c50ecb353c..b274cbf32a4 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 641d3597ede..c278f367c1e 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 b95cd93851f..467b11b0b93 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 b357f993367..b8954382039 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 02c35f77219..70baaaa0f0f 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 72b897a9948..19b6d95c818 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 432b8b34e50..a371e1187c4 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 32c7fad970c..2a1eec2c447 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 6a0183288c6..c9b1faa3fd1 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 dc8f92505d3..4c6443696ca 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 36c24186d3d..e60f096e8ce 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 af755a2a507..e131aeee553 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 f2079f511bf..218d30316c3 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 04a6eb511fc..07dfffaf230 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 039430d9a35..00d0f04954c 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 24d0a6f5cef..aab27508365 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 b7cd575a81c..da76e9743d4 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 033fed35cb7..0a3d16e9010 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 96d3fb0313e..e1464ed4cf1 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 5e2a06f9231..f29172039b4 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 3a8cef79910..eb87b114f61 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 8953832b82c..e5c65b3f243 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 140af3c0537..f884009dc3b 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 ba85b14f87c..d99a19dae27 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 9edb4e349fd..a87ab8621a3 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 05bdeef036f..4acf5ae1d8f 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 8594546455c..8207505a5c6 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 b23d940d964..16fc6f96208 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 c68602ce229..2bf9c34e611 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 01f63db2828..37c931c732d 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 7ea00f8d4c8..c22ad2878eb 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 19a09a6cfae..31b6e1b12f2 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 fe2e3f4dad5..d4d47069d78 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 5bc9187deaf..b56d07f2cbd 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 bca840810a2..8e06c968cad 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 a3618b4e599..1dee9412a53 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 956d0599118..26de3e22b7f 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 f369ee8417c..40032045362 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 25ded55f507..a5ca67a4609 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 79f2bfd7829..76fa98c512c 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 cd0e3f186b1..7bfa3bcbeb8 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 6618d86c146..d90f0299c73 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 66a6cbe7c57..fd884d237bf 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 f844c2e66c1..bc0cf304bb3 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 345f9e9c434..a9660459052 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 61953d98c23..a67358afe19 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 a708f07f1f7..2731a5ceae9 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 7d70431900c..507dcecf480 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 ab1a0fd373a..f9d29e67123 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 c0746c9aebd..d39cf62fe59 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 4988b6e7559..335b2d50a36 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 3db11cd109f..9393c84f131 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 cc24aeb3bff..705c60798fd 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 a8957b4664e..a5e11e2dabd 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 c922c9fe18d..57246c86f4f 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 6fef764ee18..43e81ff60ce 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 9a8f913ee54..2d616311b83 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 907fd6d8c2f..f2eb14f3199 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 6d8aebf6b24..e397775e213 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 5b1ecb0717b..5d25eccf43d 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 0b70b86df9f..75415ac2bb3 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 f6774d0683e..ebcc46e780c 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 d3d85ba7a8c..20c1fd0f489 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 9be629e63b1..dc60f5e4b14 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 163259178cd..4fe97e0889a 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 da3b05e1034..68e236485f9 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 ad270a1783b..027e3f980a6 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 5c25e725212..08a65d0fb83 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 808f72480b5..913c41317fa 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 c8cb8330786..5a7867c1621 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 a9cf5216a7b..25c126e3d70 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 ba395ec2bb4..a1b5145b9e8 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 dea3ea125ed..830290af4fa 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 eb8155fd9af..211f80e7a32 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 e94d4e63160..eb538d5957c 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 af923f9760d..23468759b27 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 d14d0241fef..7ba21c407ea 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 5bc69fc2180..2ed082b4707 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 eecfb12bdc2..d2437372e2d 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 298ba3c4723..0b8655511ff 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 cc7cf053f33..3400474553b 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 036fa80ba7d..8b3d2590114 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 d76d9dec2d0..12c1d55e91d 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 ed2057214e5..a6cd1e63e4d 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 8fc96094075..b9cc886d5d5 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 ec92f031e1f..3942edc7574 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 a4cf5d3a261..391b2014bd5 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 5dc39c02232..9c86dcd13c3 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 40d23d17615..3485212e768 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 781a2f8bb35..ae72805ce84 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 9c9bebcba1b..233ebd7f487 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 e08fb156c3f..23fe8ed46ca 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 3869f7ad5ad..4915e2253be 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 4f90de12e55..0518db56c7c 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 f13bd3d5bf5..6956f74f14e 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 cd2d1d44b6e..3b356120240 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 52dff716d5b..9942fdde5f1 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 f2bd27bc9e8..fb51e7795a3 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 351b98dd0f7..ce90779f3a6 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 b5cf25a8e04..a7af8a8d5c4 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 c38e3439fed..7d7f93acdee 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 d0f240be9e7..23d47332cae 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 98855350bd7..4453662f742 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 ab9a8ff2d6a..a75e390f652 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 9dc0fe14e37..d78d4953c5e 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 e311554597f..2b08b13156b 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 0e2aca5d2ed..b8338a636b1 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 d00946cb39e..127f18630f6 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 e087b68ee36..586a22a722d 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 534707e8e12..c7999de9dce 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 0ea1bf1e040..7627c785d29 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 b47995ada32..2a2fadac84e 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 b63409d9587..f3a8bf7547a 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 30b49540268..f40c5bd1c48 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 41dbdd2890b..4497599f31f 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 67ceefd20b0..df0bee5d47d 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 11f9e362110..f49f36c44af 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 b68a20b309f..12f6f18fbef 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 aa04fc25bfd..4243825b2bc 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 6e0b1294459..3b808995128 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 56b6c031db8..4a0a0d27931 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 8c4519a1953..5a088548e02 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 41e756d8ad5..3cbf4b58805 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 4370f508695..e38e2537287 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 ee8b7d6672c..a99907c226b 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 dc246d799e4..0e466607284 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 e202f5e0f77..def62392a4b 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 15e1306e247..5a0c0054bca 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 330824d3e89..1355f1e7b2d 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 b52b55fccf6..6ab41243c58 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 f2dcde3375b..00cd54f088e 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 d5c06608c14..d0962ee28fc 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 025ec796007..4426d1d4d40 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 9b10360ae2c..33925dea901 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 a6c7000446f..aa985e202c5 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 610534d4a36..9232de23e42 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 0db19a71c6e..5d2a615ea9f 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 ead394cc6a8..7b9b6f7606f 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 d4f3b8ad50c..886f40e7bce 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 3370d9df4bf..6e270e46d35 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 a4252cb2584..9316e821299 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 1c37f82d0e7..d157a5741eb 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 d70a88a0958..a4836690cf6 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 a44ac2315ae..fc9c60a6e8e 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 99f72c3e01e..44db807eaac 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 26a78af969c..78a595c38f0 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 539c240cd70..e5596eea912 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 9b818f394e3..8085de59a6e 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 36c358308a5..403a01511f5 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 923c1f85149..18ff1806906 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 bad23e95318..1658e476eeb 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 9a59e273106..65f89e997b7 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 1fc87c978d6..2751ea773b7 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 21a2e137227..d035ee337b3 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 645017f099d..b7fd9425bfe 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 f9a59b2a3d3..b0296cd1c02 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 6edd7406c22..aaa21cf2a79 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 d56ed01108f..3a81c681a0a 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 e22a32d83ee..79ff6bcc97d 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 d578a389bf1..15004c83927 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 845b1e7a2a0..36594cc8574 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 96a4dc0c8bf..c88ea145a67 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 2024f50a856..c11e7c89aa5 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 ecb246f15ba..3c0fc79ea63 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 b6459848267..20efdda8c19 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 4f6ae07e589..d14842ec2b8 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 7ab21b740de..9b8f91c3705 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 6bb5889d25b..f4e291d2a90 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 9eb67165cbf..665871ce2b1 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 1dcb46e23e3..94d54b50092 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 436f467a4be..12ee4fc4bc5 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 0a23ff19386..1934c63d8f9 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 429022bad39..1b683ad5137 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 813fea9b1dc..f3f68c6a6c9 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 a4e7ec23022..60479c94436 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 885dd638486..60236eca445 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 75e9f161b15..aa45b5221da 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 dc1ebdb6854..249824f70b5 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 c4659d88135..e8a9c158610 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 daa95aa63ce..648488fb53c 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 dca889c5f23..daeec9e7a55 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 1c034537935..98744304574 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 15378df7f3e..b13a0c149aa 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 ebc7a2bb278..7b4b63557ed 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 34fd99d8680..ef0d33837ab 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 dff07677425..eb3c6b91a59 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 3cc9bd078a2..00000000000 --- 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 62e35e9c234..00000000000 --- 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 9d0c350faae..00000000000 --- 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 -#include - -//! [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 c16ae315109..00000000000 --- a/examples/tools/inputpanel/mainform.ui +++ /dev/null @@ -1,76 +0,0 @@ - - - MainForm - - - - 0 - 0 - 140 - 200 - - - - Input Panel Example - - - - - - My age: - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - lineEdit - - - - - - - - - - My phone number: - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - lineEdit_2 - - - - - - - - - - My gender: - - - - - - Male - - - - - - - Female - - - - - - - - - - - diff --git a/examples/tools/inputpanel/myinputpanel.cpp b/examples/tools/inputpanel/myinputpanel.cpp deleted file mode 100644 index c58d27d790b..00000000000 --- 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(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 0d11e9c0382..00000000000 --- 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 -#include - -#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 a09964ab9ed..00000000000 --- 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 - -#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 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 e69a4960400..00000000000 --- 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 - -#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 fe78442aff3..00000000000 --- a/examples/tools/inputpanel/myinputpanelform.ui +++ /dev/null @@ -1,398 +0,0 @@ - - - MyInputPanelForm - - - - 0 - 0 - 167 - 233 - - - - Input Panel - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - 1 - - - - 49 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - 2 - - - - 50 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - 3 - - - - 51 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - 4 - - - - 52 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - 5 - - - - 53 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - 6 - - - - 54 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - 7 - - - - 55 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - 8 - - - - 56 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - 9 - - - - 57 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - * - - - - 42 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - 0 - - - - 48 - - - - - - - - - 0 - 0 - - - - - 45 - 40 - - - - Qt::NoFocus - - - # - - - - 35 - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 8 - - - - Qt::NoFocus - - - Close - - - - - - - - - - - closeButton - clicked() - MyInputPanelForm - hide() - - - 114 - 209 - - - 83 - 116 - - - - - diff --git a/examples/tools/plugandpaint/interfaces.h b/examples/tools/plugandpaint/interfaces.h index 785f3a1610e..709fee509a6 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 f5ae1da83fb..e3a4efa02b5 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 292cae1fe76..fcd0507fee6 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 526e3d50051..88c2f10ac1c 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 f6ace44ea57..ed01f803478 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 d1185b287c9..552d923853d 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 66a51ee8aee..7c01d2507c0 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 36e79f5bf56..9c4f202921e 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 3e0af26efa0..3b4592a5dfc 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 79bcc5a0883..f5611275d8c 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 e58fde22055..d6cf3d4c680 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 db5679f0165..4b4cd857d4f 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 fe3fda64f05..207c3c4ab15 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 b9468bd49fb..7fe163f012b 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 c157668cd18..85635cb1141 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 dcf190363a4..b10b721c945 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 a8a20e460fe..20aef3fc765 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 923c1f85149..18ff1806906 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 fc389cd009a..06287db3357 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 6d997fa759f..bfd276f9bb1 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 892cb305907..664ff289087 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 63deb2a2945..1d929ceed7a 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 e4b532f9fe9..e64ac791e3e 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 abd4d93b8f0..350e2311ae2 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 d897f3a39b8..e2fb8cf4fc9 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 1d4d9d84ae1..a8553993775 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 d5acd082062..fc7b73f9199 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 8a26cf6012f..3ae73cdb29f 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 da6e2180000..3baa02ff867 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 3a4da984947..5e2f4ceab38 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 aed21c77cc1..bba1467ee57 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 da86fb5286e..d18670f7c9c 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 6c53f171d6d..61d8f342068 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 6d8c7aec804..4aafae445ea 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 a6bbf472fb9..02fd043c381 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 bd4cd223dbb..359cbc66757 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 df79f8f700a..d1182b38854 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 e688cad6022..adb69cbbc3a 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 ca7bd2b307d..899d01daede 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 e143f98061f..8c04701df26 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 b0eda92d410..22de77166a4 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 a1bb49533a0..ddab6fdbecc 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 fb166066863..896fcec706f 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 4500c6d68d3..7aebed0e56d 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 03f8b98d740..6ce7fe2c80f 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 a4e4ab95490..d2cd50c5b6a 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 815c8dd69e7..2a367904ffe 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 9ca3c0a3993..04ea2cf07c5 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 c60ccc915bd..af22849e80e 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 6ee50fb3377..76e14798a9e 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 385311cb1dc..e056e6fe231 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 52a2cffac32..aac08f4c292 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 c21ffa0a5e6..4169b11b688 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 f361984b31d..e5545ca533e 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 e50c13b230c..859b47c348f 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 83885224327..8dd8e44ba6f 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 cd08e223d7a..830507a1953 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 a83a9f3f1d6..e9b07a36dfc 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 e698be4f2d8..69b81f52c97 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 031c0e10da3..6a80dbec674 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 863df532f54..861b763ca38 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 8ffa81944a9..6c073af69dd 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 8c30857b645..5fc217b1fb9 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 3f227f4fc6e..31e947bd7ef 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 bf8528c1e48..c6d8363dbaa 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 74ff462f78a..1abc03a8a6d 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 3a392bdb6eb..4d9c1401380 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 372aa43ed0e..34cbb6ffa1c 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 90b9b0ed48e..7bc525dd75a 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 a17c894a4bf..5ef2a510b77 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 04d4b2c693e..2315dc52e05 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 9f9b2b0b91f..9e1938c744b 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 a17c894a4bf..5ef2a510b77 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 ee57b19b088..b594c8daa5f 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 192a5aef46a..5d208af0eb6 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 15991677c2f..a97c279b644 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 047bc6e05c4..1ef7396fe84 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 4d653d1fad8..6cfe3d2cce3 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 15991677c2f..a97c279b644 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 3f381766c60..b7739f7c585 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 e33f63273c3..7bdea0af5f3 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 5bba3afd942..fa2c6a86839 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 1c154885b28..59c369818c7 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 15991677c2f..a97c279b644 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 354b4827427..0e9b5ff8e90 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 abdc6bc8e22..f1a5c489761 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 86d4df92273..bdbae59107f 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 607a4fefc68..3b845edcb41 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 15991677c2f..a97c279b644 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 73ec3dcf23b..4e972968325 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 3ab4be53fa4..34daca70ecf 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 86d4df92273..bdbae59107f 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 607a4fefc68..3b845edcb41 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 15991677c2f..a97c279b644 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 372aa43ed0e..34cbb6ffa1c 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 90b9b0ed48e..7bc525dd75a 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 a17c894a4bf..5ef2a510b77 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 a7d50017c68..2cf44e0b1d0 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 9f9b2b0b91f..9e1938c744b 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 a17c894a4bf..5ef2a510b77 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 b539c017763..b3daed28014 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 192a5aef46a..5d208af0eb6 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 15991677c2f..a97c279b644 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 d82dda74c4d..064cae92316 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 4d653d1fad8..6cfe3d2cce3 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 15991677c2f..a97c279b644 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 6342db3f8dd..6fffe4072c6 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 e33f63273c3..7bdea0af5f3 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 5bba3afd942..fa2c6a86839 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 1c154885b28..59c369818c7 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 15991677c2f..a97c279b644 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 20425d15c2c..39106ab2dad 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 abdc6bc8e22..f1a5c489761 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 86d4df92273..bdbae59107f 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 607a4fefc68..3b845edcb41 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 15991677c2f..a97c279b644 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 88847f2ea01..2bfc81a0427 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 3ab4be53fa4..34daca70ecf 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 86d4df92273..bdbae59107f 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 607a4fefc68..3b845edcb41 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 15991677c2f..a97c279b644 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 old mode 100755 new mode 100644 diff --git a/examples/tutorials/gettingStarted/gsQt/part1/main.cpp b/examples/tutorials/gettingStarted/gsQt/part1/main.cpp old mode 100755 new mode 100644 index 5f5ac7384bb..d3e29b42050 --- 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 old mode 100755 new mode 100644 diff --git a/examples/tutorials/gettingStarted/gsQt/part2/main.cpp b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp old mode 100755 new mode 100644 index c2b94a3d0c9..e76be0f456d --- 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 old mode 100755 new mode 100644 diff --git a/examples/tutorials/gettingStarted/gsQt/part3/main.cpp b/examples/tutorials/gettingStarted/gsQt/part3/main.cpp old mode 100755 new mode 100644 index 00fb70a4abb..98091b01901 --- 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 old mode 100755 new mode 100644 diff --git a/examples/tutorials/gettingStarted/gsQt/part4/main.cpp b/examples/tutorials/gettingStarted/gsQt/part4/main.cpp old mode 100755 new mode 100644 index a8cefe5347b..6bb95c9c3a0 --- 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 old mode 100755 new mode 100644 diff --git a/examples/tutorials/gettingStarted/gsQt/part5/main.cpp b/examples/tutorials/gettingStarted/gsQt/part5/main.cpp old mode 100755 new mode 100644 index f25bbd02c10..71caf03b644 --- 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 old mode 100755 new mode 100644 diff --git a/examples/tutorials/modelview/1_readonly/main.cpp b/examples/tutorials/modelview/1_readonly/main.cpp old mode 100755 new mode 100644 index fb1b6708966..37b541168e2 --- 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 old mode 100755 new mode 100644 index 9b5bdd7df21..30a5af1e83c --- 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 old mode 100755 new mode 100644 index f60546897a9..3bb69d8e6f4 --- 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 old mode 100755 new mode 100644 index fb1b6708966..37b541168e2 --- 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 old mode 100755 new mode 100644 index 8363af92528..8c713101cd9 --- 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 old mode 100755 new mode 100644 index 7ad876c1bf8..ea36923e197 --- 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 old mode 100755 new mode 100644 index 424c1dc4386..a11f74dddf7 --- 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 old mode 100755 new mode 100644 index fa500057011..24798c0431a --- 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 old mode 100755 new mode 100644 index be59c592079..da03df25fe2 --- 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 old mode 100755 new mode 100644 index 9dadb071a7b..e435b4a0f79 --- 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 old mode 100755 new mode 100644 index ee0e6092287..f312bf19fb0 --- 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 old mode 100755 new mode 100644 index 5a185d92e4a..385d02a0d75 --- 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 old mode 100755 new mode 100644 index 2a78dd09e99..3160aa22572 --- 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 old mode 100755 new mode 100644 index 4b7e59a2908..6285ab92747 --- 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 old mode 100755 new mode 100644 index 7db37919e3d..a76d76fa1cf --- 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 old mode 100755 new mode 100644 index e5d20949b36..32d4bad104e --- 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 old mode 100755 new mode 100644 index ecfd58ef6bd..050bbf097a4 --- 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 old mode 100755 new mode 100644 index 2a78dd09e99..3160aa22572 --- 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 old mode 100755 new mode 100644 index 0fa8da0ec42..71ee7f29c85 --- 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 old mode 100755 new mode 100644 index 4e35a3ffc4e..9dd9508651a --- 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 old mode 100755 new mode 100644 index 2a78dd09e99..3160aa22572 --- 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 old mode 100755 new mode 100644 index 3bd36d9df41..d0f678f4b99 --- 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 old mode 100755 new mode 100644 index e78befbbc0c..ee938ffa934 --- 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 f4721d8ed4d..795c5f6de29 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 966dbeaa73d..e1d4b3141bc 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 old mode 100755 new mode 100644 index 99cbd4e693b..6f98576eb41 --- 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 old mode 100755 new mode 100644 index 26ee2557a96..93713c9f541 --- 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 old mode 100755 new mode 100644 index 01cd0f5b3c9..932c10f1195 --- 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 old mode 100755 new mode 100644 index a3202c63961..35345697b40 --- 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 old mode 100755 new mode 100644 index 9a548ea96ac..1606c4302e4 --- 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 old mode 100755 new mode 100644 index 30410a55704..14f7d0eccb2 --- 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 old mode 100755 new mode 100644 index a2443166899..2b1e082b5df --- 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 5ebd8734826..797dcaf4d01 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 e941e991231..68291cc11da 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 819da20bc2b..e45a70f6a90 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 09a827c4da1..ae7d8ee4ef5 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 01e8b3f5d63..c1a23140aab 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 6783b718a78..f8a3d3788a5 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 6b84037ab2d..b6fd4a46da1 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 bb5ed125b50..d41a49f5d30 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 5c3f3a076f4..5640e2c3c45 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 9efd3b1a0e3..9f2cf55ef33 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 299fd983273..5856e302d66 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 e6f0f79c262..b1abf409d79 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 c183f646d21..07c1ae3ef51 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 3bb7e07f2ca..11a1141c2a7 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 07ecd621775..04dabeef89d 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 97666c997f3..15a47db9b1b 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 077fe17a5ea..89e59834031 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 866cecc44b3..949e041ea1b 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 474de36d6fb..0d11d9b9ca7 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 0da926ea63a..14ffdde283b 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 387e0a7bb1c..b648797c61e 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 old mode 100755 new mode 100644 index c9c013affaa..8d1f8d97d87 --- 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 old mode 100755 new mode 100644 index fa3bd0dee89..8043791011c --- 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 old mode 100755 new mode 100644 index 4af469a61ed..30469222eef --- 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 old mode 100755 new mode 100644 index 2d90bf9574e..4c2843a7ba3 --- 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 old mode 100755 new mode 100644 index fe14aa263c9..cdab9f1b115 --- 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 old mode 100755 new mode 100644 index 87037c9a9e4..9b57fa4b068 --- 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 old mode 100755 new mode 100644 index 4b850b9bc89..e376f3fafbd --- 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 old mode 100755 new mode 100644 index e44a633e96f..5074feadac8 --- 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 old mode 100755 new mode 100644 index 7997cc2c2b2..e5a8831265f --- 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 old mode 100755 new mode 100644 index 1c03e489661..1809dc95d22 --- 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 old mode 100755 new mode 100644 index c2a3a300e0a..e251758a26f --- 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 old mode 100755 new mode 100644 index 1293e2e27c9..b5ce67a2e70 --- 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 old mode 100755 new mode 100644 index 7799153dbde..3278cca18e7 --- 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 old mode 100755 new mode 100644 index 48f9d68633b..c2dc65debad --- 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 old mode 100755 new mode 100644 index 0fbaf526efb..5138d0312a3 --- 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 old mode 100755 new mode 100644 index 6d0c9f77c8b..f11265271a3 --- 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 old mode 100755 new mode 100644 index 24f0b227a73..515904615a3 --- 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 old mode 100755 new mode 100644 index 0203d814fcc..f77527949c9 --- 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 old mode 100755 new mode 100644 index 3c07f8b6047..0ea9fd461d1 --- 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 old mode 100755 new mode 100644 index 1f2e4542e88..1286b15c23d --- 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 old mode 100755 new mode 100644 index ae37c34d1e0..85c4c3c19e6 --- 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 old mode 100755 new mode 100644 index aa1e04b52ab..24dc19f8cd8 --- 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 old mode 100755 new mode 100644 index d2f3040a4a7..c65c5600754 --- 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 old mode 100755 new mode 100644 index f44892735d4..bad17238e11 --- 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 old mode 100755 new mode 100644 index ba491c41ae0..064bb140241 --- 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 old mode 100755 new mode 100644 index 9f06662c955..3f0b8fab969 --- 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 old mode 100755 new mode 100644 index 4116de82239..c005d77b6fb --- 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 old mode 100755 new mode 100644 index 75142b5b198..ee7ff6cb5e3 --- 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 old mode 100755 new mode 100644 index 224053f8341..e290ce12610 --- 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 old mode 100755 new mode 100644 index 5a31aa07361..f78ed0e46c1 --- 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 old mode 100755 new mode 100644 index 1205822e6db..8362a0b4d83 --- 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 old mode 100755 new mode 100644 index 6e312926ec5..f97ebbce42b --- 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 old mode 100755 new mode 100644 index bbd0fbcc88b..04382461d18 --- 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 old mode 100755 new mode 100644 index 5b9332c3ced..68623f05afd --- 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 old mode 100755 new mode 100644 index 32d49bfa639..3fc1f37b312 --- 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 old mode 100755 new mode 100644 index f1e87f67ce0..6eaa3e90830 --- 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 old mode 100755 new mode 100644 index 3d2a5b6cd58..61a387ca80b --- 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 old mode 100755 new mode 100644 index 0875732145f..78f8b52e462 --- 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 old mode 100755 new mode 100644 index dcd4943749f..37801c240ef --- 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 old mode 100755 new mode 100644 index 78ed1741c3c..15081b55353 --- 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 old mode 100755 new mode 100644 index a1f1a139213..98817081394 --- 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 0739830125a..f1f9306f4fa 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 b991104f863..b0522ac81f9 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 3bbb7f0be1e..70598287b70 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 1d025cf7304..c8b46f33853 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 4558fe34661..f62548954f5 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 c765e45590e..031b0201a33 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 9014e5d5d95..7a8523786a7 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 c102e96a1a1..dd11220394a 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 4b3fb6a7924..04e4672be7b 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 97e6ee20ce8..950f7410916 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 c2d3ea7b087..472b1bb363e 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 29f0605d05a..16731736abe 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 70280479831..1321cbf9208 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 d56ac778b6a..52984c84a2d 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 60e2d224713..714e8840944 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 25dfb1c4aa0..851bfef63b2 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 94751dc9a3b..e90ffadbc2b 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 f4b170253e8..597b75a2e91 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 old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/gradient.jpg b/examples/webkit/webkit-guide/img/gradient.jpg old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/gray_icon_close.png b/examples/webkit/webkit-guide/img/gray_icon_close.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ag_016.png b/examples/webkit/webkit-guide/img/ic_ag_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ag_032.png b/examples/webkit/webkit-guide/img/ic_ag_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ag_036.png b/examples/webkit/webkit-guide/img/ic_ag_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ag_048.png b/examples/webkit/webkit-guide/img/ic_ag_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_al_016.png b/examples/webkit/webkit-guide/img/ic_al_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_al_032.png b/examples/webkit/webkit-guide/img/ic_al_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_al_036.png b/examples/webkit/webkit-guide/img/ic_al_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_al_048.png b/examples/webkit/webkit-guide/img/ic_al_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ar_016.png b/examples/webkit/webkit-guide/img/ic_ar_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ar_032.png b/examples/webkit/webkit-guide/img/ic_ar_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ar_036.png b/examples/webkit/webkit-guide/img/ic_ar_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ar_048.png b/examples/webkit/webkit-guide/img/ic_ar_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_b_016.png b/examples/webkit/webkit-guide/img/ic_b_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_b_032.png b/examples/webkit/webkit-guide/img/ic_b_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_b_036.png b/examples/webkit/webkit-guide/img/ic_b_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_b_048.png b/examples/webkit/webkit-guide/img/ic_b_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_be_016.png b/examples/webkit/webkit-guide/img/ic_be_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_be_032.png b/examples/webkit/webkit-guide/img/ic_be_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_be_036.png b/examples/webkit/webkit-guide/img/ic_be_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_be_048.png b/examples/webkit/webkit-guide/img/ic_be_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_c_016.png b/examples/webkit/webkit-guide/img/ic_c_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_c_032.png b/examples/webkit/webkit-guide/img/ic_c_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_c_036.png b/examples/webkit/webkit-guide/img/ic_c_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_c_048.png b/examples/webkit/webkit-guide/img/ic_c_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ca_016.png b/examples/webkit/webkit-guide/img/ic_ca_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ca_032.png b/examples/webkit/webkit-guide/img/ic_ca_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ca_036.png b/examples/webkit/webkit-guide/img/ic_ca_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ca_048.png b/examples/webkit/webkit-guide/img/ic_ca_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_cl_016.png b/examples/webkit/webkit-guide/img/ic_cl_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_cl_032.png b/examples/webkit/webkit-guide/img/ic_cl_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_cl_036.png b/examples/webkit/webkit-guide/img/ic_cl_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_cl_048.png b/examples/webkit/webkit-guide/img/ic_cl_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_cu_016.png b/examples/webkit/webkit-guide/img/ic_cu_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_cu_032.png b/examples/webkit/webkit-guide/img/ic_cu_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_cu_036.png b/examples/webkit/webkit-guide/img/ic_cu_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_cu_048.png b/examples/webkit/webkit-guide/img/ic_cu_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_f_016.png b/examples/webkit/webkit-guide/img/ic_f_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_f_032.png b/examples/webkit/webkit-guide/img/ic_f_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_f_036.png b/examples/webkit/webkit-guide/img/ic_f_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_f_048.png b/examples/webkit/webkit-guide/img/ic_f_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_fe_016.png b/examples/webkit/webkit-guide/img/ic_fe_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_fe_032.png b/examples/webkit/webkit-guide/img/ic_fe_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_fe_036.png b/examples/webkit/webkit-guide/img/ic_fe_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_fe_048.png b/examples/webkit/webkit-guide/img/ic_fe_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_h_016.png b/examples/webkit/webkit-guide/img/ic_h_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_h_032.png b/examples/webkit/webkit-guide/img/ic_h_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_h_036.png b/examples/webkit/webkit-guide/img/ic_h_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_h_048.png b/examples/webkit/webkit-guide/img/ic_h_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_he_016.png b/examples/webkit/webkit-guide/img/ic_he_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_he_032.png b/examples/webkit/webkit-guide/img/ic_he_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_he_036.png b/examples/webkit/webkit-guide/img/ic_he_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_he_048.png b/examples/webkit/webkit-guide/img/ic_he_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_k_016.png b/examples/webkit/webkit-guide/img/ic_k_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_k_032.png b/examples/webkit/webkit-guide/img/ic_k_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_k_036.png b/examples/webkit/webkit-guide/img/ic_k_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_k_048.png b/examples/webkit/webkit-guide/img/ic_k_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_li_016.png b/examples/webkit/webkit-guide/img/ic_li_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_li_032.png b/examples/webkit/webkit-guide/img/ic_li_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_li_036.png b/examples/webkit/webkit-guide/img/ic_li_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_li_048.png b/examples/webkit/webkit-guide/img/ic_li_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_mg_016.png b/examples/webkit/webkit-guide/img/ic_mg_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_mg_032.png b/examples/webkit/webkit-guide/img/ic_mg_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_mg_036.png b/examples/webkit/webkit-guide/img/ic_mg_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_mg_048.png b/examples/webkit/webkit-guide/img/ic_mg_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_n_016.png b/examples/webkit/webkit-guide/img/ic_n_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_n_032.png b/examples/webkit/webkit-guide/img/ic_n_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_n_036.png b/examples/webkit/webkit-guide/img/ic_n_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_n_048.png b/examples/webkit/webkit-guide/img/ic_n_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_na_016.png b/examples/webkit/webkit-guide/img/ic_na_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_na_032.png b/examples/webkit/webkit-guide/img/ic_na_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_na_036.png b/examples/webkit/webkit-guide/img/ic_na_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_na_048.png b/examples/webkit/webkit-guide/img/ic_na_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ne_016.png b/examples/webkit/webkit-guide/img/ic_ne_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ne_032.png b/examples/webkit/webkit-guide/img/ic_ne_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ne_036.png b/examples/webkit/webkit-guide/img/ic_ne_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ne_048.png b/examples/webkit/webkit-guide/img/ic_ne_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ni_016.png b/examples/webkit/webkit-guide/img/ic_ni_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ni_032.png b/examples/webkit/webkit-guide/img/ic_ni_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ni_036.png b/examples/webkit/webkit-guide/img/ic_ni_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_ni_048.png b/examples/webkit/webkit-guide/img/ic_ni_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_o_016.png b/examples/webkit/webkit-guide/img/ic_o_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_o_032.png b/examples/webkit/webkit-guide/img/ic_o_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_o_036.png b/examples/webkit/webkit-guide/img/ic_o_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_o_048.png b/examples/webkit/webkit-guide/img/ic_o_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_pt_016.png b/examples/webkit/webkit-guide/img/ic_pt_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_pt_032.png b/examples/webkit/webkit-guide/img/ic_pt_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_pt_036.png b/examples/webkit/webkit-guide/img/ic_pt_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_pt_048.png b/examples/webkit/webkit-guide/img/ic_pt_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_si_016.png b/examples/webkit/webkit-guide/img/ic_si_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_si_032.png b/examples/webkit/webkit-guide/img/ic_si_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_si_036.png b/examples/webkit/webkit-guide/img/ic_si_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_si_048.png b/examples/webkit/webkit-guide/img/ic_si_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_zn_016.png b/examples/webkit/webkit-guide/img/ic_zn_016.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_zn_032.png b/examples/webkit/webkit-guide/img/ic_zn_032.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_zn_036.png b/examples/webkit/webkit-guide/img/ic_zn_036.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/ic_zn_048.png b/examples/webkit/webkit-guide/img/ic_zn_048.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_check.png b/examples/webkit/webkit-guide/img/icon_check.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_check_x24green.png b/examples/webkit/webkit-guide/img/icon_check_x24green.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_dismiss.png b/examples/webkit/webkit-guide/img/icon_dismiss.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_dismiss_x22.png b/examples/webkit/webkit-guide/img/icon_dismiss_x22.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_drill-down.png b/examples/webkit/webkit-guide/img/icon_drill-down.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_drill-down_x32.png b/examples/webkit/webkit-guide/img/icon_drill-down_x32.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_drill-up.png b/examples/webkit/webkit-guide/img/icon_drill-up.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_drill-up_x32.png b/examples/webkit/webkit-guide/img/icon_drill-up_x32.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_expand-nav.png b/examples/webkit/webkit-guide/img/icon_expand-nav.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_head-collapsed.png b/examples/webkit/webkit-guide/img/icon_head-collapsed.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png b/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_head-expanded.png b/examples/webkit/webkit-guide/img/icon_head-expanded.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png b/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_info.png b/examples/webkit/webkit-guide/img/icon_info.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_info_x24.png b/examples/webkit/webkit-guide/img/icon_info_x24.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_link-doc.png b/examples/webkit/webkit-guide/img/icon_link-doc.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_link-email.png b/examples/webkit/webkit-guide/img/icon_link-email.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_link-external.png b/examples/webkit/webkit-guide/img/icon_link-external.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_link-pdf.png b/examples/webkit/webkit-guide/img/icon_link-pdf.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_link-ppt.png b/examples/webkit/webkit-guide/img/icon_link-ppt.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_link-rss.png b/examples/webkit/webkit-guide/img/icon_link-rss.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_link-sms.png b/examples/webkit/webkit-guide/img/icon_link-sms.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_link-tel.png b/examples/webkit/webkit-guide/img/icon_link-tel.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_link-xls.png b/examples/webkit/webkit-guide/img/icon_link-xls.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_list-all.png b/examples/webkit/webkit-guide/img/icon_list-all.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_list-all_circ.png b/examples/webkit/webkit-guide/img/icon_list-all_circ.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_nav-start.png b/examples/webkit/webkit-guide/img/icon_nav-start.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_nav-top.png b/examples/webkit/webkit-guide/img/icon_nav-top.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_nav-up.png b/examples/webkit/webkit-guide/img/icon_nav-up.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_nav_end.png b/examples/webkit/webkit-guide/img/icon_nav_end.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_question.png b/examples/webkit/webkit-guide/img/icon_question.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_scroll-left.png b/examples/webkit/webkit-guide/img/icon_scroll-left.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_scroll-right.png b/examples/webkit/webkit-guide/img/icon_scroll-right.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/icon_trash.png b/examples/webkit/webkit-guide/img/icon_trash.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/img/mask.png b/examples/webkit/webkit-guide/img/mask.png old mode 100755 new mode 100644 diff --git a/examples/webkit/webkit-guide/js/anim_accord.js b/examples/webkit/webkit-guide/js/anim_accord.js index 8d58a18c7ed..7d4a0ffad89 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 3e00bc6f306..d853b0b0fe8 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 365210d84af..f4795da2a0f 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 1a80a6d7a8d..7b412b32fa3 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 0c834d1dc86..f591bae0328 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 b440afbfb50..b3d075c9606 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 46601e4d699..63377375eac 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 5d516aa93c0..987934458ec 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 b440afbfb50..b3d075c9606 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 1a87cb3c831..a84496f5c26 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 bb0c9dca198..e9bf7cfd656 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 1ba445e4b23..c79e040b2cf 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 880d6e45bca..5054786f494 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 62dca84808f..1bfc21e2ea3 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 436d97c1f9a..2bef2c4525c 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 73d332d0c60..56e6f87f649 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 710a3710fbc..657f6d62a61 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 cad6f6c6350..dea52e2a024 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 3b0e3b4e9cc..c7b9794b0f7 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 d154c815678..33eb4dfad94 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 606b962d4c9..c9050b8a295 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 5da2780f620..f5a3ebc5c8e 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 0f31f07573a..6335a534f03 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 05733836205..1c6e08959dc 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 eaf60008935..0d2293ce040 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 385c1db7dfe..adfc0d74bc1 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 1e5db2f0b2e..b4431297a18 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 3548b856255..c637dbccbe0 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 0038aa10dda..d51e8430d05 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 76565357ce1..ab0b7b63e38 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 4df7242efa8..8d21a0b75cb 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 55f2963189e..2c18ebdf9b0 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 7724421d3c8..86b744f78be 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 2ccb0aefed0..4e531b6d847 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 01c8adae532..bfe61dcd01f 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 20c3bf407e1..e2fa72fa3f4 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 9c4e4f50ab2..a77d6f1d4df 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 8676e48359c..a7093f46988 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 84ce5c698a6..aed1c4758e4 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 1bce70e03f5..cd8729f3d6b 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 bbedf0f858a..7564026e90c 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 3902b148697..4b4e9ff801c 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 c43162bade2..1a865235a4c 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 fcee5c893ab..1d00552bf99 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 29fe46fd4c4..807fcc469a9 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 ee24d39a5a7..666ee0cd599 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 72c5170d970..4cfe9628a56 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 31c5f566cca..a71b510dbef 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 f2079f511bf..218d30316c3 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 82c042e40e5..e135bd0a85c 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 1029d534c8d..d4a9f3e53e1 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 8ff82fcbfb4..7a26ce50594 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 def2b3b1de0..204f213a79d 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 3c6061a1f4f..711ec641eed 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 da6b9d3c7be..8adaf541032 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 20747eac1e5..1c88f19429f 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 979e12253c4..1ffa920105e 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 923c1f85149..18ff1806906 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 91ce27646d1..02ea8dc6bb0 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 1d2eab01a61..2689b09bd20 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 edee9ce00bf..0f07e7e23ac 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 81ddf6c30ae..c2e4b7c81a3 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 55a362a6221..b6c6877244d 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 f2079f511bf..218d30316c3 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 ff6c0a3d8e5..0183dc59d33 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 6bda9d0f5a6..b3f0c4b73ce 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 c686eec157e..6b17eabd566 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 e12d49763d4..b53a8112bd8 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 415a2bebb50..ad9dd553fec 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 29e161d3527..2abb59f224a 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 74f18032619..ab20f6b67b6 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 45907c31beb..ad325704b10 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 01c8adae532..bfe61dcd01f 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 fb9d42ab31a..29fb61b4226 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 547d35f04f6..40cee56df1b 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 7e76d16eda9..11271fdb47f 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 c93102df42f..290a7fa4047 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 9b7f951a486..e60d6fdf248 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 77cf6852592..c7c43fc2bde 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 b34d34c2e52..cad5f0cac18 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 f2079f511bf..218d30316c3 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 bf05cc1d876..7474e8bd8ff 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 dbfba22aea3..8f89b09307a 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 541279a84d1..9c775e88eea 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 3931d18ac22..cd747b2b46a 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 c23a3685d90..96cb208c631 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 d3be9c6e7ba..142c7dd85fc 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 6e2b2665ea2..f7a9187e726 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 f2079f511bf..218d30316c3 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 9a3eb02e959..d3ff7b78d45 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 41d75916eb4..9cd35b236c0 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 3d6d29c4745..6086c363b7c 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 637b9a3705a..94161f43815 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 cc77a406d6c..5d8b5fc291c 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 82b7e372961..30b69c63ed2 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 31ccc6fb3ee..d58896be5e5 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 2c05ee950d3..dbd91e73b8b 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 221fbcc7650..74096d372fa 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 7430039594c..673c43da6d9 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 36d217cbb40..94da628fdf6 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 b2dfd431ed7..ca42a852b62 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 40c41bfc9a5..98f8791472a 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 ac2825bcd20..cb40198d3bc 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 6d3a11af61e..e92aebfaf96 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 2830ef80abd..79aafcb9436 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 064c5af964c..07edd3edd58 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 72f13b42ba7..8bb9556c12e 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 591a5f3f7d1..c81478f8a80 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 6c30ae5caec..2fb0a990454 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 efdd11f5d89..46858e3ee23 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 4c067344692..f842c0feef9 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 c06c904a018..49b5aaaace2 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 c28db43f8a8..f162e9f4ba3 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 e637392521a..d33830e8832 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 6b0ec7b4f6c..10d16bac21e 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 893b65da86c..e5326286f1f 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 65dbfd16ebd..6c319e4f0e1 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 c79019abef3..b75ebb9bef5 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 f5b45f1d7da..9d23669c970 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 0110a2310d0..f7e8297f3b5 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 c63321ec63e..a637e366452 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 33c477dcbdd..41033d7bb57 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 bcf5d91ba97..cfd711f6692 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 ea09224f759..5c3bbac8b13 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 5e5765e9570..f8d5dec77b9 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 d2053d84ac0..9db53445fe8 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 aa12a375fee..0d3ece7a893 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 c64e352f47b..c7f21f4b795 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 b55efaa1fad..afd8ea96a6c 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 7e8d8b5c391..26e17826fb7 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 b2b929842f4..41505e80148 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 caa76987b10..853ec29a08f 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 8dd71ed0a51..2d7cef12c58 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 1cd74619e76..4b129ef0d6d 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 15c849aa487..cec6614a0c9 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 d23af14af2c..4f38a089388 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 0c3ceafc884..118bc96cf20 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 058f5cc2216..f6911b36f1c 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 67c85aca409..32fbab6e6e1 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 ad30de520c7..74bee7deac5 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 4e36b1c2cd0..ef13609249e 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 a646c602db0..7b0230f0254 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 4fa160f9edd..bfc44bc67cc 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 22d222e2b99..960d51cafd8 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 71ce6aec0be..04717e79fdd 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 0f65c1f71c6..29b99437e0a 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 3313d8f5746..dc8a4d0a6f3 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 7712d83d10d..e5d7e4aa9f3 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 84011a262f7..cf170003814 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 da65c2bf882..8266268fcdb 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 cee1bafe48e..27c973b7883 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 c44e921e82f..f0141e6bbdc 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 ed765995e79..85db5e84c12 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 f27c4088bc5..8eb5b00fc52 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 063243528b0..30c783226da 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 1ca1190235c..7807b54b67f 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 aa100d401e5..43a391ceb77 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 8160a87b524..c0ceaf24b6c 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 78f40f64fa4..2e9d8973da1 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 105868ed076..6955c9ecc1c 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 6418fa2b585..238e22df51b 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 977ccaaa38a..971b9a98f7c 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 4f16e90d974..ef11ac962e2 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 7e51e420a94..517d9288675 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 7e51e420a94..517d9288675 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 7e51e420a94..517d9288675 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 7e51e420a94..517d9288675 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 4435b79a388..77d1f5dbf3d 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 b5fc02d985d..317ca7a7c58 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 8bd1c100c3c..f6dda15d0ab 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 d60533e9233..de28ec7d1fc 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 98bb014aede..b10ed54e9b3 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 6fac11b2b19..daecc008c38 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 4bc947bac89..1733c34a649 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 7219839d4c7..254f54068f1 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 4aba62d8b74..bc92c3c5484 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 6691e3f49c2..0a14b5cea46 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 7a9ba9adf77..59e45f662f4 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 6104362c0b9..208ab592e13 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 af1a32bb02c..ec15869b0f3 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 1712e94660e..00000000000 --- 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 15135e1f89e..f890e97733e 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 00000000000..d978d141665 --- /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 00000000000..90e1e0f9530 --- /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 f3c33a214e4..6f6d9aa2ab2 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 695198777e2..3f6b1f42728 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 695198777e2..3f6b1f42728 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 695198777e2..3f6b1f42728 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 20f1f50b7f5..c8ef9bd61db 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 4d65f0d4269..cf46eb39578 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 8a44f7d7720..8a0e5c61fab 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 c19964ea736..2e4a591a860 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 9ae54617966..f1f665a81d3 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 2f67f0e86b3..f59906935a0 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 2f67f0e86b3..f59906935a0 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 4151ef0ffda..ab36a8c098b 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 c85a722dff0..1ee8800fb01 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 4d55287c7a9..fce2513474b 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 4d55287c7a9..fce2513474b 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 e1dd43671b0..37417289f43 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 41c668ea1dc..af54fb1f3f2 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 533ef8b6614..f63efdfbe1f 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 917cca47794..496032f3da5 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 917cca47794..496032f3da5 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 533ef8b6614..f63efdfbe1f 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 533ef8b6614..f63efdfbe1f 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 3d9a1243940..416ce77c791 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 07cab1db119..9e68978b34d 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 533ef8b6614..f63efdfbe1f 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 533ef8b6614..f63efdfbe1f 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 533ef8b6614..f63efdfbe1f 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 68996996a77..9c5146b0676 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 ca44938dcc9..c189a51f838 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 61bd18e9d56..eeb7062a8d6 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 917cca47794..496032f3da5 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 1e882274453..e3921f575a3 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 2bab72008a9..cef8dde12ec 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 2bab72008a9..cef8dde12ec 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 2bab72008a9..cef8dde12ec 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 2bab72008a9..cef8dde12ec 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 2bab72008a9..cef8dde12ec 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 old mode 100755 new mode 100644 diff --git a/mkspecs/macx-pbuilder/qplatformdefs.h b/mkspecs/macx-pbuilder/qplatformdefs.h index f9bc2920dda..c13bf512b87 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 old mode 100755 new mode 100644 diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h index 2bab72008a9..cef8dde12ec 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 850e4f28eb6..faf2beb7bdd 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 66679c4d820..56f52f04bfc 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 162e75e42b8..b97e2d51e24 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 51a0d5bd7bc..fe0230afd93 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 dabcda2c5a3..d5fa0bffe94 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 61e5a9234a0..ed5ca4ebddf 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 05a877c8ffc..1ce441f2ccb 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 bb0681af020..76a188792d3 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 18b87208c00..9b00cce85f5 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 aeb99071c40..c0fcc538331 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 37a61d66919..b4131eaea0a 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 f99952e2be5..9f6e33355fb 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 f99952e2be5..9f6e33355fb 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 abce75cd209..f76ea1db841 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 abce75cd209..f76ea1db841 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 589b3bf3523..107535c6a37 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 1b5dcc3d79a..70f47bfdb05 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 336453dfdec..a903c8ceae8 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 701c3301449..f7f0d3b16a6 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 701c3301449..f7f0d3b16a6 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 db691159679..63b72927c6f 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 8b50f92746a..a524bb5fbc1 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 0484a3366ad..71ddfd7460b 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 0484a3366ad..71ddfd7460b 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 06641b567f7..ee5db1c3cd7 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 0c71265ede1..4be41b1e6c0 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 0c71265ede1..4be41b1e6c0 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 0c71265ede1..4be41b1e6c0 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 0c71265ede1..4be41b1e6c0 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 7ceb75ae59d..19dafe2bfc4 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 7ceb75ae59d..19dafe2bfc4 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 7ceb75ae59d..19dafe2bfc4 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 6dcdfdeacfa..975c6af6350 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 e1dfe710c28..6aecf9138d7 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 0538e868b76..7f41c8aab3f 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 99349bfc8df..15d6be5666e 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 e14f8d044a3..8f42708c1d2 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 36eacb2b39e..55d2b7c65a9 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 65218be812c..bd969aef8d2 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 4a5a75d7cc5..d13e7be877a 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 ec11b7c39db..339e85239a8 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 ec11b7c39db..339e85239a8 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 00000000000..f2d9c333963 --- /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 00000000000..1cda0cf32f6 --- /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 similarity index 82% rename from config.tests/unix/icd/icd.cpp rename to mkspecs/wince70embedded-armv4i-msvc2008/qplatformdefs.h index 4582ba36297..cd9eac32740 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 +#include "../common/wince/qplatformdefs.h" -#include -#include - -#include -#include - -#include - -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 00000000000..f2d9c333963 --- /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 00000000000..febd1835214 --- /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 similarity index 80% rename from tests/auto/v8/v8test.h rename to mkspecs/wince70embedded-x86-msvc2008/qplatformdefs.h index 7d389f85a87..cd9eac32740 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 -#else -#include -#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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 364f57b8421..cd9eac32740 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 647c78edb99..286e2ebcbcd 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 404b2c7171d..e7677860012 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 28dbe1cc554..443dba390aa 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 f68e3bf46de..bc8356e178a 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 2307150ff2d..64d068a6e68 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 f9fdb3885bd..e3d1d695982 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 0927a2e2288..67646186e74 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 b7aec00c303..d6b2235e31c 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 &vars = tmp_proj.variables(); - for(QMap::Iterator it = vars.begin(); + QHash &vars = tmp_proj.variables(); + for(QHash::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 9d814dfd139..f4568be0f72 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 keys; + QHash 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 3ad240db014..564d44d98f4 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 &v = project->variables(); + QHash &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 &v = project->variables(); + QHash &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 &v = project->variables(); + QHash &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 &v = project->variables(); + QHash &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 &v = project->variables(); + QHash &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 &vars = libinfo.variables(); - for(QMap::Iterator it = vars.begin(); it != vars.end(); ++it) + QHash &vars = libinfo.variables(); + for(QHash::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 &vars = project->variables(); + t << endl; + + QStringList outlist; + QHash &vars = project->variables(); QStringList &exports = project->values("QMAKE_EXTRA_VARIABLES"); - for(QMap::Iterator it = vars.begin(); it != vars.end(); ++it) { - for(QStringList::Iterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) { + for (QHash::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 26b5f0e6593..4324a9455a8 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 4f4c1ff57e5..85fbe1e3933 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 d6e5a14e466..963ade85e94 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 f06a46b8212..e60d1c44ecb 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 &vars = project->variables(); - for(QMap::Iterator it = vars.begin(); it != vars.end(); ++it) { + QHash &vars = project->variables(); + for(QHash::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 basevars; + QHash 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 91c93644bc4..babf2f0ec66 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 b43d7a1c229..ddbee4b39ad 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 &v = project->variables(); + QHash &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 b8aff4a10c1..562b108dc96 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 cb4e67e8caf..c5e43b05525 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 04ee0ee873c..12b42f7bf20 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 3582ef1776e..173be72919e 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 f8278424d5f..086636f219b 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 c38af03a762..603c4132441 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 29381eb7f4b..c82259e5ae0 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 1dbfa077245..fda1ca41870 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 4435c5f389a..de95ad10be8 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 bd5e5d137cd..5e9d06dd9f6 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 dd4e34d9678..f75ea05567d 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 99f7279cc2a..c758d5eb812 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 85a642badc0..96c230e98c6 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 uniqDeps; + QHash 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 950176d00d0..7a530c8e5a3 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 0a3f5fb27cc..55d3fa8455f 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 &vars = tmp_proj.variables(); - for(QMap::Iterator it = vars.begin(); + QHash &vars = tmp_proj.variables(); + for(QHash::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::ConstIterator it = project->variables().begin(); it != project->variables().end(); ++it) + for(QHash::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 5c3cb89b781..35ac670c622 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 extraCompilerSources; - QMap extraCompilerOutputs; + QHash extraCompilerSources; + QHash extraCompilerOutputs; bool usePCH; VCProjectWriter *projectWriter; diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp index 429025f801a..5d2047fd2fd 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 702dca3652b..0c43a0a8d87 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 62466e203d2..11927dbd94f 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 d3513aa41e7..1e8b706088d 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 4a35b215e81..1b39f38203c 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 e1c744c0dfe..6560ebc7b6c 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 561f4aaf6a0..99015177b27 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 fd043d4e3d4..f5edff3cebf 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 > QMakeMetaInfo::cache_vars; +QHash > 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 &v = proj.variables(); - for(QMap::Iterator it = v.begin(); it != v.end(); ++it) { + QHash &v = proj.variables(); + for(QHash::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 32ca5ed4a64..d20fc979243 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 +#include #include #include @@ -52,9 +52,9 @@ class QMakeMetaInfo { bool readLibtoolFile(const QString &f); bool readPkgCfgFile(const QString &f); - QMap vars; + QHash vars; QString meta_type; - static QMap > cache_vars; + static QHash > 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 &variables(); + QHash &variables(); }; inline bool QMakeMetaInfo::isEmpty(const QString &v) @@ -92,7 +92,7 @@ inline QString QMakeMetaInfo::first(const QString &v) #endif } -inline QMap &QMakeMetaInfo::variables() +inline QHash &QMakeMetaInfo::variables() { return vars; } inline bool QMakeMetaInfo::libExists(QString lib) diff --git a/qmake/option.cpp b/qmake/option.cpp index c3e89de818e..8ad8a22f794 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 23fc9543da4..ffccb8efc5a 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 f1d000f05e2..eb2b10b92f5 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 #include #include -#include #include #ifdef Q_OS_UNIX #include @@ -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 qmake_expandFunctions() +QHash qmake_expandFunctions() { - static QMap *qmake_expand_functions = 0; + static QHash *qmake_expand_functions = 0; if(!qmake_expand_functions) { - qmake_expand_functions = new QMap; - qmakeAddCacheClear(qmakeDeleteCacheClear >, (void**)&qmake_expand_functions); + qmake_expand_functions = new QHash; + qmakeAddCacheClear(qmakeDeleteCacheClear >, (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 qmake_testFunctions() +QHash qmake_testFunctions() { - static QMap *qmake_test_functions = 0; + static QHash *qmake_test_functions = 0; if(!qmake_test_functions) { - qmake_test_functions = new QMap; + qmake_test_functions = new QHash; 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 &place); + bool eval(QMakeProject *p, QHash &place); }; -bool ParsableBlock::eval(QMakeProject *p, QMap &place) +bool ParsableBlock::eval(QMakeProject *p, QHash &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 vars; - QMap *calling_place; + QHash vars; + QHash *calling_place; QStringList return_value; int scope_level; bool cause_return; bool exec(const QList &args, - QMakeProject *p, QMap &place, QStringList &functionReturn); + QMakeProject *p, QHash &place, QStringList &functionReturn); virtual bool continueBlock() { return !cause_return; } }; bool FunctionBlock::exec(const QList &args, - QMakeProject *proj, QMap &place, + QMakeProject *proj, QHash &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 &place); + bool exec(QMakeProject *p, QHash &place); virtual bool continueBlock() { return !cause_next && !cause_break; } }; -bool IteratorBlock::exec(QMakeProject *p, QMap &place) +bool IteratorBlock::exec(QMakeProject *p, QHash &place) { bool ret = true; QStringList::Iterator it; @@ -621,12 +620,12 @@ QMakeProject::~QMakeProject() { if(own_prop) delete prop; - for(QMap::iterator it = replaceFunctions.begin(); it != replaceFunctions.end(); ++it) { + for(QHash::iterator it = replaceFunctions.begin(); it != replaceFunctions.end(); ++it) { if(!it.value()->deref()) delete it.value(); } replaceFunctions.clear(); - for(QMap::iterator it = testFunctions.begin(); it != testFunctions.end(); ++it) { + for(QHash::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 *vars) +QMakeProject::init(QMakeProperty *p, const QHash *vars) { if(vars) base_vars = *vars; @@ -650,14 +649,14 @@ QMakeProject::init(QMakeProperty *p, const QMap *vars) reset(); } -QMakeProject::QMakeProject(QMakeProject *p, const QMap *vars) +QMakeProject::QMakeProject(QMakeProject *p, const QHash *vars) { init(p->properties(), vars ? vars : &p->variables()); - for(QMap::iterator it = p->replaceFunctions.begin(); it != p->replaceFunctions.end(); ++it) { + for(QHash::iterator it = p->replaceFunctions.begin(); it != p->replaceFunctions.end(); ++it) { it.value()->ref(); replaceFunctions.insert(it.key(), it.value()); } - for(QMap::iterator it = p->testFunctions.begin(); it != p->testFunctions.end(); ++it) { + for(QHash::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 &place, int numLines) +QMakeProject::parse(const QString &t, QHash &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 &place, int num parser.file.toLatin1().constData(), parser.line_no, func.toLatin1().constData()); return false; } - QMap *map = 0; + QHash *map = 0; if(func == "defineTest") map = &testFunctions; else @@ -1184,7 +1183,7 @@ QMakeProject::parse(const QString &t, QMap &place, int num } bool -QMakeProject::read(QTextStream &file, QMap &place) +QMakeProject::read(QTextStream &file, QHash &place) { int numLines = 0; bool ret = true; @@ -1227,7 +1226,7 @@ QMakeProject::read(QTextStream &file, QMap &place) } bool -QMakeProject::read(const QString &file, QMap &place) +QMakeProject::read(const QString &file, QHash &place) { parser_info pi = parser; reset(); @@ -1520,7 +1519,7 @@ void QMakeProject::validateModes() } bool -QMakeProject::isActiveConfig(const QString &x, bool regex, QMap *place) +QMakeProject::isActiveConfig(const QString &x, bool regex, QHash *place) { if(x.isEmpty()) return true; @@ -1594,7 +1593,7 @@ QMakeProject::isActiveConfig(const QString &x, bool regex, QMap &place) +QMakeProject::doProjectTest(QString str, QHash &place) { QString chk = remove_quotes(str); if(chk.isEmpty()) @@ -1623,13 +1622,13 @@ QMakeProject::doProjectTest(QString str, QMap &place) bool QMakeProject::doProjectTest(QString func, const QString ¶ms, - QMap &place) + QHash &place) { return doProjectTest(func, split_arg_list(params), place); } QMakeProject::IncludeStatus -QMakeProject::doProjectInclude(QString file, uchar flags, QMap &place) +QMakeProject::doProjectInclude(QString file, uchar flags, QHash &place) { enum { UnknownFormat, ProFormat, JSFormat } format = UnknownFormat; if(flags & IncludeFlagFeature) { @@ -1766,14 +1765,14 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QMap &place) + QHash &place) { return doProjectExpand(func, split_arg_list(params), place); } QStringList QMakeProject::doProjectExpand(QString func, QStringList args, - QMap &place) + QHash &place) { QList 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 > &dependencies, QHash &dependees, - QStringList &rootSet, QMap &place) + QStringList &rootSet, QHash &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 args_list, - QMap &place) + QHash &place) { func = func.trimmed(); if(replaceFunctions.contains(func)) { @@ -1931,7 +1930,7 @@ QMakeProject::doProjectExpand(QString func, QList args_list, QString file = args[0], seek_var = args[1]; file = Option::fixPathToLocalOS(file); - QMap tmp; + QHash 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 args_list, parser.file.toLatin1().constData(), parser.line_no); } else { - const QMap *source = &place; + const QHash *source = &place; if(args.count() == 2) { if(args.at(1) == "Global") { source = &vars; @@ -1970,7 +1969,7 @@ QMakeProject::doProjectExpand(QString func, QList args_list, QString tmp; tmp.sprintf(".QMAKE_INTERNAL_TMP_VAR_%d", x++); ret = QStringList(tmp); - QStringList &lst = (*((QMap*)&place))[tmp]; + QStringList &lst = (*((QHash*)&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 args_list, } bool -QMakeProject::doProjectTest(QString func, QStringList args, QMap &place) +QMakeProject::doProjectTest(QString func, QStringList args, QHash &place) { QList args_list; for(int i = 0; i < args.size(); ++i) { @@ -2294,7 +2293,7 @@ QMakeProject::doProjectTest(QString func, QStringList args, QMap args_list, QMap &place) +QMakeProject::doProjectTest(QString func, QList args_list, QHash &place) { func = func.trimmed(); @@ -2580,7 +2579,7 @@ QMakeProject::doProjectTest(QString func, QList args_list, QMap tmp; + QHash 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 args_list, QMap symbols; + QHash symbols; stat = doProjectInclude(file, flags|IncludeFlagNewProject, symbols); if(stat == IncludeSuccess) { - QMap out_place; - for(QMap::ConstIterator it = place.begin(); it != place.end(); ++it) { + QHash out_place; + for(QHash::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::ConstIterator it = symbols.begin(); it != symbols.end(); ++it) { + for(QHash::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 args_list, QMap &place) +QMakeProject::doProjectCheckReqs(const QStringList &deps, QHash &place) { bool ret = false; for(QStringList::ConstIterator it = deps.begin(); it != deps.end(); ++it) { @@ -2773,14 +2772,14 @@ QMakeProject::doProjectCheckReqs(const QStringList &deps, QMap tmp = vars; + QHash tmp = vars; return doProjectTest(v, tmp); } bool QMakeProject::test(const QString &func, const QList &args) { - QMap tmp = vars; + QHash tmp = vars; return doProjectTest(func, args, tmp); } @@ -2788,7 +2787,7 @@ QStringList QMakeProject::expand(const QString &str) { bool ok; - QMap tmp = vars; + QHash 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 tmp = vars; + QHash 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 &args) { - QMap tmp = vars; + QHash tmp = vars; return doProjectExpand(func, args, tmp); } bool -QMakeProject::doVariableReplace(QString &str, QMap &place) +QMakeProject::doVariableReplace(QString &str, QHash &place) { bool ret; str = doVariableReplaceExpand(str, place, &ret).join(QString(Option::field_sep)); @@ -2825,7 +2824,7 @@ QMakeProject::doVariableReplace(QString &str, QMap &place) } QStringList -QMakeProject::doVariableReplaceExpand(const QString &str, QMap &place, bool *ok) +QMakeProject::doVariableReplaceExpand(const QString &str, QHash &place, bool *ok) { QStringList ret; if(ok) @@ -3015,7 +3014,7 @@ QMakeProject::doVariableReplaceExpand(const QString &str, QMap &place) +QStringList &QMakeProject::values(const QString &_var, QHash &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::ConstIterator it = vars.constFind(varMap(v)); + QHash::ConstIterator it = vars.constFind(varMap(v)); return it == vars.constEnd() || it->isEmpty(); } diff --git a/qmake/project.h b/qmake/project.h index 68110a8448a..8a49eb584dc 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 #include #include -#include +#include #include QT_BEGIN_NAMESPACE @@ -76,7 +76,7 @@ class QMakeProject QStack function_blocks; IteratorBlock *iterator; FunctionBlock *function; - QMap testFunctions, replaceFunctions; + QHash testFunctions, replaceFunctions; bool recursive; bool own_prop; @@ -84,8 +84,8 @@ class QMakeProject QString pfile, cfile; QMakeProperty *prop; void reset(); - QMap vars, base_vars, cache; - bool parse(const QString &text, QMap &place, int line_count=1); + QHash vars, base_vars, cache; + bool parse(const QString &text, QHash &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 &place); + IncludeStatus doProjectInclude(QString file, uchar flags, QHash &place); - bool doProjectCheckReqs(const QStringList &deps, QMap &place); - bool doVariableReplace(QString &str, QMap &place); - QStringList doVariableReplaceExpand(const QString &str, QMap &place, bool *ok=0); - void init(QMakeProperty *, const QMap *); - QStringList &values(const QString &v, QMap &place); + bool doProjectCheckReqs(const QStringList &deps, QHash &place); + bool doVariableReplace(QString &str, QHash &place); + QStringList doVariableReplaceExpand(const QString &str, QHash &place, bool *ok=0); + void init(QMakeProperty *, const QHash *); + QStringList &values(const QString &v, QHash &place); void validateModes(); public: QMakeProject() { init(0, 0); } QMakeProject(QMakeProperty *p) { init(p, 0); } - QMakeProject(QMakeProject *p, const QMap *nvars=0); - QMakeProject(const QMap &nvars) { init(0, &nvars); } - QMakeProject(QMakeProperty *p, const QMap &nvars) { init(p, &nvars); } + QMakeProject(QMakeProject *p, const QHash *nvars=0); + QMakeProject(const QHash &nvars) { init(0, &nvars); } + QMakeProject(QMakeProperty *p, const QHash &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 &place); + bool doProjectTest(QString str, QHash &place); bool doProjectTest(QString func, const QString ¶ms, - QMap &place); + QHash &place); bool doProjectTest(QString func, QStringList args, - QMap &place); + QHash &place); bool doProjectTest(QString func, QList args, - QMap &place); + QHash &place); QStringList doProjectExpand(QString func, const QString ¶ms, - QMap &place); + QHash &place); QStringList doProjectExpand(QString func, QStringList args, - QMap &place); + QHash &place); QStringList doProjectExpand(QString func, QList args, - QMap &place); + QHash &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 &args); bool isActiveConfig(const QString &x, bool regex=false, - QMap *place=NULL); + QHash *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 &variables(); // No compat mapping and magic, obviously + QHash &variables(); // No compat mapping and magic, obviously bool isRecursive() const { return recursive; } protected: friend class MakefileGenerator; - bool read(const QString &file, QMap &place); - bool read(QTextStream &file, QMap &place); + bool read(const QString &file, QHash &place); + bool read(QTextStream &file, QHash &place); }; Q_DECLARE_METATYPE(QMakeProject*) @@ -188,7 +188,7 @@ inline QString QMakeProject::first(const QString &v) return vals.first(); } -inline QMap &QMakeProject::variables() +inline QHash &QMakeProject::variables() { return vars; } QT_END_NAMESPACE diff --git a/qmake/property.cpp b/qmake/property.cpp index 29e38578384..c1efef0d2b6 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 -#include #include #include #include diff --git a/qmake/property.h b/qmake/property.h index 5c1c28ff38d..22a8957e53e 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 351ef486a02..a24c2f7c924 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 80998383232..f3c0ff62efb 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 b1d21691050..c46dde3a0fb 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 d2b1cf7ce04..01a41a5b476 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 fc64b027bbd..b901da5dcf9 100644 --- a/src/3rdparty/sqlite/sqlite3.c +++ b/src/3rdparty/sqlite/sqlite3.c @@ -13539,6 +13539,16 @@ static void clearYMD_HMS_TZ(DateTime *p){ #endif #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 @@ -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 index d28b6a02482..00000000000 --- a/src/3rdparty/v8 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d28b6a024826aaa48a8b3e69c096d01c91aff2c9 diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in index 154069411ab..e97493f65d0 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 b7f785b7160..abfe49ec84f 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_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) +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}) + 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(_current ${_defines}) + 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(Q_WS_WIN) - -ENDMACRO(QT5_GET_MOC_FLAGS) + 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_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() -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) +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 ... ) +# qt5_wrap_cpp(outfiles inputfile ... ) -MACRO (QT5_WRAP_CPP outfiles ) - # get include dirs - QT5_GET_MOC_FLAGS(moc_flags) +function(QT5_WRAP_CPP outfiles ) + # get include dirs + qt5_get_moc_flags(moc_flags) - set(options) - set(oneValueArgs) - set(multiValueArgs OPTIONS) + set(options) + set(oneValueArgs) + set(multiValueArgs OPTIONS) - cmake_parse_arguments(_WRAP_CPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + 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) + 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 ... ) +# qt5_add_resources(outfiles inputfile ... ) -MACRO (QT5_ADD_RESOURCES outfiles ) +function(QT5_ADD_RESOURCES outfiles ) - set(options) - set(oneValueArgs) - set(multiValueArgs OPTIONS) + set(options) + set(oneValueArgs) + set(multiValueArgs OPTIONS) - cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - set(rcc_files ${_RCC_UNPARSED_ARGUMENTS}) - set(rcc_options ${_RCC_OPTIONS}) + 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 "]*>" "" _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) + 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 "]*>" "" _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 b529359f71c..040715f54a5 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, 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; } } +int QUnifiedTimer::runningAnimationCount() +{ + int count = 0; + for (int i = 0; i < animationTimers.count(); ++i) + count += animationTimers.at(i)->runningAnimationCount(); + return count; +} + void QUnifiedTimer::registerProfilerCallback(void (*cb)(qint64)) { profilerCallback = cb; } -void QUnifiedTimer::updateAnimationTimer() +void QUnifiedTimer::localRestart() { - QUnifiedTimer *inst = QUnifiedTimer::instance(false); - if (inst) - inst->restartAnimationTimer(); + if (insideRestart) + return; + + if (!pausedAnimationTimers.isEmpty() && (animationTimers.count() + animationTimersToStart.count() == pausedAnimationTimers.count())) { + driver->stop(); + 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(); + } + } -void QUnifiedTimer::restartAnimationTimer() +void QUnifiedTimer::restart() { - if (runningLeafAnimations == 0 && !runningPauseAnimations.isEmpty()) { - int closestTimeToFinish = closestPauseAnimationTimeToFinish(); - if (closestTimeToFinish < 0) { - qDebug() << runningPauseAnimations; - qDebug() << closestPauseAnimationTimeToFinish(); - } - driver->stop(); - animationTimer.start(closestTimeToFinish, this); - isPauseTimerActive = true; - } else if (!driver->isRunning() || isPauseTimerActive) { - driver->start(); - isPauseTimerActive = false; - } else if (runningLeafAnimations == 0) - driver->stop(); + 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) + 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::resumeAnimationTimer(QAbstractAnimationTimer *timer) +{ + if (!timer->isPaused) return; - if (QAbstractAnimationPrivate::get(animation)->isPause) { - runningPauseAnimations << animation; - } else - runningLeafAnimations++; + timer->isPaused = false; + QUnifiedTimer *inst = QUnifiedTimer::instance(); + inst->pausedAnimationTimers.removeOne(timer); + inst->localRestart(); } -void QUnifiedTimer::unregisterRunningAnimation(QAbstractAnimation *animation) -{ - if (QAbstractAnimationPrivate::get(animation)->isGroup) - return; - - if (QAbstractAnimationPrivate::get(animation)->isPause) - runningPauseAnimations.removeOne(animation); - else - runningLeafAnimations--; - Q_ASSERT(runningLeafAnimations >= 0); -} - -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, 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 456c017bba5..4c20d25a53d 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 7e7571bc58f..2b2d5b88725 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,6 +184,72 @@ public: void setSlowModeEnabled(bool enabled) { slowMode = enabled; } void setSlowdownFactor(qreal factor) { slowdownFactor = factor; } + void installAnimationDriver(QAnimationDriver *driver); + void uninstallAnimationDriver(QAnimationDriver *driver); + bool canUninstallAnimationDriver(QAnimationDriver *driver); + + void restart(); + void updateAnimationTimers(qint64 currentTick); + + //useful for profiling/debugging + 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; + + QAnimationDriver *driver; + QDefaultAnimationDriver defaultDriver; + + QBasicTimer pauseTimer; + + 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; + + QList animationTimers, animationTimersToStart; + QList 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. @@ -180,47 +262,22 @@ public: */ static void updateAnimationTimer(); - void installAnimationDriver(QAnimationDriver *driver); - void uninstallAnimationDriver(QAnimationDriver *driver); - bool canUninstallAnimationDriver(QAnimationDriver *driver); - void restartAnimationTimer(); - void updateAnimationsTime(qint64 timeStep); + void updateAnimationsTime(qint64 delta); //useful for profiling/debugging int runningAnimationCount() { return animations.count(); } - void registerProfilerCallback(void (*cb)(qint64)); -protected: - void timerEvent(QTimerEvent *); +private Q_SLOTS: + void startAnimations(); + void stopTimer(); private: - friend class QDefaultAnimationDriver; - friend class QAnimationDriver; - - QAnimationDriver *driver; - QDefaultAnimationDriver defaultDriver; - - QBasicTimer animationTimer; - // timer used to delay the check if we should start/stop the animation timer - QBasicTimer startStopAnimationTimer; - - ElapsedTimer time; - qint64 lastTick; - int timingInterval; int currentAnimationIdx; bool insideTick; - bool consistentTiming; - bool slowMode; - - // 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; + bool startAnimationPending; + bool stopTimerPending; QList 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 0d2eac2ebb2..5993eda3076 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 75696713749..69a2686b691 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 d2e2498a87a..8415610bdcc 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 6e942e0257c..6e21efbc7ff 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 74eb36f4cd3..b03163cfbbf 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 cb8b3ae1909..73fed5541c4 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 0f1e07e1f16..fe5bafa3bda 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 827f1694ad5..7f8a2ddf268 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 481b79d196e..d34242739e2 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 28fc837f332..f41b96ce64d 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 c8c69720e9c..83f7c3f0fad 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 8b32d6b76dd..a991a38823a 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 40201a9a32d..07b2e3b8fca 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 33af063bc9b..87cdc044b29 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 7dfb4bddc1b..8984abbe039 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 3c92219b2ae..4176b4f4286 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 a8868d13cee..940cdbfe39b 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 31f3925499f..7dd09d4480e 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 30612cef11c..0eaeb5a15be 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 e474a656426..78292e7e495 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 7ce0eea0767..94129cb1060 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 26db10d9941..f6b100c1700 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 edb80473e1c..97d68cba70f 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 cd1585ecbc6..b4013dfff5a 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 60c9a83881b..a66b785e307 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 86d50c79a59..0c1db6f394a 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 aa2189162c3..da8d480a4f3 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 794a397b77a..dfc0605cff6 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 4a10b25012e..9e81eb0bc0e 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 a99a84b32a2..b44b9f23f51 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 905ccd7d997..66e12cc95b2 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 0f270090666..b5856102b24 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 2a18042a263..d602e83e64f 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 dd465db18b3..260f48d563d 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 3554cd43016..814eefb3764 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 78d5fc7dd32..749cc0fd36c 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 21026ee4406..4784b634fc5 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 74dc6cfbb2f..86376062a23 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 2565451a414..0abc29cdb00 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 86230054b93..53a81864bf9 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 e3cab66dc6c..0782ab3f366 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 f957297769c..e83124bf4e6 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 e26cf65ecdc..a973fe1b57a 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 8b025adfd51..97cef3c457a 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 8fbbb2e709e..200ca14aeea 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 c0f957b8acd..bb9afe38d77 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 079dd2db16f..e167c7c6e3a 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 a764a31c71f..ca50eb1bf0d 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 3ca19178639..14238a6f106 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 ab4386a6754..feb172e68d1 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 0162ebccfd9..6cb91f07886 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 706dea6f4f5..13d6764d368 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 4807c69905d..667e58124e1 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 f58119ebdff..3681655285a 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 abbf0a932e4..c2627c825f2 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 c1f0f332d6c..b552392b648 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 612093b81cb..5f695a90937 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 d78b5b628ea..448afbd34e1 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 71859aeaece..85848d04a01 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 46d7dd46da5..96f4d7f1119 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 ff14e67c831..76c3f98b42e 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 b852cf576c7..ea21fa28981 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 f81ac1d8214..c61ac2181b4 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 fb27f6ddfd1..428e7d4bbec 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 5a9742e192e..fb2d89eeacf 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 e66f424e433..e17b21a507f 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 9ae450b848e..d529be1215b 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 3c69ab0dd78..d95fcfc601a 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 f7930e72f60..71eded6d08d 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 d24b4d4cfda..757351f1960 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 fc28c97c674..6d0ceb3c952 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 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 42fac98a71c..465caea62ff 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); } /*! @@ -1314,17 +1283,6 @@ QList QTextCodec::aliases() const adjust the remainingChars and invalidChars members of the struct. */ -/*! - 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 015c0941f2e..c4f1a09726a 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 aliases() const; diff --git a/src/corelib/codecs/qtextcodec_p.h b/src/corelib/codecs/qtextcodec_p.h index ed09c4d1ac0..03d9d3dfaf6 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 c8a7357edc1..00000000000 --- 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 -#include -#include - -#include - -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 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 aliases() const { return QList(); } -private: - QByteArray m_name; -}; - -Q_GLOBAL_STATIC(QThreadStorage,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 buf; - QT_TRAP_THROWING(buf.reset(converter()->ConvertCharacterSetIdentifierToStandardNameL(m_charsetId, qt_s60GetRFs()))) - if (buf) - return QByteArray(reinterpret_cast(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 QSymbianTextCodec::aliases() const -{ - QList 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(str); - } - - QString UnicodeText(len2, Qt::Uninitialized); - TPtrC8 remainderOfForeignText; - remainderOfForeignText.Set(reinterpret_cast(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(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(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(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(outputBuffer.data() + bomofs + initial_size), outputBuffer.size() - bomofs); - - TPtrC16 UnicodeText(reinterpret_cast(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 > 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 buf; - QT_TRAP_THROWING(buf.reset(converter->ConvertCharacterSetIdentifierToStandardNameL(charsetId, qt_s60GetRFs()))) - QByteArray name; - if (buf && buf->Length()) { - name = QByteArray(reinterpret_cast(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(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 91b172d591d..4eb075c5f28 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 d80b173c8c9..9a00bbc9fae 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 868136605e5..c158ad2dc5b 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 b55d8bf288e..b74b38c429c 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 34e4695a260..d279f8591c0 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 982a3d198ae..737697f5d6f 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 5bffd66fc31..81655502e90 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 911fb7ecc52..6407fc39e73 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 f54b335403d..63033080a1d 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 b92a47a33d9..2acd1f46fd4 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 7b5275f5f84..96567c35ebd 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 18990ae2f04..d46aa3e7e76 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 ba838a8b66d..4fc1987f658 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 e405896f0bf..e0f197c7e78 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 a5f723c1002..efd7d941014 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 e90bff1e9bc..4898779c335 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 9ac335bc831..e5f7dc0efb7 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 34ef16bc107..d4b3bda9568 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 c139c7a8b2d..b6385b5a8f9 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 237152c0d33..3bc4c05684e 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 1c100a52063..c926d9ffe7f 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 dff5e2e5ed1..0b3ddd829d4 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 d8c5f43a48b..c9ed9bbdfa3 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 95dc5b70be9..61d13423a3d 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 1e09221ceef..1468b4e4e6a 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 c9ea79bd344..9b3b177ce81 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 49c053caf7b..6adb05574b8 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 ebd0ccdcd84..f078a0646a2 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 166d5c8527a..d7350451735 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 48f5b60de1b..ed8a1543ce1 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 e563b3bd3ad..13983fd2a49 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 ebc37e79366..1a30d2e3e35 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 89f561c2ac9..e9d76448a7d 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 627aca27bdf..c2a9f0a3e2f 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 87952da8828..676a5424715 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 ef51b2adcbe..06da3804307 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 c1270e953b1..51390028b05 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 9beb0b9c352..8a02497dddd 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 71a47164d25..559e7bb4902 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 38d01ee11a1..98edd2d9ecb 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 91e77d9effb..2cc31b99431 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 d857073b421..1b5677b9fa6 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 db50ec92c6d..009dfcdee20 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 edb5ecb8497..17c15d42b14 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 bc3ab9a0249..727eea00188 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 65367e9be18..8a2553a6a64 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 f9ecf923886..96207d1cd87 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 ace1eea5084..30440243def 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 18ae261809a..6b943ab422a 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 4f34169d758..84a5ec59d98 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 8a17af55f21..66d66cb78f8 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 307db594267..3133d3c2520 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 e0b8a8fb6d2..50554148346 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 6b861d4d174..4eae2f50ec2 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 615598b3789..f8fc49ddbf2 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 #endif -#if defined(Q_OS_SYMBIAN) -#include -#include -#include -#include -# include "private/qcore_symbian_p.h" - -_LIT(qt_S60Filter, "Series60v?.*.sis"); -_LIT(qt_symbianSystemInstallDir, "z:\\system\\install\\"); -#endif - QT_BEGIN_NAMESPACE @@ -969,22 +958,6 @@ bool qSharedBuild() the application is run (Mac only). */ -/*! - \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 @@ -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 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 @@ -2037,18 +1865,6 @@ static void qDefaultMsgHandler(QtMsgType, const char *buf) QString fstr = QString::fromLatin1(buf); fstr += QLatin1Char('\n'); OutputDebugString(reinterpret_cast (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(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(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 - -/*! \macro QT_TRAP_THROWING(function) +/*! + \macro Q_DECL_CONSTEXPR \relates - \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. + 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. - \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() + It expands to "constexpr" if your compiler supports that C++11 keyword, or to nothing + otherwise. */ -/*! \macro QT_TRYCATCH_ERROR(error, function) - \relates - \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) - \relates - \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 - -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 - \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() -*/ -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 - \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 - \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(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 e22d66628ec..fd5c5d6315f 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 struct QIntegerForSizeof: QIntegerForSize { }; typedef QIntegerForSizeof::Unsigned quintptr; typedef QIntegerForSizeof::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 /* 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 {}; #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 +{ +public: + enum { + isPointer = false, + isComplex = false, + isStatic = false, + isLarge = false, + isDummy = false + }; +}; + template class QTypeInfo { @@ -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 7868d3db59d..375349c18d9 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 8d1607d0458..21fcdeb62c4 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 466f70614d5..2ec6938f980 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(oldptr)[-1] : 0; if (alignment <= sizeof(void*)) { // special, fast case - void **newptr = static_cast(qRealloc(actualptr, newsize + sizeof(void*))); + void **newptr = static_cast(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 b6e2384ea00..ee4000498f8 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 63ac4a95bee..3add1a48c7e 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 621b9885b0d..7677d86db07 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 bd8c2a42370..9f5ce691b1b 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 336b348f3f0..94d64409b38 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 0926e02af15..a16e6be567d 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 ba4041e765e..3081645b6b8 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 ef116216794..1d31e5d794f 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 d2b250d336f..c315d336068 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 cc167a2aa65..c9bab7d435f 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 dd9a7073163..72b8339e395 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 35e7b6809cb..a5e605b9d50 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 9227a2f3dcc..b222c7d6ca9 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 0e0a47267a3..fb2528e45f9 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 1ae0573f6c0..30cf8417add 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 d372d54e363..2501e98d1d3 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 ed8abdd8398..7e856ad6471 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 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(); - - // 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.isEmpty()) - mimeType = QLatin1String(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); } + + 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()); + } - return QPair(mimeType,payload); + return true; } QT_END_NAMESPACE diff --git a/src/corelib/io/qdataurl_p.h b/src/corelib/io/qdataurl_p.h index d666d9e52a3..b92f363e1de 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 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 a27716b8dce..8ca15b19ca4 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 67221c7ce29..54663d5d65c 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 &list) #endif { debug.nospace() << '('; - for (Q_TYPENAME QList::size_type i = 0; i < list.count(); ++i) { + for (typename QList::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 &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 44992fcd141..d6979bad578 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 e246f2f1aa8..5b058272e7f 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 a34427a7166..7865c1d5a3c 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 0b02adb4b6a..28aa4a0f59a 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 5ad8acb4960..be034153723 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 d5118525cf0..95d842da42a 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 554b2954e11..903ba13963c 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 3072f5bc9ee..24013c3c3d4 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 1ea6c8d50ac..226b5d35607 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 ef4573132c0..6d6da3527af 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 23ea0225f5c..64e644f29fe 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 72900ec0334..ab10f30585f 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 0d1556522a4..f5e61ff29fd 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 bbd4c4c0201..af32a1c5758 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 c8c1dfdc841..00000000000 --- 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 -#include - -#include -#include -#include - -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(: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(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 9778b526ac6..901aaf8f914 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 10ba95e97f0..d724429f6bc 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(¤tUserTrusteeW, 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(tokenBuffer)->User.Sid; + DWORD sidLen = ::GetLengthSid(tokenSid); + currentUserSID = reinterpret_cast(qMalloc(sidLen)); + if (::CopySid(sidLen, currentUserSID, tokenSid)) + ptrBuildTrusteeWithSidW(¤tUserTrusteeW, 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 2f37542f662..11b73dd7455 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 8d524c087ee..61902f77d0d 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 6f2d1e1c6ef..7df59884592 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 4347f6acba6..00000000000 --- 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 - -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 6987660ea39..d0eb04a1455 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 5fff4f82c68..1f5cf356a02 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 64749e38899..6ed5cec9549 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 9739067c068..4abb4f3cc12 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 #include #include -#include #include #include + +#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 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 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 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 fit(files); - while (fit.hasNext()) { - QHash::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 dit(directories); - while (dit.hasNext()) { - QHash::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()) { - qWarning("QFileSystemWatcher::addPaths: list is empty"); - return; - } QStringList p = paths; + QMutableListIterator 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 QStringList(); + } + 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 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 763c8de0d66..7b7dbe98c5e 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 46c3b464676..00000000000 --- 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#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(&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(&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::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 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 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::Iterator iter = fdToDirectory.find(fd); - if(iter == fdToDirectory.end()) { - QHash::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 95da8979742..00000000000 --- 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 - -#include "qfilesystemwatcher.h" -#include "qfilesystemwatcher_fsevents_p.h" - -#ifndef QT_NO_FILESYSTEMWATCHER - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -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 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 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(clientCallBackInfo); - QMutexLocker locker(&watcher->mutex); - CFArrayRef paths = static_cast(eventPaths); - for (size_t i = 0; i < numEvents; ++i) { - const QString path = QCFString::toQString( - static_cast(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 3830002c0ac..00000000000 --- 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 -#include -#include -#include -#include -#include -#include - -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 PathInfoList; -typedef QHash 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 ef302243daa..ff732bc70eb 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(¬ifier, 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 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 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 0abd205237b..8b3ce62c462 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 -#include +#include +#include +#include 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 pathToID; QHash idToPath; + QSocketNotifier notifier; }; diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp index 387a7f7c4bc..fd7bfa2b275 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) { + connect(¬ifier, SIGNAL(activated(int)), SLOT(readFromKqueue())); + fcntl(kqfd, F_SETFD, FD_CLOEXEC); - - 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; - } } 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 it(p); - while (it.hasNext()) { - QString path = it.next(); - int fd; + QMutableListIterator 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; - } - } - fcntl(fd, F_SETFD, FD_CLOEXEC); - - 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; - } - } 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"); - ::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); - } - - pathToID.insert(path, id); - idToPath.insert(id, path); + 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); - if (!isRunning()) - start(); - else - write(kqpipe[1], "@", 1); + 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; + } + } 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"); + ::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); + } + + 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; + if (pathToID.isEmpty()) + return p; - QMutableListIterator 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; + QMutableListIterator 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; - ::close(id < 0 ? -id : id); + ::close(id < 0 ? -id : id); - it.remove(); - if (id < 0) - directories->removeAll(path); - else - files->removeAll(path); - } - isEmpty = pathToID.isEmpty(); - } - - 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 fd9d820e7dc..9bd9378c0c6 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 #include #include +#include #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 pathToID; QHash idToPath; + QSocketNotifier notifier; }; QT_END_NAMESPACE diff --git a/src/corelib/io/qfilesystemwatcher_p.h b/src/corelib/io/qfilesystemwatcher_p.h index e136273b361..9f403b308f2 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 #include -#include 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 00000000000..23dca140d65 --- /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 + +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 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 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 fit(files); + while (fit.hasNext()) { + QHash::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 dit(directories); + while (dit.hasNext()) { + QHash::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 similarity index 55% rename from src/corelib/io/qfilesystemwatcher_dnotify_p.h rename to src/corelib/io/qfilesystemwatcher_polling_p.h index f759e87d89e..3b3272a8902 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 +#include +#include +#include +#include + #include "qfilesystemwatcher_p.h" -#ifndef QT_NO_FILESYSTEMWATCHER - -#include -#include -#include -#include - QT_BEGIN_NAMESPACE -class QDnotifyFileSystemWatcherEngine : public QFileSystemWatcherEngine +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()); + } + }; + + QHash files, directories; + public: - virtual ~QDnotifyFileSystemWatcherEngine(); - - static QDnotifyFileSystemWatcherEngine *create(); - - void run(); + 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 files; - }; - - QDnotifyFileSystemWatcherEngine(); - - QMutex mutex; - QHash pathToFD; - QHash fdToDirectory; - QHash parentToFD; + QTimer timer; }; - - QT_END_NAMESPACE -#endif // QT_NO_FILESYSTEMWATCHER -#endif // QFILESYSTEMWATCHER_DNOTIFY_P_H + +#endif // QFILESYSTEMWATCHER_POLLING_P_H + diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp deleted file mode 100644 index 6e5e91114c9..00000000000 --- 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 - -#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 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 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 4e94623844c..e82a9a5b566 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 #include #include +#include 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 &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"< &h = pathInfoForHandle[handle]; + if (!FindNextChangeNotification(handle)) { + const DWORD error = GetLastError(); + qErrnoWarning(error, "%s", qPrintable(msgFindNextFailed(h))); + } QMutableHashIterator it(h); while (it.hasNext()) { QHash::iterator x = it.next(); diff --git a/src/corelib/io/qfilesystemwatcher_win_p.h b/src/corelib/io/qfilesystemwatcher_win_p.h index 3e9938a4906..8e6b779b931 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 #include +#include #include #include #include @@ -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 0d23a27909d..a49ea84603f 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 2e0b1eb9237..0ed883a4a76 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 323ab58335c..2d162f6a7d8 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 deccb01bfbe..782930a52c2 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 89c08aeca7a..158c6f3a23b 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 681e55dff7e..b09518865e4 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 f2b3e5f5346..5dc96ea8a2d 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 8e1b2d5d0c8..ef530f379f9 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 7d4afca8503..4b34ad4f696 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 3ccad6254a0..2515fe57050 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 113ba4b4bb1..ba711493c6a 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 c7c94243b93..ded605681ee 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 d2aee16c453..8f76e0e4b91 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 b2a5a4cbffb..96a1edefd8a 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 5bebff089ec..7e0fecc3209 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 9fd0c3aa658..00000000000 --- 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 -#include -#include -#include -#include "qplatformdefs.h" - -#include "qdir.h" -#include "qstring.h" -#include "qprocess.h" -#include "qprocess_p.h" -#include "private/qeventdispatcher_symbian_p.h" - -#include -#include -#include -#include - -#include - - -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 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(programName.constData())); - TPtrC cmdline_ptr(reinterpret_cast(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(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(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::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 5fc69ed2cd5..f01df3c0782 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 d47e55dee45..8c6444d1738 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,23 +473,9 @@ 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,23 +486,9 @@ 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 00000000000..16a34469e74 --- /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 +#include +#include +#include +#include +#include + +#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 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, ¤tProcId); + 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 6ad15788b0b..0ae3f9e6478 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 1edc7a4f137..452e141e41e 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 e19bad1e037..3317ef5fffb 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 519f46199c1..3603c648191 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 4beda142eda..f558319dc27 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 37bd8c460de..81dc5bb0784 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 b144a9af4c3..65aeb895230 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 11e0c3c1035..6bb815c561c 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 5d62c839a67..cf348122dcd 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 bbc7dd16779..2cac379ec6e 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 43ae5c07ab3..5accb61cc57 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 d91da9de2f8..bae7b3f7b52 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 84fc81494c9..f37c21ed397 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 b1c5869f71c..5aef52eabad 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 e9093649f32..e3f86b7134b 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 78ec1774ebe..15d3258a9a1 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 da0d1214c45..22c0a271e4c 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 677be45f656..eb645fabe8a 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 282b8978135..20956d2cf04 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 177f73def37..8c7f57fddf9 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 db038855a80..0531d4017d6 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 7d06ca4b17d..2c725f17fdb 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 77c0a158232..0a94f3015ba 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 c921a89b309..53b4df47299 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 e62cd0a85b2..75a88e8048d 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 00000000000..8da786ebd96 --- /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 +#include +#include +#include +#include + +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 similarity index 54% rename from src/corelib/io/qfilesystemwatcher_symbian_p.h rename to src/corelib/io/qwindowspipereader_p.h index 0b317a062fb..e78d6b29ad8 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 +#include +#include +#include -#ifndef QT_NO_FILESYSTEMWATCHER +#include -#include "qhash.h" -#include "qmutex.h" -#include "qwaitcondition.h" - -#include -#include +QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QSymbianFileSystemWatcherEngine; +QT_MODULE(Core) -class QNotifyChangeEvent : public CActive -{ -public: - QNotifyChangeEvent(RFs &fsSession, const TDesC &file, QSymbianFileSystemWatcherEngine *engine, - bool aIsDir, TInt aPriority = EPriorityStandard); - ~QNotifyChangeEvent(); +class QWinEventNotifier; - bool isDir; - -private: - void RunL(); - void DoCancel(); - - RFs &fsSession; - TPath watchedPath; - QSymbianFileSystemWatcherEngine *engine; - - int failureCount; -}; - -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); + + void startAsyncRead(); + bool completeAsyncRead(); + +Q_SIGNALS: + void winError(ulong, const QString &); + void readyRead(); + void pipeClosed(); + +private Q_SLOTS: + bool readEventSignalled(); private: - friend class QNotifyChangeEvent; - void emitPathChanged(QNotifyChangeEvent *e); + DWORD checkPipeState(); - void startWatcher(); - - QHash activeObjectToPath; - QMutex mutex; - QWaitCondition syncCondition; - bool watcherStarted; - QNotifyChangeEvent *currentAddEvent; - QNotifyChangeEvent *currentRemoveEvent; +private: + HANDLE handle; + OVERLAPPED overlapped; + QWinEventNotifier *dataReadNotifier; + qint64 readBufferMaxSize; + QRingBuffer readBuffer; + int actualReadBufferSize; + bool readSequenceStarted; + QTimer *emitReadyReadTimer; + bool pipeBroken; + static const qint64 initialReadBufferSize = 4096; }; -#endif // QT_NO_FILESYSTEMWATCHER - 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 cb802f1d911..a1765b41781 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 dfcb77e17ce..44a1d04b4ee 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 00000000000..83ec4c5dbf2 --- /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 similarity index 99% rename from src/corelib/kernel/qabstractitemmodel.cpp rename to src/corelib/itemmodels/qabstractitemmodel.cpp index 99455371ae9..dec1fe4cef9 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,25 +1831,29 @@ 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; return supportedDropActions(); } +/*! + \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 &roleNames) + +/*! + \internal + */ +void QAbstractItemModel::doSetRoleNames(const QHash &roleNames) { Q_D(QAbstractItemModel); d->roleNames = roleNames; @@ -2154,7 +2164,7 @@ void QAbstractItemModel::setRoleNames(const QHash &roleNames) \sa setRoleNames() */ -const QHash &QAbstractItemModel::roleNames() const +QHash QAbstractItemModel::roleNames() const { Q_D(const QAbstractItemModel); return d->roleNames; diff --git a/src/corelib/kernel/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h similarity index 96% rename from src/corelib/kernel/qabstractitemmodel.h rename to src/corelib/itemmodels/qabstractitemmodel.h index 0aa81446021..46dd7880cea 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 &roleNames() const; + virtual QHash 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 &roleNames); +#if QT_DEPRECATED_SINCE(5,0) + QT_DEPRECATED void setRoleNames(const QHash &theRoleNames) + { + doSetRoleNames(theRoleNames); + } +#endif private: + void doSetRoleNames(const QHash &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 similarity index 99% rename from src/corelib/kernel/qabstractitemmodel_p.h rename to src/corelib/itemmodels/qabstractitemmodel_p.h index 86680dd0bc3..3c5d8e5d207 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 similarity index 99% rename from src/widgets/itemviews/qabstractproxymodel.cpp rename to src/corelib/itemmodels/qabstractproxymodel.cpp index 47810d6cc79..46678403dbd 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 similarity index 96% rename from src/widgets/itemviews/qabstractproxymodel.h rename to src/corelib/itemmodels/qabstractproxymodel.h index a24755b5567..000fc8d0ce7 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 similarity index 94% rename from src/widgets/itemviews/qabstractproxymodel_p.h rename to src/corelib/itemmodels/qabstractproxymodel_p.h index 9bd38d1cdce..7d6e49a235e 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 similarity index 99% rename from src/widgets/itemviews/qidentityproxymodel.cpp rename to src/corelib/itemmodels/qidentityproxymodel.cpp index c891565794c..6edb5df0fb7 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 similarity index 97% rename from src/widgets/itemviews/qidentityproxymodel.h rename to src/corelib/itemmodels/qidentityproxymodel.h index 8a8422244f3..9d3c0858293 100644 --- a/src/widgets/itemviews/qidentityproxymodel.h +++ b/src/corelib/itemmodels/qidentityproxymodel.h @@ -43,7 +43,7 @@ #ifndef QIDENTITYPROXYMODEL_H #define QIDENTITYPROXYMODEL_H -#include +#include #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 similarity index 99% rename from src/widgets/itemviews/qitemselectionmodel.cpp rename to src/corelib/itemmodels/qitemselectionmodel.cpp index 08470a43005..33217354986 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 similarity index 96% rename from src/widgets/itemviews/qitemselectionmodel.h rename to src/corelib/itemmodels/qitemselectionmodel.h index ea0528a5900..3b3fa8d1e87 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::toSet() with MSVC inline uint qHash(const QItemSelectionRange &) { return 0; } -class Q_WIDGETS_EXPORT QItemSelection : public QList +class Q_CORE_EXPORT QItemSelection : public QList { 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 similarity index 98% rename from src/widgets/itemviews/qitemselectionmodel_p.h rename to src/corelib/itemmodels/qitemselectionmodel_p.h index 5eb9ecccda9..919c4fab05a 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 similarity index 99% rename from src/widgets/itemviews/qsortfilterproxymodel.cpp rename to src/corelib/itemmodels/qsortfilterproxymodel.cpp index f29ad7bc570..3a63c923d33 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 similarity index 97% rename from src/widgets/itemviews/qsortfilterproxymodel.h rename to src/corelib/itemmodels/qsortfilterproxymodel.h index bbeec1470ca..c8cd5814208 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 +#include #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 similarity index 98% rename from src/widgets/itemviews/qstringlistmodel.cpp rename to src/corelib/itemmodels/qstringlistmodel.cpp index 9faaca0dd46..5e72977d208 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 + #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 similarity index 93% rename from src/widgets/itemviews/qstringlistmodel.h rename to src/corelib/itemmodels/qstringlistmodel.h index 5efed8753eb..c70072de9ea 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 #include -#include 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 8b69d771b72..1139e3074af 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,48 +99,33 @@ 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 +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, 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 + HEADERS += \ + kernel/qcore_unix_p.h \ + kernel/qcrashhandler_p.h \ + kernel/qeventdispatcher_unix_p.h \ + kernel/qtimerinfo_unix_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 + } contains(QT_CONFIG, clock-gettime):include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri) } -symbian { - 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 - - HEADERS += \ - kernel/qcore_unix_p.h \ - kernel/qcrashhandler_p.h \ - kernel/qeventdispatcher_symbian_p.h \ - kernel/qcore_symbian_p.h -} - vxworks { SOURCES += \ kernel/qfunctions_vxworks.cpp @@ -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 b936ac4ed20..1d4bf3cf1fd 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. */ -int QAbstractEventDispatcher::registerTimer(int interval, QObject *object) + +/*! + \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, 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 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 36bd1be368b..80e77c02aff 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 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 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 registeredTimers(QObject *object) const = 0; diff --git a/src/corelib/kernel/qabstracteventdispatcher_p.h b/src/corelib/kernel/qabstracteventdispatcher_p.h index 31c579d8652..6e1c81ae336 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 8efeea6fae7..a52152875f3 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 f13848cb858..84b232e7660 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 +#include 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 0814c1aec77..88cc83ce48b 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 adbad83cadf..4efd6bf6536 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 5b52ec22a10..00000000000 --- 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 -#include -#include -#include "qcore_symbian_p.h" -#include -#include - -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(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(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(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(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(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(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 84c6fed4dbe..00000000000 --- 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 -#include -#include -#include -#include -#include -#include -#include - -#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(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 ¶m) const { return data() == param.data(); } - inline bool operator!=(const QHBufC ¶m) 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 -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 socketMap; - QHash 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 f30fceeb68e..08a2f69bf30 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 e7259d29c97..9ac4f5c4804 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 7ff82b1bca1..05f26cc87fb 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(qMalloc(tailLen + 1)); + apaTail = reinterpret_cast(malloc(tailLen + 1)); qMemCopy(apaTail, reinterpret_cast(apaCmdLine.Ptr()), tailLen); apaTail[tailLen] = '\0'; apaArgv = new QVector(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(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(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 3d6aa170fd2..abbc6e58219 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 8fec4bfcb23..289c2f4bdb2 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 d61a5a1bf5c..692e460114e 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 1b51e6f5687..3cba628a410 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 2081d5cc178..937c9898cdd 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 213f0e4a589..bf8207283b6 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 ba1106276ac..cbdf13c9923 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 bac95251fd9..3854f7d53ae 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 f12d42842b9..7b5120a0dc6 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 979e215997a..8f4577be249 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 2383bb9dcc2..a23dc989678 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 07739153919..f34570007b3 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 419f2f3dc01..facacb07a8c 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 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 1d7ecce9ae8..00000000000 --- 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 -#include -#include -#include - -#include -#include - -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::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::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 toRemove; - for (QHash::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(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::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::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::registeredTimers ( QObject * object ) const -{ - QList list; - for (QHash::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 aos, int ms) -{ - QVector 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 e327a9cdc56..00000000000 --- 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -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 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 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 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 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 m_timerList; - QHash 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 m_deferredSocketEvents; - //deferred until idle - QList 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 27efac69855..26a9e9f0caa 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 > QTimerInfoList::registeredTimers(QObject *object) const -{ - QList > list; - for (int i = 0; i < count(); ++i) { - register const QTimerInfo * const t = at(i); - if (t->obj == object) - list << QPair(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 = ¤tTimerInfo; - - 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 122f17f9e9f..f4862bd9c30 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 @@ -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 -{ -#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 > 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 registeredTimers(QObject *object) const; diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index afee536d025..3ade11ca60a 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 (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 4a7aac0c045..833fcf13ac3 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 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 37c06a20931..05e284ba34c 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 5bd41463528..a76ba0ad93d 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 410df0f1e8a..76272154b32 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 c4c1fd0e2e4..a2f5d928f0b 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 1e75fec25d0..88686e976ae 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 845825740e3..c39e6ad4587 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 d7d4ebe3821..22dc7bcc06d 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 f0f1a071b9a..8fd09679ced 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 5569b7c7774..d634cba67e1 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 376a707d66a..fb5087092c8 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 cc20f96166f..793138a5e0c 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 5b21740d3a6..b2de54ee324 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 3178ee1b264..d7cbab8e3a7 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 47ccc9e2b7f..61ca373745e 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 fd4e5d25c82..abfdc442c05 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 b99907e822a..45fb95495ca 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 dd098e8a64a..601d52529fa 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 classInfoNames; QList classInfoValues; QList enumerators; -#ifdef Q_NO_DATA_RELOCATION - QList relatedMetaObjects; -#else QList 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(buf + size); size += sizeof(QMetaObjectExtraData); ALIGN(size, QMetaObject *); -#ifdef Q_NO_DATA_RELOCATION - QMetaObjectAccessor *objects = - reinterpret_cast(buf + size); -#else const QMetaObject **objects = reinterpret_cast(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(qMalloc(size)); + char *buf = reinterpret_cast(malloc(size)); memset(buf, 0, size); buildMetaObject(d, buf, false); return reinterpret_cast(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 a563d6a5cd1..bf3fd2499ca 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 76537c79cbf..375c7b75bbc 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 { static const bool IsAvailable = fals template<> struct TypeDefiniton { static const bool IsAvailable = false; }; template<> struct TypeDefiniton { static const bool IsAvailable = false; }; template<> struct TypeDefiniton { static const bool IsAvailable = false; }; +template<> struct TypeDefiniton { static const bool IsAvailable = false; }; #endif #ifdef QT_NO_REGEXP template<> struct TypeDefiniton { static const bool IsAvailable = false; }; @@ -239,6 +242,16 @@ template<> struct TypeDefiniton { static const bool IsAvailable = false \sa type(), typeName() */ +/*! + \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, 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 *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(data); + break; default: { const QVector * 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 * const ct = customTypes(); if (!ct) @@ -1091,6 +1123,12 @@ void *QMetaType::create(int type, const void *copy) #ifndef QT_BOOTSTRAPPED case QMetaType::QEasingCurve: return new NS(QEasingCurve)(*static_cast(copy)); +#endif + case QMetaType::QUuid: + return new NS(QUuid)(*static_cast(copy)); +#ifndef QT_BOOTSTRAPPED + case QMetaType::QModelIndex: + return new NS(QModelIndex)(*static_cast(copy)); #endif case QMetaType::Void: return 0; @@ -1188,6 +1226,12 @@ void *QMetaType::create(int type, const void *copy) #ifndef QT_BOOTSTRAPPED 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; @@ -1355,6 +1399,14 @@ void QMetaType::destroy(int type, void *data) case QMetaType::QEasingCurve: 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; @@ -1387,9 +1439,8 @@ void QMetaType::destroy(int type, void *data) } namespace { -template class TypeConstructor { - template::IsAccepted> + template::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::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::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 constructor(type, where); + TypeConstructor constructor(type, where); return QMetaTypeSwitcher::switcher(constructor, type, copy); } namespace { -template class TypeDestructor { - template::IsAccepted> + template::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::IsGui) { if (!qMetaTypeGuiHelper) return; dtor = qMetaTypeGuiHelper[type - QMetaType::FirstGuiType].destructor; - } else if (type >= QMetaType::FirstWidgetsType && type <= QMetaType::LastWidgetsType) { - Q_ASSERT(qMetaTypeWidgetsHelper); + } else if (QTypeModuleInfo::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 destructor(type); + TypeDestructor destructor(type); QMetaTypeSwitcher::switcher(destructor, type, where); } namespace { -template class SizeOf { - template::IsAccepted> + template::IsAccepted> struct SizeOfImpl { static int Size(const int) { return sizeof(T); } }; @@ -1566,13 +1611,11 @@ class SizeOf { struct SizeOfImpl { static int Size(const int type) { - if (type >= QMetaType::FirstGuiType && type <= QMetaType::LastGuiType) { - Q_ASSERT(qMetaTypeGuiHelper); + if (QTypeModuleInfo::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::IsWidget) { if (!qMetaTypeWidgetsHelper) return 0; return qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].size; @@ -1617,10 +1660,77 @@ private: */ int QMetaType::sizeOf(int type) { - SizeOf sizeOf(type); + SizeOf sizeOf(type); return QMetaTypeSwitcher::switcher(sizeOf, type, 0); } +namespace { +class Flags +{ + template::IsAccepted> + struct FlagsImpl + { + static quint32 Flags(const int) + { + return (!QTypeInfo::isStatic * QMetaType::MovableType) + | (QTypeInfo::isComplex * QMetaType::NeedsConstruction) + | (QTypeInfo::isComplex * QMetaType::NeedsDestruction); + } + }; + template + struct FlagsImpl + { + static quint32 Flags(const int type) + { + return Flags::undefinedTypeFlags(type); + } + }; +public: + Flags(const int type) + : m_type(type) + {} + template + quint32 delegate(const T*) { return FlagsImpl::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 * 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(QMetaTypeSwitcher::switcher(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 717e72c810d..843044eee66 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 void qMetaTypeDeleteHelper(T *t) { @@ -334,11 +347,20 @@ int qRegisterMetaType(const char *typeName typedef void(*DestructPtr)(T*); DestructPtr ipdptr = qMetaTypeDestructHelper; + QMetaType::TypeFlags flags; + if (!QTypeInfo::isStatic) + flags |= QMetaType::MovableType; + if (QTypeInfo::isComplex) { + flags |= QMetaType::NeedsConstruction; + flags |= QMetaType::NeedsDestruction; + } + return QMetaType::registerType(typeName, reinterpret_cast(dptr), reinterpret_cast(cptr), reinterpret_cast(ipdptr), reinterpret_cast(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 92311afc8eb..11139288d1d 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 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 \ { \ 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 struct Impl { static void *creator(const T *t) @@ -140,31 +150,6 @@ private: return new (where) T; } }; -public: - template - explicit QMetaTypeInterface(T *) - : creator(reinterpret_cast(Impl::creator)) - , deleter(reinterpret_cast(Impl::deleter)) - #ifndef QT_NO_DATASTREAM - , saveOp(reinterpret_cast(Impl::saver)) - , loadOp(reinterpret_cast(Impl::loader)) - #endif - , constructor(reinterpret_cast(Impl::constructor)) - , destructor(reinterpret_cast(Impl::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(QMetaTypeInterface::Impl::saver)), \ + /*loadOp*/(reinterpret_cast(QMetaTypeInterface::Impl::loader)), +#else +# define QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL(Type) +#endif + +#define QT_METATYPE_INTERFACE_INIT(Type) \ +{ \ + /*creator*/(reinterpret_cast(QMetaTypeInterface::Impl::creator)), \ + /*deleter*/(reinterpret_cast(QMetaTypeInterface::Impl::deleter)), \ + QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL(Type) \ + /*constructor*/(reinterpret_cast(QMetaTypeInterface::Impl::constructor)), \ + /*destructor*/(reinterpret_cast(QMetaTypeInterface::Impl::destructor)), \ + /*size*/(sizeof(Type)), \ + /*flags*/(!QTypeInfo::isStatic * QMetaType::MovableType) \ + | (QTypeInfo::isComplex * QMetaType::NeedsConstruction) \ + | (QTypeInfo::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 cba65049566..d3cf1024c39 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 9d1e03e9e8c..c43ef505fb7 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 e8f32ed43c3..60498b7ab86 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 e4ef826ffdd..bebdcac6621 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(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 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,14 +952,21 @@ QString QObject::objectName() const void QObject::setObjectName(const QString &name) { Q_D(QObject); - bool objectNameChanged = d->declarativeData && d->objectName != name; - - d->objectName = name; - - if (objectNameChanged) - d->declarativeData->objectNameChanged(d->declarativeData, this); + if (d->objectName != name) { + d->objectName = name; + if (d->declarativeData) + d->declarativeData->objectNameChanged(d->declarativeData, this); + emit objectNameChanged(d->objectName); + } } +/*! \fn void QObject::objectNameChanged(const QString &objectName) + + 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(e); QConnectionSenderSwitcher sw(this, const_cast(mce->sender()), mce->signalId()); @@ -1160,15 +1020,12 @@ bool QObject::event(QEvent *e) QThreadData *threadData = d->threadData; QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher; if (eventDispatcher) { - QList > timers = eventDispatcher->registeredTimers(this); + QList 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 >(timers)))); + Q_ARG(void*, (new QList(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 > *timerList = reinterpret_cast > *>(pointer); + QList *timerList = reinterpret_cast *>(pointer); QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher; for (int i = 0; i < timerList->size(); ++i) { - const QPair &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 307518d81e1..11f524180cd 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 @@ -214,7 +210,12 @@ public: reinterpret_cast(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast(0)); //compilation error if the arguments does not match. - typedef typename QtPrivate::CheckCompatibleArguments::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::value), + "Signal and slot arguments are not compatible."); + Q_STATIC_ASSERT_X((QtPrivate::AreArgumentsCompatible::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 SlotType; //compilation error if the arguments does not match. - typedef typename QtPrivate::CheckCompatibleArguments::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::value), + "Signal and slot arguments are not compatible."); + Q_STATIC_ASSERT_X((QtPrivate::AreArgumentsCompatible::value), + "Return type of the slot is not compatible with the return type of the signal."); return connectImpl(sender, reinterpret_cast(&signal), sender, 0, new QStaticSlotObject(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast(0)); //compilation error if the arguments does not match. - typedef typename QtPrivate::CheckCompatibleArguments::IncompatibleSignalSlotArguments EnsureCompatibleArguments; + Q_STATIC_ASSERT_X((QtPrivate::CheckCompatibleArguments::value), + "Signal and slot arguments are not compatible."); + return disconnectImpl(sender, reinterpret_cast(&signal), receiver, reinterpret_cast(&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 SignalType; return disconnectImpl(sender, reinterpret_cast(&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 660294b9564..44aaa9a2188 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::Arguments, FunctionPointer::Arguments>::IncompatibleSignalSlotArguments - The IncompatibleSignalSlotArguments type do not exist if the argument are incompatible and can - then produce error message. + Q_STATIC_ASSERT(CheckCompatibleArguments::Arguments, FunctionPointer::Arguments>::value) */ - template struct CheckCompatibleArgumentsHelper {}; - template struct CheckCompatibleArgumentsHelper : T {}; template struct AreArgumentsCompatible { static int test(A2); static char test(...); - static A2 dummy(); + static A1 dummy(); enum { value = sizeof(test(dummy())) == sizeof(int) }; }; template struct AreArgumentsCompatible { enum { value = false }; }; template struct AreArgumentsCompatible { enum { value = true }; }; + // void as a return value + template struct AreArgumentsCompatible { enum { value = true }; }; + template struct AreArgumentsCompatible { enum { value = true }; }; + template<> struct AreArgumentsCompatible { enum { value = true }; }; #ifndef Q_COMPILER_VARIADIC_TEMPLATES - template struct CheckCompatibleArguments{}; - template <> struct CheckCompatibleArguments { typedef bool IncompatibleSignalSlotArguments; }; - template struct CheckCompatibleArguments { typedef bool IncompatibleSignalSlotArguments; }; + template struct CheckCompatibleArguments { enum { value = false }; }; + template <> struct CheckCompatibleArguments { enum { value = true }; }; + template struct CheckCompatibleArguments { enum { value = true }; }; template struct CheckCompatibleArguments, List > - : CheckCompatibleArgumentsHelper, AreArgumentsCompatible< - typename RemoveConstRef::Type, typename RemoveConstRef::Type>::value > {}; + { + enum { value = AreArgumentsCompatible::Type, typename RemoveConstRef::Type>::value + && CheckCompatibleArguments::value }; + }; #else - template struct CheckCompatibleArguments{}; - template <> struct CheckCompatibleArguments, List<>> { typedef bool IncompatibleSignalSlotArguments; }; - template struct CheckCompatibleArguments> { typedef bool IncompatibleSignalSlotArguments; }; + template struct CheckCompatibleArguments { enum { value = false }; }; + template <> struct CheckCompatibleArguments, List<>> { enum { value = true }; }; + template struct CheckCompatibleArguments> { enum { value = true }; }; template struct CheckCompatibleArguments, List> - : CheckCompatibleArgumentsHelper, List>, AreArgumentsCompatible< - typename RemoveConstRef::Type, typename RemoveConstRef::Type>::value > {}; + { + enum { value = AreArgumentsCompatible::Type, typename RemoveConstRef::Type>::value + && CheckCompatibleArguments, List>::value }; + }; #endif diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index 5519a69c34f..dbd2e4fa37c 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 runningTimers; QList > 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 sharedRefcount; -#ifdef QT_JAMBI_BUILD - int *deleteWatch; -#endif }; diff --git a/src/corelib/kernel/qobjectcleanuphandler.cpp b/src/corelib/kernel/qobjectcleanuphandler.cpp index 512aa097ee6..8a0cc2840e0 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 601164f784a..5997f0e250b 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 bfb6808ad52..dfcc81be03c 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 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 c7fcf4f1e87..575dad9ed8e 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, 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 e9f302e317b..4c0aebb41d5 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 +#include QT_BEGIN_HEADER @@ -50,34 +50,35 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#if QT_DEPRECATED_SINCE(5,0) + template -class QPointer +class QT_DEPRECATED QPointer { - QObject *o; + QWeakPointer wp; + public: - inline QPointer() : o(0) {} - inline QPointer(T *p) : o(p) - { QMetaObject::addGuard(&o); } - inline QPointer(const QPointer &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 &p) : wp(p.wp) { } + inline ~QPointer() { } + inline QPointer &operator=(const QPointer &p) - { if (this != &p) QMetaObject::changeGuard(&o, p.o); return *this; } + { wp = p.wp; return *this; } inline QPointer &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(const_cast(o)); } + { return wp.data(); } inline T& operator*() const - { return *static_cast(const_cast(o)); } + { return *wp.data(); } inline operator T*() const - { return static_cast(const_cast(o)); } + { return wp.data(); } inline T* data() const - { return static_cast(const_cast(o)); } + { return wp.data(); } }; @@ -161,6 +162,8 @@ inline bool operator!= (int i, const QPointer &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 acb6044bac5..c5b1b567479 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 b2ce7e20f4a..d536e94fa1d 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 d5fafeff978..d3d3c023ba8 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 fdd513a4750..00000000000 --- 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 - -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 2bbda4933f6..fd435d7b97f 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 3cc14fe512f..c02ab15c88c 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 665b9e22b5f..7bdffd4153d 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 72593679a9e..04278b491c7 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 5e99d1d483c..60970f1cd27 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 07dc1298253..186979db4cf 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 71c28073413..708eba89a61 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 # endif +#else +# if (_WIN32_WCE >= 0x700) +# include +# endif #endif #ifdef Q_OS_WIN #include @@ -76,42 +80,6 @@ namespace { } #endif -static QString standardLibraryErrorString(int errorCode) -{ - const char *s = 0; - QString ret; - switch (errorCode) { - case 0: - break; - case EACCES: - s = QT_TRANSLATE_NOOP("QIODevice", "Permission denied"); - break; - case EMFILE: - s = QT_TRANSLATE_NOOP("QIODevice", "Too many open files"); - break; - case ENOENT: - s = QT_TRANSLATE_NOOP("QIODevice", "No such file or directory"); - break; - case ENOSPC: - 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); - #else - ret = QString::fromLocal8Bit(strerror(errorCode)); - #endif - break; } - } - if (s) { - // ######## this breaks moc build currently - // ret = QCoreApplication::translate("QIODevice", s); - ret = QString::fromLatin1(s); - } - return ret.trimmed(); -} - #ifdef Q_OS_WIN static QString windowsErrorString(int errorCode) { @@ -133,6 +101,46 @@ static QString windowsErrorString(int errorCode) } #endif +static QString standardLibraryErrorString(int errorCode) +{ + const char *s = 0; + QString ret; + switch (errorCode) { + case 0: + break; + case EACCES: + s = QT_TRANSLATE_NOOP("QIODevice", "Permission denied"); + break; + case EMFILE: + s = QT_TRANSLATE_NOOP("QIODevice", "Too many open files"); + break; + case ENOENT: + s = QT_TRANSLATE_NOOP("QIODevice", "No such file or directory"); + break; + case ENOSPC: + s = QT_TRANSLATE_NOOP("QIODevice", "No space left on device"); + break; + default: { + #ifdef Q_OS_WINCE + ret = windowsErrorString(errorCode); + #else + #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; } + } + if (s) { + // ######## this breaks moc build currently + // ret = QCoreApplication::translate("QIODevice", s); + ret = QString::fromLatin1(s); + } + return ret.trimmed(); +} + #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 0bcada7350a..2a90760197f 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 98ee6f42312..690a4e8b92d 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 1623215ec58..0cb69d5e7c7 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 d4e86e8866d..31fd596fd5e 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 96c19afcfc1..00000000000 --- 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 - -#include "qcore_symbian_p.h" -#include -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 5e533e7f0e9..cc86e335e50 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 30cab7ebfeb..aad78459d70 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 927aa672a18..2f9ccdae46f 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 9be661e42f1..da1cfe91b22 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() @@ -317,6 +316,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) { @@ -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 707bc83d3ce..6fb32f9bde0 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 00000000000..b89d4ccb30a --- /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 +#include + +#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 +# include +#endif + +#include + +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(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 <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 QTimerInfoList::registeredTimers(QObject *object) const +{ + QList 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 = ¤tTimerInfo; + + 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 00000000000..8a057dda604 --- /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 // 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 +{ +#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 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 2796902590f..aadf3a76e9d 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 43cd63d1da7..b1f378a8b5f 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 426be0b19be..23164ecac66 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 29717398a86..72229c0e634 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" @@ -73,6 +77,25 @@ QT_BEGIN_NAMESPACE # define FLT_DIG 6 #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 struct TypeDefiniton { @@ -82,6 +105,7 @@ struct TypeDefiniton { // Ignore these types, as incomplete #ifdef QT_BOOTSTRAPPED template<> struct TypeDefiniton { static const bool IsAvailable = false; }; +template<> struct TypeDefiniton { static const bool IsAvailable = false; }; #endif #ifdef QT_NO_GEOM_VARIANT template<> struct TypeDefiniton { static const bool IsAvailable = false; }; @@ -100,7 +124,9 @@ struct CoreTypesFilter { static const bool IsAccepted = QTypeModuleInfo::IsCore && TypeDefiniton::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(d)->toString(); break; + case QVariant::Uuid: + *str = v_cast(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(result) = QUuid(*v_cast(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(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(&v.data_ptr()); + QVariantDebugStream stream(dbg, d); + QMetaTypeSwitcher::switcher(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(a_ptr) == *static_cast(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(name), handler); +} + +Q_CORE_EXPORT void QVariantPrivate::unregisterHandler(const int /* Modules::Names */ name) +{ + handlerManager.unregisterHandler(static_cast(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 -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(qMetaTypeId()); + if (d.type == targetType) return *v_cast(&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(d, StringList, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1767,7 +1844,7 @@ QStringList QVariant::toStringList() const */ QString QVariant::toString() const { - return qVariantToHelper(d, String, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1778,7 +1855,7 @@ QString QVariant::toString() const */ QVariantMap QVariant::toMap() const { - return qVariantToHelper(d, Map, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1789,7 +1866,7 @@ QVariantMap QVariant::toMap() const */ QVariantHash QVariant::toHash() const { - return qVariantToHelper(d, Hash, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1805,7 +1882,7 @@ QVariantHash QVariant::toHash() const */ QDate QVariant::toDate() const { - return qVariantToHelper(d, Date, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1821,7 +1898,7 @@ QDate QVariant::toDate() const */ QTime QVariant::toTime() const { - return qVariantToHelper(d, Time, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1838,7 +1915,7 @@ QTime QVariant::toTime() const */ QDateTime QVariant::toDateTime() const { - return qVariantToHelper(d, DateTime, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1853,7 +1930,7 @@ QDateTime QVariant::toDateTime() const #ifndef QT_BOOTSTRAPPED QEasingCurve QVariant::toEasingCurve() const { - return qVariantToHelper(d, EasingCurve, handler); + return qVariantToHelper(d, handlerManager); } #endif @@ -1868,7 +1945,7 @@ QEasingCurve QVariant::toEasingCurve() const */ QByteArray QVariant::toByteArray() const { - return qVariantToHelper(d, ByteArray, handler); + return qVariantToHelper(d, handlerManager); } #ifndef QT_NO_GEOM_VARIANT @@ -1882,7 +1959,7 @@ QByteArray QVariant::toByteArray() const */ QPoint QVariant::toPoint() const { - return qVariantToHelper(d, Point, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1895,7 +1972,7 @@ QPoint QVariant::toPoint() const */ QRect QVariant::toRect() const { - return qVariantToHelper(d, Rect, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1908,7 +1985,7 @@ QRect QVariant::toRect() const */ QSize QVariant::toSize() const { - return qVariantToHelper(d, Size, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1921,7 +1998,7 @@ QSize QVariant::toSize() const */ QSizeF QVariant::toSizeF() const { - return qVariantToHelper(d, SizeF, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1934,7 +2011,7 @@ QSizeF QVariant::toSizeF() const */ QRectF QVariant::toRectF() const { - return qVariantToHelper(d, RectF, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1947,7 +2024,7 @@ QRectF QVariant::toRectF() const */ QLineF QVariant::toLineF() const { - return qVariantToHelper(d, LineF, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1960,7 +2037,7 @@ QLineF QVariant::toLineF() const */ QLine QVariant::toLine() const { - return qVariantToHelper(d, Line, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -1973,7 +2050,7 @@ QLine QVariant::toLine() const */ QPointF QVariant::toPointF() const { - return qVariantToHelper(d, PointF, handler); + return qVariantToHelper(d, handlerManager); } #endif // QT_NO_GEOM_VARIANT @@ -1988,7 +2065,7 @@ QPointF QVariant::toPointF() const */ QUrl QVariant::toUrl() const { - return qVariantToHelper(d, Url, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -2001,7 +2078,7 @@ QUrl QVariant::toUrl() const */ QLocale QVariant::toLocale() const { - return qVariantToHelper(d, Locale, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -2016,7 +2093,7 @@ QLocale QVariant::toLocale() const #ifndef QT_NO_REGEXP QRegExp QVariant::toRegExp() const { - return qVariantToHelper(d, RegExp, handler); + return qVariantToHelper(d, handlerManager); } #endif @@ -2030,7 +2107,7 @@ QRegExp QVariant::toRegExp() const */ QChar QVariant::toChar() const { - return qVariantToHelper(d, Char, handler); + return qVariantToHelper(d, handlerManager); } /*! @@ -2041,12 +2118,12 @@ QChar QVariant::toChar() const */ QBitArray QVariant::toBitArray() const { - return qVariantToHelper(d, BitArray, handler); + return qVariantToHelper(d, handlerManager); } template 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(); 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(d, handler, ok, d.data.i); + return qNumVariantToHelper(d, handlerManager, ok, d.data.i); } /*! @@ -2097,7 +2174,7 @@ int QVariant::toInt(bool *ok) const */ uint QVariant::toUInt(bool *ok) const { - return qNumVariantToHelper(d, handler, ok, d.data.u); + return qNumVariantToHelper(d, handlerManager, ok, d.data.u); } /*! @@ -2112,7 +2189,7 @@ uint QVariant::toUInt(bool *ok) const */ qlonglong QVariant::toLongLong(bool *ok) const { - return qNumVariantToHelper(d, handler, ok, d.data.ll); + return qNumVariantToHelper(d, handlerManager, ok, d.data.ll); } /*! @@ -2128,7 +2205,7 @@ qlonglong QVariant::toLongLong(bool *ok) const */ qulonglong QVariant::toULongLong(bool *ok) const { - return qNumVariantToHelper(d, handler, ok, d.data.ull); + return qNumVariantToHelper(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(d, handler, ok, d.data.d); + return qNumVariantToHelper(d, handlerManager, ok, d.data.d); } /*! @@ -2182,7 +2259,7 @@ double QVariant::toDouble(bool *ok) const */ float QVariant::toFloat(bool *ok) const { - return qNumVariantToHelper(d, handler, ok, d.data.f); + return qNumVariantToHelper(d, handlerManager, ok, d.data.f); } /*! @@ -2199,7 +2276,7 @@ float QVariant::toFloat(bool *ok) const */ qreal QVariant::toReal(bool *ok) const { - return qNumVariantToHelper(d, handler, ok, d.data.real); + return qNumVariantToHelper(d, handlerManager, ok, d.data.real); } /*! @@ -2210,7 +2287,7 @@ qreal QVariant::toReal(bool *ok) const */ QVariantList QVariant::toList() const { - return qVariantToHelper(d, List, handler); + return qVariantToHelper(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,12 +2497,24 @@ 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) @@ -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 02458a07e0e..35c584fa51c 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 + 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 inline QVariant qVariantFromValue(const T &t) { @@ -488,7 +490,7 @@ template inline T qvariant_cast(const QVariant &v) return *reinterpret_cast(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 3c2176856d8..015ca5b464e 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 #include +#include +#include #include "qmetatypeswitcher_p.h" QT_BEGIN_NAMESPACE +namespace { +template +struct QVariantIntegrator +{ + static const bool CanUseInternalSpace = sizeof(T) <= sizeof(QVariant::Private::Data) + && (!QTypeInfo::isStatic); +}; +Q_STATIC_ASSERT(QVariantIntegrator::CanUseInternalSpace); +Q_STATIC_ASSERT(QVariantIntegrator::CanUseInternalSpace); +Q_STATIC_ASSERT(QVariantIntegrator::CanUseInternalSpace); +} // namespace + #ifdef Q_CC_SUN // Sun CC picks the wrong overload, so introduce awful hack template inline T *v_cast(const QVariant::Private *nd, T * = 0) { QVariant::Private *d = const_cast(nd); - return ((sizeof(T) > sizeof(QVariant::Private::Data)) + return !QVariantIntegrator::CanUseInternalSpace ? static_cast(d->data.shared->ptr) - : static_cast(static_cast(&d->data.c))); + : static_cast(static_cast(&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 inline const T *v_cast(const QVariant::Private *d, T * = 0) { - return ((sizeof(T) > sizeof(QVariant::Private::Data)) + return !QVariantIntegrator::CanUseInternalSpace ? static_cast(d->data.shared->ptr) - : static_cast(static_cast(&d->data.c))); + : static_cast(static_cast(&d->data.c)); } template inline T *v_cast(QVariant::Private *d, T * = 0) { - return ((sizeof(T) > sizeof(QVariant::Private::Data)) + return !QVariantIntegrator::CanUseInternalSpace ? static_cast(d->data.shared->ptr) - : static_cast(static_cast(&d->data.c))); + : static_cast(static_cast(&d->data.c)); } #endif @@ -110,7 +124,7 @@ private: template inline void v_construct(QVariant::Private *x, const void *copy, T * = 0) { - if (sizeof(T) > sizeof(QVariant::Private::Data)) { + if (!QVariantIntegrator::CanUseInternalSpace) { x->data.shared = copy ? new QVariantPrivateSharedEx(*static_cast(copy)) : new QVariantPrivateSharedEx; x->is_shared = true; @@ -125,7 +139,7 @@ inline void v_construct(QVariant::Private *x, const void *copy, T * = 0) template inline void v_construct(QVariant::Private *x, const T &t) { - if (sizeof(T) > sizeof(QVariant::Private::Data)) { + if (!QVariantIntegrator::CanUseInternalSpace) { x->data.shared = new QVariantPrivateSharedEx(t); x->is_shared = true; } else { @@ -138,7 +152,7 @@ template inline void v_clear(QVariant::Private *d, T* = 0) { - if (sizeof(T) > sizeof(QVariant::Private::Data)) { + if (!QVariantIntegrator::CanUseInternalSpace) { //now we need to cast //because QVariant::PrivateShared doesn't have a virtual destructor delete static_cast*>(d->data.shared); @@ -159,24 +173,7 @@ class QVariantComparator { }; template struct FilteredComparator { - 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(a_ptr) == *static_cast(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 QVariantConstructor { - template + template::CanUseInternalSpace> struct CallConstructor {}; template - struct CallConstructor + struct CallConstructor { CallConstructor(const QVariantConstructor &tc) { @@ -310,11 +307,11 @@ class QVariantConstructor }; template - struct CallConstructor + struct CallConstructor { CallConstructor(const QVariantConstructor &tc) { - Q_STATIC_ASSERT(QTypeInfo::isComplex); + Q_STATIC_ASSERT(QTypeInfo::isComplex || sizeof(T) > sizeof(QVariant::Private::Data)); tc.m_x->data.shared = tc.m_copy ? new QVariantPrivateSharedEx(*static_cast(tc.m_copy)) : new QVariantPrivateSharedEx; 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 QVariantDebugStream +{ + template::IsAccepted> + struct Filtered { + Filtered(QDebug dbg, QVariant::Private *d) + { + dbg.nospace() << *v_cast(d); + } + }; + template + struct Filtered { + 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 + void delegate(const T*) + { + Filtered 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 1ef77cdf62a..e06e1d5b0a0 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 d265c8c1813..386a640434c 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 e3c6b308207..cfe9a9d1b58 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 510ffed567d..2f10807720f 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 647d97f173e..b7e4f3de160 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 749a7deddd4..9ae97c6313f 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 75d40f8c3f5..be40e66efd4 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 6a40b5b8189..f20abb660da 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 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 e3f557dd7d3..729277e8381 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 15825c699fa..45c8843d20d 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 d3b08e1acf3..ce6d645ca41 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 4eeb2fc441b..fd46a7107e4 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 52661671b5b..c9388c13373 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 1c24de32546..2149fa71795 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 591e36e20aa..1557df2eefd 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 -# 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/ 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 b8f40379c89..0854d3dcdf6 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 bb9c82a35a5..f949cc0f86a 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 3298f05b8f3..4015fb69587 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 6fca1b67099..e73508fce6f 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,8 +415,39 @@ 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 @@ -439,15 +501,6 @@ QUuid QUuid::fromRfc4122(const QByteArray &bytes) otherwise returns false. */ #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 @@ -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 b941079df0b..9efb2ba37cb 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 +#include 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 79b72ea5387..c2d24e3c00c 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 21169e4feee..33dbde23aa4 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 98b1d0a9b4a..cf86e0cbe9c 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 ff2b4b5978e..a8fdea2cfc2 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 dbe7f3aa385..fd1eedb72ec 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 57f962d77dd..4de0f4b8d62 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 63f89669b96..f55cdbc9278 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 434b72e76c0..173d24ef4ac 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 ed096df81d5..6c3dc9dda4f 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 c583c321835..c2bb2ee2181 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 9a18888c84e..652abd6600d 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 5f3a5dcf4c2..b45cd309352 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 1ba28e97f1d..e9ec058d53b 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 b915c2820c9..35662d88f86 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 c38177b7661..e681add086b 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 92862cbab6c..51a8a82b2d3 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 155e0f3d9d1..fd91dd4c6de 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 8bf928804b2..aadb4efcc7b 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 7dc9889dc0d..4f37bb0642a 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 4d3acc1341e..337659295e3 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 74b425361b4..daa2f467c1d 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 927389a33be..a24c71c1058 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 1238f480f42..b2a251038dc 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 3227f81e58f..88b16a22bfa 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 3cdb3c6d7b8..c2c9484cf64 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 eff2182e283..07350ecfcdc 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 +#include QT_BEGIN_HEADER diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index df36120d880..6c8ed3b897f 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 086a289569b..1d7e591b7d2 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 18ddd238191..9bb9c9061ed 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 2fdb2ec489d..1a561aa5d50 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 e385181e0f2..0cbc99adc68 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 b6930880154..a426d958f2e 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 781a632a615..b513b6e1adb 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 ef4e9560fbd..6be5e092d71 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 20449c24d46..90b89f9a170 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 similarity index 98% rename from src/corelib/thread/qbasicatomic.h rename to src/corelib/thread/qoldbasicatomic.h index d3e988d8c5d..2f952c9e0a4 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 e65a601369e..14a29c7edf4 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 f552e6f6d6f..54926111d5c 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) ** @@ -106,20 +106,13 @@ QT_BEGIN_NAMESPACE \sa QReadWriteLock() */ -/*! - 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 7bb63295224..cdbd7894a12 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 fda7bf44e67..125245bb4a3 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 acfd478a14e..12539a794d9 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 50d32c5f65c..4790a84bb67 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 1df768c1edb..9d48c4dbe53 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 baad7939696..597e29546a6 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 bbaf664a2db..094c9b0daf6 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 +class QPostEventList : public QVector { public: // recursion == recursion count for sendPostedEvents() @@ -106,12 +108,14 @@ public: QMutex mutex; inline QPostEventList() - : QList(), recursion(0), startOffset(0), insertionOffset(0) + : QVector(), 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::append; - using QList::insert; + using QVector::append; + using QVector::insert; }; #ifndef QT_NO_THREAD diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 6deae261c62..672b7cb976c 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 0c834cfff25..3184b18471f 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 09132928527..6dba8d670e9 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 172dff0b3d0..790f9a51eff 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 0a96689f0b8..7d4eb684ee8 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 00d4b0ff00b..f079e5a6ba5 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 dd85bf40234..91aea010d93 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 bf1ec5e5ba2..0106dbf13a8 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 d63bb914e1d..974e0866847 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 90a9caa9058..a1c656934d4 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 b11f4092a8e..3ba86b68386 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 5538180b37d..96811cc179b 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 3b66b9f4df8..83c81eca908 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 e56e4fc8ff7..47bf5da6190 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(qRealloc(d.data(), sizeof(QByteArray::Data) + alloc + 1)); + QByteArray::Data *p = static_cast(::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(qRealloc(d.data(), sizeof(QByteArray::Data) + len + 1)); + QByteArray::Data *p = static_cast(::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(&shared_empty.ba); } else { int len = qstrlen(str); - d = static_cast(qMalloc(sizeof(Data) + len + 1)); + d = static_cast(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(&shared_empty.ba); } else { - d = static_cast(qMalloc(sizeof(Data) + size + 1)); + d = static_cast(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(&shared_null.ba); } else { - d = static_cast(qMalloc(sizeof(Data) + size + 1)); + d = static_cast(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(qMalloc(sizeof(Data) + size + 1)); + d = static_cast(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(&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(qMalloc(sizeof(Data) + size + 1)); + Data *x = static_cast(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(qMalloc(sizeof(Data) + alloc + 1)); + Data *x = static_cast(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(qRealloc(d, sizeof(Data) + alloc + 1)); + Data *x = static_cast(::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(&shared_null.ba); d->ref.ref(); } @@ -3885,7 +3885,7 @@ QByteArray QByteArray::fromRawData(const char *data, int size) } else if (!size) { x = const_cast(&shared_empty.ba); } else { - x = static_cast(qMalloc(sizeof(Data) + 1)); + x = static_cast(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 dcaa6153f97..2409ff12325 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 43924a764e5..fbe54fb9b31 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 0eb50bb77d6..9acfa0d5813 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 22ec47fb9df..2708df3d521 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 29281408631..fc5b8a0a9f8 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 hash; - void *unused; // ### Qt5: remove int mx, total; inline void unlink(Node &n) { @@ -123,7 +122,7 @@ private: template inline QCache::QCache(int amaxCost) - : f(0), l(0), unused(0), mx(amaxCost), total(0) {} + : f(0), l(0), mx(amaxCost), total(0) {} template inline void QCache::clear() diff --git a/src/corelib/tools/qcache.qdoc b/src/corelib/tools/qcache.qdoc index 397c5fbb0cd..9c8aef15dfc 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 ec4b0cce588..5109bf22a41 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 1bc6962ca1c..0e02d109f6a 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 ed6ab4332c1..51ba07d8560 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 eef1f74b8c1..29601149e47 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 e192edf0ab8..3c43b3abe7a 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 89b3bab7c6e..350c785e8b9 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 QT_BEGIN_NAMESPACE @@ -154,6 +155,28 @@ void QCryptographicHash::addData(const QByteArray &data) addData(data.constData(), data.length()); } +/*! + 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. diff --git a/src/corelib/tools/qcryptographichash.h b/src/corelib/tools/qcryptographichash.h index b40e8cc25ba..64d54838fa6 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 3c8848ba0f2..d20b07589e5 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) ** @@ -565,18 +565,6 @@ QString QDate::shortMonthName(int month, QDate::MonthNameType type) return QString(); } -/*! - 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 @@ -622,21 +610,6 @@ QString QDate::longMonthName(int month, MonthNameType type) return QString(); } -/*! - 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 @@ -677,21 +650,6 @@ QString QDate::shortDayName(int weekday, MonthNameType type) return QString(); } -/*! - 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 @@ -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 62bdcab7cca..ba52f7455c9 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 c20f2123f9a..38aa748c6cd 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 4337c4a594e..a3614f9b6c9 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 326e7f6e616..ef18ae20bc4 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 039c76960ea..087252a9264 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 6e5be84c004..73ec8d637ed 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 165efa96f2f..3c7bb197d71 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 4b1275fe5c5..f8f124f6a9e 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 dd5909f76fe..4ae3f3d1abe 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 8a046063f91..7f3d4f635c1 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 cd076a60d73..183171e3063 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 bbbdb25e49d..57530cf3c89 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 5af0bb18079..2105e5af567 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 324cd481ed8..4eb65655572 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 f67b094c2d5..a8da47b71c8 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 373b59872c6..82ac8a0591e 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 ec9bd42c83a..0fdb1ad7946 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 c789e23ddce..0747940bf2d 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 6594a2f8744..0e33aecbe46 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 0f67652fb51..161123cfffd 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 af2eda08504..956cbf9ce8a 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 e5919363a06..acfbcd07ebf 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 55d229d3517..966b74ddfa4 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 2a3695bb355..2afe1ab9699 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 #include "qlist.h" #include "qtools_p.h" + #include +#include 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(qMalloc(DataHeaderSize + alloc * sizeof(void *))); + Data* t = static_cast(::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(qMalloc(DataHeaderSize + alloc * sizeof(void *))); + Data* t = static_cast(::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(qRealloc(d, DataHeaderSize + alloc * sizeof(void *))); + Data *x = static_cast(::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 5c8a58a196d..d192d31234e 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 d2bb752c6de..1dc384985b2 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 55dd55b9843..9bc4ea70b8c 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 fd139c3bec9..0337c708a99 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 95b23a29a6a..a29e40079a8 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 a04b0bfc5f6..0e220ff0009 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 82b6b00e5eb..ffcbbbca4b7 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 b607038aaf6..0b229e5e3f5 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 a4f6cc84584..abe437fc896 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 750379c014c..8a57a418e42 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 #include +#ifdef Q_OS_WINCE +# include "qfunctions_wince.h" // for _control87 +#endif + #if defined(Q_OS_LINUX) && !defined(__UCLIBC__) # include #endif diff --git a/src/corelib/tools/qlocale_tools_p.h b/src/corelib/tools/qlocale_tools_p.h index 996b612208e..85e6d3b0d03 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 27e1782b939..5839a80e00a 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 8b4b1b55bf8..c09802879cd 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 76cb203e104..b1e8ecb0ad4 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(prev) - offset); else - qFree(reinterpret_cast(prev) - offset); + free(reinterpret_cast(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(reinterpret_cast(concreteNode) + offset); @@ -157,7 +157,7 @@ void QMapData::node_delete(Node *update[], int offset, Node *node) if (strictAlignment) qFreeAligned(reinterpret_cast(node) - offset); else - qFree(reinterpret_cast(node) - offset); + free(reinterpret_cast(node) - offset); } #ifdef QT_QMAP_DEBUG diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h index 362b723b0a3..f975b7eb163 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 9c7dd038e78..e14e2aa2271 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 635ac561375..4e699074405 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 95868840ea5..0acd617e267 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 a9d73419ff0..26e7c789966 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 d06c9479e71..9c03f0e64aa 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 bd32fe77b1f..9139f4033c1 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 b394ece1a63..a6381578d8b 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 2f5aae4026f..5753c7d6958 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 c10e6c0b2b7..9aa7a7bdb02 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 41ec816c46e..2d63eb85e62 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 58221f47396..34000750ee6 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 +inline QRectF QRectF::intersected(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; -} - 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 c40214b2ab1..5341d27a915 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 bf864f2f58d..698351456fd 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 688b38d1327..d300ed967d4 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 ®Exp) } #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 4ce2f6e0be4..364745e24a7 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 ®Exp); Q_CORE_EXPORT QDataStream &operator>>(QDataStream &in, QRegExp ®Exp); #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 4a19e126472..6bbce03a441 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 9277a3ebbfa..a95468617b5 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 a24f62e7baa..41e6dff90c0 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 8dcc503ad29..eb7cc80e545 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 1ad47f45dd4..e5b68ded1ff 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 ee621475401..3b821956eb2 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 5f480421148..7ad16a79434 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(q_hash.insert(value, - QHashDummyValue())); } + inline iterator insert(const T &value) + { return static_cast(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 result = *this; result += other; return result; } inline QSet operator-(const QSet &other) const { QSet result = *this; result -= other; return result; } -#if QT_VERSION < 0x050000 - // ### Qt 5: remove - inline QSet operator|(const QSet &other) - { QSet result = *this; result |= other; return result; } - inline QSet operator&(const QSet &other) - { QSet result = *this; result &= other; return result; } - inline QSet operator+(const QSet &other) - { QSet result = *this; result += other; return result; } - inline QSet operator-(const QSet &other) - { QSet result = *this; result -= other; return result; } -#endif QList toList() const; inline QList values() const { return toList(); } diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc index f562c68b72c..28b53e690dc 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 ee2b0c4f3cd..2995d4a1235 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 6de6a192895..add8025d5a2 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 34060926c7b..0069eb6831f 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 6b2b41f1de5..f4a0c02ebfe 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 f03889106f4..3cad13856c7 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 3dfe38a4d13..9001c4a3991 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 296c275b615..2fc6d88fb69 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 d8bd14de8de..41abb0be17f 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 adc857be964..c9712b39769 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 0fbb8d85163..de851d2f0da 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 224935455d1..35518cfe5ea 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 d57adbe7312..dbe1e913c38 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(&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(&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(&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(qMalloc(sizeof(Data) + (alloc+1) * sizeof(QChar))); + Data *x = static_cast(::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(qRealloc(d, sizeof(Data) + (alloc+1) * sizeof(QChar))); + Data *p = static_cast(::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(qMalloc(size * sizeof(QChar))); + ushort *tmp = static_cast(::malloc(size * sizeof(QChar))); Q_CHECK_PTR(tmp); memcpy(tmp, s, size * sizeof(QChar)); insert(i, reinterpret_cast(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(after); if (after >= reinterpret_cast(d->data()) && after < reinterpret_cast(d->data()) + d->size) { - afterBuffer = static_cast(qMalloc(alen*sizeof(QChar))); + afterBuffer = static_cast(::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(qMalloc(sizeof(Data) + (size+1) * sizeof(QChar))); + d = static_cast(::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(&shared_empty.str); } else { - x = static_cast(qMalloc(sizeof(Data) + sizeof(ushort))); + x = static_cast(::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 898c80ce35f..f7898bbadb1 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 - -# ifndef QT_NO_STL_WCHAR -// workaround for some headers not typedef'ing std::wstring -typedef std::basic_string QStdWString; -# endif // QT_NO_STL_WCHAR - #endif // QT_NO_STL #include @@ -407,10 +401,23 @@ public: QByteArray toLocal8Bit() const Q_REQUIRED_RESULT; QVector 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 2b40a68e0bf..018a312fa6f 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 de6b655e95c..016e37fb389 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 bab7d42215d..1fca78b03b7 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 bded94399dc..6c32f11096b 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 0117d785440..36016a9401f 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 ed4e5036442..9f5e10b942f 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 aabb6949add..4554ebb34fd 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 4d5369c3af7..3f4f309d310 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 0ca406308a6..2ff25a9a467 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 d65822ff408..06a5d76a4bc 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 9a7f5dd8525..6a1b78b12bc 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 88fd2afb72c..7fc09e7d605 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 0c9bd02c047..0a357c0da62 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 6da6cf524de..d37389a8dc3 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 b1d7a1a5b15..c4198aafa7e 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 d4c7fd79f7a..59ca11179b3 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 +#include 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(alignment > alignmentThreshold() ? qMallocAligned(size, alignment) : qMalloc(size)); + return static_cast(alignment > alignmentThreshold() ? qMallocAligned(size, alignment) : ::malloc(size)); } QVectorData *QVectorData::reallocate(QVectorData *x, int newsize, int oldsize, int alignment) { if (alignment > alignmentThreshold()) return static_cast(qReallocAligned(x, newsize, oldsize, alignment)); - return static_cast(qRealloc(x, newsize)); + return static_cast(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 f9db421fdbc..51364df91da 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::append(const T &t) } template -Q_TYPENAME QVector::iterator QVector::insert(iterator before, size_type n, const T &t) +typename QVector::iterator QVector::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::iterator QVector::insert(iterator before, size_type n, } template -Q_TYPENAME QVector::iterator QVector::erase(iterator abegin, iterator aend) +typename QVector::iterator QVector::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 0b85cf0c0aa..85f8270ffde 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 11ac2196a6a..a02538ba795 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 bf379029500..04336c3a312 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 (qRealloc(sym_stack, stack_size * sizeof(Value))); + sym_stack = reinterpret_cast (realloc(sym_stack, stack_size * sizeof(Value))); Q_CHECK_PTR(sym_stack); - state_stack = reinterpret_cast (qRealloc(state_stack, stack_size * sizeof(int))); + state_stack = reinterpret_cast (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 26e7323a5f6..88bfcd47ccd 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 3e19bef2735..04f9322712b 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 db5fb652466..e67ff3d76b1 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 9cae7632e5d..afc4fff8d60 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 5fa913e63a7..8b8d2358c99 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 8e74b8b922c..8f02bedf154 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 8178e2ecf34..bb17231c34d 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 9d9e0f6e289..6acbd98fbf9 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 bb9c11bbaa0..2f5896a9cb4 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 4c197be2264..a9e184a1866 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 9f683130407..a63864a0b33 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 34ff4107f9f..9cc68594e69 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 4f96165aa02..b0fb04e8312 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 af800d765df..4bb5d557243 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 cea28f9b610..74a5b37078a 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 d8ca4429201..c04e4584490 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 7d3cf9be4c1..50a55040c81 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) ** @@ -122,23 +122,6 @@ void QDBusConnectionManager::setConnection(const QString &name, QDBusConnectionP c->name = name; } -/*! - \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 @@ -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 8b126af77ef..3b88ad3f9ab 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 d481cf16ba4..46fed80865d 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 063fb88afa8..46080027a66 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 a516bc45526..93ee6709ebc 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 f9a9e2906e7..9d929b019bf 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 b65af73e635..e4a5d879d79 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 8dd9b40981c..9ceef6ecc18 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 691e69d2f15..5aa5da03787 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 4103552db12..215e6a1eb1b 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(&iterator); } -inline QString QDBusDemarshaller::toString() +inline QString QDBusDemarshaller::toStringUnchecked() { return QString::fromUtf8(qIterGet(&iterator)); } +inline QString QDBusDemarshaller::toString() +{ + if (isCurrentTypeStringLike()) + return toStringUnchecked(); + else + return QString(); +} + +inline QDBusObjectPath QDBusDemarshaller::toObjectPathUnchecked() + { + return QDBusObjectPath(QString::fromUtf8(qIterGet(&iterator))); + } + inline QDBusObjectPath QDBusDemarshaller::toObjectPath() { - return QDBusObjectPath(QString::fromUtf8(qIterGet(&iterator))); + if (isCurrentTypeStringLike()) + return toObjectPathUnchecked(); + else + return QDBusObjectPath(); } +inline QDBusSignature QDBusDemarshaller::toSignatureUnchecked() + { + return QDBusSignature(QString::fromUtf8(qIterGet(&iterator))); + } + inline QDBusSignature QDBusDemarshaller::toSignature() { - return QDBusSignature(QString::fromUtf8(qIterGet(&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 09e3450ecc9..911e1047362 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 4683f303852..3f6a66c2f4c 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 05a95c09e54..8d9d2e06fdf 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 984d4537ec5..36060ab0a4a 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 f6b433e1ba4..59b191bd101 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 745048a7e21..1e39bd734ab 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 b670244a0a4..1bf468acad7 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 9396d9b4831..75e876a389b 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 1bff1922094..b85d3cea776 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 b874a646441..7d07c92663e 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 710a9439417..23eda78e5ac 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 29d57721898..025cf63fe3d 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 f942a28c588..e508362db0d 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 790f044fd7e..843388c51e7 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 78a1d902c37..8cd2cc5d670 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 14027ff27b3..9cb1a476ca8 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 2c17c38e282..da716a6deff 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 8daf2300b79..e25de261ed7 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 d9b1eedaa97..063234a49ea 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 20e89695909..e3ed5b51464 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 979e28510ca..53b4c295916 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 d33198f4508..68deffbe089 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 24eabfbfa65..e7c7715eaa6 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 2278db43947..1004146f1dc 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 4791c3e6aab..dfdaf4e76af 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 ae17214834c..02057a74b2a 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 2d8c4872ca4..5f930c71a12 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 926e3ab48d2..596a4590095 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 145412e3c30..6c5b598ea2d 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 33274f41cfd..b9013185b46 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 a892e80faf7..078f56aa619 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 d00702a26fa..900c652d375 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 c56a3d4841f..6db9a287125 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 96318b274de..853064032b9 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 c7e0dc584e0..131437d370f 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 0ee29fc20ff..5a8835735e6 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 9afa6ac8a65..46d933ea246 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 0c7f0e63e04..70ef22f4288 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 bda0b923d18..50ef4fc9c22 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 992ccbf2297..c421e7dfd6e 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 be323de7205..6f0807f16d5 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 076af8a0b7d..b49756ebfeb 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 19b35e6c07c..b1d0b78c960 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 3bf31a48e97..f7677e0ae4b 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 8ddfd450602..00000000000 --- 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 be2fe1acf36..70ac033f77e 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 c65e7df327c..de37f679432 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 #include "qplatformaccessibility_qpa.h" -#include -#include -#include -#include +#include +#include #include 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,96 +120,66 @@ 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 + \class QAccessible::State - This enum describes the possible types of methods that can be - invoked on an accessible object. - - \value ListSupportedMethods - \value SetCursorPosition - \value GetCursorPosition - - \omitvalue ForegroundColor - \omitvalue BackgroundColor - - \sa QAccessibleInterface::invokeMethod() -*/ - -/*! - \fn QSet QAccessibleInterface::supportedMethods() - \since 4.3 - - 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 + This structure defines bit flags that 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 + \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. Implementations of QAccessibleInterface::state() return a combination of these flags. */ +/*! + \fn QAccessible::State::State() + + Creates a new QAccessible::State with all states set to false. +*/ + /*! \enum QAccessible::Event @@ -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 > 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 > 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 > 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 > 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 > 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 > 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 > 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 ¶ms) + +/*! + \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*/) { - Q_UNUSED(method) - Q_UNUSED(params) - return QVariant(); } -QVariant QAccessibleInterface::virtual_hook(const QVariant &) +/*! + \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) { - return QVariant(); + if (t == QAccessible::TextInterface) + return static_cast(this); + else if (t == QAccessible::EditableTextInterface) + return static_cast(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) +{ + static int eventEnum = QAccessible::staticMetaObject.indexOfEnumerator("Event"); + return QAccessible::staticMetaObject.enumerator(eventEnum).valueToKey(event); +} + +bool operator==(const QAccessible::State &first, const QAccessible::State &second) +{ + 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 6ee1885a3d9..bafd3a8a6b6 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; - 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 + // 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)); + } }; - 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) -QT_BEGIN_NAMESPACE class QAccessible2Interface; class QAccessibleTextInterface; @@ -369,7 +385,7 @@ public: virtual QAccessible::Relation relationTo(const QAccessibleInterface *other) const; virtual QVector > 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 states() const = 0; virtual QColor foregroundColor() const; virtual QColor backgroundColor() const; - virtual QVariant invokeMethod(QAccessible::Method method, const QVariantList ¶ms = QVariantList()); - - inline QSet supportedMethods() - { return qvariant_cast >(invokeMethod(QAccessible::ListSupportedMethods)); } - inline QAccessibleTextInterface *textInterface() { return reinterpret_cast(interface_cast(QAccessible::TextInterface)); } @@ -415,30 +425,19 @@ public: inline QAccessibleTableCellInterface *tableCellInterface() { return reinterpret_cast(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 d8bebdc6970..0a7a8b0b6f4 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,15 +259,55 @@ 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 @@ -121,28 +320,63 @@ QT_BEGIN_NAMESPACE \link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink */ +/*! + \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. + 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 order to invoke the action, doAction is called with an action name. + 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 - Most widgets will simply implement the PressAction. This is what happens when the widget is activated by - being clicked on, space pressed or similar. + 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 name. + Returns a localized action name of \a actionName. + + 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 93db8693641..0b1ddc99b16 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 a250730493c..00000000000 --- 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 -#include -#include - -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(interface.object())) - || (object && object->objectName() == QLatin1String("qt_scrollarea_viewport") - && qobject_cast(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(object->parent()) == 0); - - return false; -} - -static bool isEmbeddedTabBar(const QAInterface &interface) -{ - QObject *object = interface.object(); - if (interface.role() == QAccessible::PageTabList && object) - return (qobject_cast(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(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 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(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 lookup(const QList &interfaces) -{ - QList 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 &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(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 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 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 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 tabWidgetGetChildren(const QAInterface &interface) -{ - // The children for a kAXTabGroup should consist of the tabs and the - // contents of the current open tab page. - QList 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 findLabelled(const QAInterface &interface) -{ - QList 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 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 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(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 -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(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(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(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(parent.object()); - if (splitter == 0) - return CallNextEventHandler(next_ref, event); - - QWidget * const splitterHandle = qobject_cast(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() << 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(interface.object()); - if (splitter == 0) - return CallNextEventHandler(next_ref, event); - - accessibleHierarchyManager()->registerChildren(interface); - - QList 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() << contents); -} - -static OSStatus handleRowsAttribute(EventHandlerCallRef, EventRef event, QAInterface &tableView) -{ - QList 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 visibleRows; - - QList 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 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(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 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(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 supportedPredefinedActions(const QAInterface &interface) -{ - QList 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 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(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(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(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(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 32a242f2742..00000000000 --- 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 461b61aacfc..00000000000 --- 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 -#include -#include - - -#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 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(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(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 9b7d25a3348..00000000000 --- 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 -#include -#include -#include -#include - -//#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 children() const - { - if (!checkValid()) - return QList(); - - QList 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 ¶ms = 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(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 QObjectElementHash; - typedef QHash HIObjectInterfaceHash; - typedef QHash 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 b08a2e83bf5..d702972cd2b 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 73edf51183b..d0470f38e62 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 18941437fed..e271df2a13c 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 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 f2a9fd04309..58b95baffaf 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 618a31ad5ea..0d9d57b0ec6 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 4e09034dfdb..d3610e40f6d 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 7df827552da..47c351921e8 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 2931f4180a5..15297110b87 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 46755331444..4ee656f7778 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 db8d8b7a388..02712b40268 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 c3eb044b22e..2b7daf47b2f 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 783393c148b..3d9d72587ee 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 7ea18627d14..70cdfc72ac3 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 7f4785499dd..29b1cd371d7 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 ec596200fbf..d7bc0893d46 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 c04f6a1070e..7be8a0a4b9a 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 4c033795505..6c1320e868b 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 a3104f5083d..5740b874db7 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 3011a6c130e..3d9f8228f2a 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 373f8fbaaf1..f2eb8f69b20 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 27087909477..6968ca6736e 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 ca82f3c979a..0d9724a0712 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 c107fea919a..564abd2af28 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 *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 a18d81068ec..7a5a732c9a0 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 *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 a91bd94b038..cdf817b0519 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 77b9a7d1a1f..6e846fd0cf3 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 fe0bf8b303b..872d1d6be71 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 fcdd4e5eb2e..95cf694d2ad 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 80e8fec9d01..d9691563b11 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 ace49c9be0a..188b4ef1a85 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 79010455935..e83897aced0 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 c98da6110a4..11abe173c44 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 4bf4b08349c..b6345191d6b 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 b85ef2b61df..f132991d928 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 82ae64593a0..b7d57fa4d32 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 cc7fdd28713..5aac7e8599a 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 673a6d63d91..f0f9368e22b 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 c573b4944e1..7827804959a 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 179fff8e93a..6a6ee8d2cff 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 f217f0da7fc..42b4fd06a85 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 ff00059f519..0be6833a876 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 02789570919..eb2b81d0b5d 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 30c1c0621ee..776a17857e9 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 433460b4632..0d8834cad34 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 ec3a4a050a5..cf9ecc17da9 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 4307e3ad69f..830867d89d2 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 dfc84c56d8e..1ca34df356b 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 1c5d3a9c8fa..e408d65cbc8 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 d_ptr; friend class QPicturePaintEngine; diff --git a/src/gui/image/qpicture_p.h b/src/gui/image/qpicture_p.h index 097ba72e60f..8c68d19558c 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 175406e6616..558d4febce8 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 b030c059137..9fd79c001db 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 2a2bd5d6fae..48d393cc245 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 ea73119538c..5e8ef708280 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 2a47a891c77..041c11af3a4 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 b0a9b7f8485..42d649642f0 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 4fe162efd80..7f2ff2e266d 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 887074c7b7d..424572ebd4d 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 91ed4cfdc5b..de4d0e6f17e 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 f46d5039365..5ee7ca9eba8 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 94f38347c1b..0f874bee6c9 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 e5c20c8e78f..81f9f4b0282 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 7b96f5a2cf4..2f609a8471f 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 e1bf944d9b6..30f1f4819b9 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 ad0a8dc69e2..13c3bc2fe81 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 1714442eb6e..a935ea3a289 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 1ee22d73c9f..8f17bd18a41 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 e4dbde8ece1..b08f97a3cab 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 a1cd9594e90..43e9b09f709 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 4dc9775d462..475622021b3 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(qMalloc(256 * sizeof(uint16))); - uint16 *greenTable = static_cast(qMalloc(256 * sizeof(uint16))); - uint16 *blueTable = static_cast(qMalloc(256 * sizeof(uint16))); + uint16 *redTable = static_cast(malloc(256 * sizeof(uint16))); + uint16 *greenTable = static_cast(malloc(256 * sizeof(uint16))); + uint16 *blueTable = static_cast(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 4cbcfacaecf..16e68b0ad60 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 8fd3620b4bc..e675e4ca67d 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 91f8ce35989..8f1664c4290 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 a2a7f716973..32f265e9d9e 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 9f817874a47..2890530aaa1 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 6984722c0f8..f438d96e681 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 04756ac351c..dda57239cc7 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 8fc6bda3f9e..13ab343f8b0 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 a3779fc041c..48047d2d553 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 35cf142db59..092d9bb3f14 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 57ed3a983aa..bf552c9991d 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 970d365af8e..341b042328a 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 6902a1362b2..b9098898157 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 737b2131c0b..edcf21babcb 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 faa9500f9fb..bd327e1eb17 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 #include #include +#include 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 584aff42d3d..7437da4aba7 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 71a07cca49b..a904260388d 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 7b3059e1dfe..6a12f977d39 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 4edcfa886f6..4010fd73ffa 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 548e3d2e77e..47018edde89 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 399c4676430..284b1e5c1b1 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 b590c4f015a..ccadd8f1cca 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 035f1b26663..61ccaa5cfd6 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 &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,13 +3484,6 @@ QTouchEvent::~QTouchEvent() Returns the touch device from which this touch event originates. */ -/*! \fn void QTouchEvent::setWidget(QWidget *widget) - - \internal - - Sets the widget for this event. -*/ - /*! \fn void QTouchEvent::setWindow(QWindow *window) \internal @@ -3535,6 +3491,13 @@ QTouchEvent::~QTouchEvent() Sets the window for this event. */ +/*! \fn void QTouchEvent::setTarget(QObject *target) + + \internal + + Sets the target within the window (typically a widget) for this event. +*/ + /*! \fn void QTouchEvent::setTouchPointStates(Qt::TouchPointStates touchPointStates) \internal @@ -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 6a0442509c3..a59b178cecb 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 &touchPoints = QList()); ~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(int(_device->type())); } inline Qt::TouchPointStates touchPointStates() const { return _touchPointStates; } inline const QList &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 &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 _touchPoints; diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h index 1eee92d176a..6dff55ca149 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 e7b65b730e6..23733e3ea94 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 c4dd5a9df06..196304d2a4f 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 7c0975ac1d4..4735604837b 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 2359de9aa9a..2d1550ffac6 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 6d5e210e82f..f92e66b38e1 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 #include #include +#include #include #include @@ -68,7 +69,6 @@ #include #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 @@ -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 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 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 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() - : 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 1afbf17cf71..dd7b1f88069 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 9c8a2ca6423..9c965cd1093 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 window; + QWeakPointer target; + QTouchEvent::TouchPoint touchPoint; + }; + QHash activeTouchPoints; + private: void init(); static QGuiApplicationPrivate *self; - - QMap > windowForTouchPointId; - QMap 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 3b60f29e830..532a5353e29 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 { static const bool IsAvailable = fal template<> struct TypeDefiniton { static const bool IsAvailable = false; }; #endif -struct CoreAndGuiTypesFilter { +struct GuiTypesFilter { template struct Acceptor { - static const bool IsAccepted = (QTypeModuleInfo::IsCore || QTypeModuleInfo::IsGui) && TypeDefiniton::IsAvailable; + static const bool IsAccepted = QTypeModuleInfo::IsGui && TypeDefiniton::IsAvailable; }; }; -} // namespace +} // namespace used to hide TypeDefinition +namespace { static void construct(QVariant::Private *x, const void *copy) { const int type = x->type; - QVariantConstructor constructor(x, copy); - QMetaTypeSwitcher::switcher(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(copy)); - v_construct(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(copy)); + v_construct(x, &color); + return; } + QVariantConstructor constructor(x, copy); + QMetaTypeSwitcher::switcher(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 destructor(d); - QMetaTypeSwitcher::switcher(destructor, type, 0); + QVariantDestructor destructor(d); + QMetaTypeSwitcher::switcher(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 isNull(d); + QGuiVariantIsNull isNull(d); return QMetaTypeSwitcher::switcher(isNull, d->type, 0); } @@ -215,11 +196,6 @@ public: template 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 comparator(a, b); + QGuiVariantComparator comparator(a, b); return QMetaTypeSwitcher::switcher(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(v); //FIXME -#endif - break; - case QVariant::Bitmap: -// dbg.nospace() << qvariant_cast(v); //FIXME - break; - case QVariant::Polygon: - dbg.nospace() << qvariant_cast(v); - break; - case QVariant::Region: - dbg.nospace() << qvariant_cast(v); - break; - case QVariant::Font: -// dbg.nospace() << qvariant_cast(v); //FIXME - break; - case QVariant::Matrix: - dbg.nospace() << qvariant_cast(v); - break; - case QVariant::Transform: - dbg.nospace() << qvariant_cast(v); - break; - case QVariant::Pixmap: -// dbg.nospace() << qvariant_cast(v); //FIXME - break; - case QVariant::Image: -// dbg.nospace() << qvariant_cast(v); //FIXME - break; - case QVariant::Brush: - dbg.nospace() << qvariant_cast(v); - break; - case QVariant::Color: - dbg.nospace() << qvariant_cast(v); - break; - case QVariant::Palette: -// dbg.nospace() << qvariant_cast(v); //FIXME - break; -#ifndef QT_NO_ICON - case QVariant::Icon: -// dbg.nospace() << qvariant_cast(v); // FIXME - break; -#endif - case QVariant::SizePolicy: -// dbg.nospace() << qvariant_cast(v); //FIXME - break; -#ifndef QT_NO_SHORTCUT - case QVariant::KeySequence: - dbg.nospace() << qvariant_cast(v); - break; -#endif - case QVariant::Pen: - dbg.nospace() << qvariant_cast(v); - break; -#ifndef QT_NO_MATRIX4X4 - case QVariant::Matrix4x4: - dbg.nospace() << qvariant_cast(v); - break; -#endif -#ifndef QT_NO_VECTOR2D - case QVariant::Vector2D: - dbg.nospace() << qvariant_cast(v); - break; -#endif -#ifndef QT_NO_VECTOR3D - case QVariant::Vector3D: - dbg.nospace() << qvariant_cast(v); - break; -#endif -#ifndef QT_NO_VECTOR4D - case QVariant::Vector4D: - dbg.nospace() << qvariant_cast(v); - break; -#endif -#ifndef QT_NO_QUATERNION - case QVariant::Quaternion: - dbg.nospace() << qvariant_cast(v); - break; -#endif - default: - qcoreVariantHandler()->debugStream(dbg, v); - break; - } + QVariant::Private *d = const_cast(&v.data_ptr()); + QVariantDebugStream stream(dbg, d); + QMetaTypeSwitcher::switcher(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(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 d6d58bf1c50..d6dd55b651d 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(); @@ -247,6 +247,32 @@ bool QInputPanel::isAnimating() const return false; } +/*! + \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 diff --git a/src/gui/kernel/qinputpanel.h b/src/gui/kernel/qinputpanel.h index 4edc9021041..c33bd13451f 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 6fcf2d72437..f30c8a1b80d 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 4ee7d66dd8d..a411ee5904a 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 1fada6f59af..bf19f1d80a2 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 13c6d6c28b8..fd04ff234c2 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 6ea502b70b1..986701bd7b1 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 31cec17fb18..1127e8afca5 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 7fa98dd5eb2..57f6e1927fd 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 6a9cb430288..93a4b3582bc 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) @@ -185,6 +187,17 @@ void QOpenGLContext::destroy() d->functions = 0; } +/*! + \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 */ @@ -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 b5a19a0ebcd..a8ac39c7d5c 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 aff1042c5b6..7040b883bf0 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 893cc5eff6c..2dd2ef00c5f 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 dd59d121a0c..d47854df076 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 c7c779e4eb5..4d8d65de0ad 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 fc0505b87ee..643733fdf79 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 752de189690..a3824381d32 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 da3c4752a0c..a2026425db7 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 0b65174f712..fb71f29de95 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 bc0bcf8f4f3..1e82507653b 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 #include #include +#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 76aa1227201..463238f3365 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 956180c7289..23ecf3add4c 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 #include #include +#include #include 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 d5eb14bc507..3975d82288a 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 c40494c4087..7f2260b5f69 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 5ffdf854258..189b352139b 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 0181b98ad7d..a57b980ea3e 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 b397f56d7c5..f53d66d1c8b 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 5c1f8458dbe..f9ddd1f72a9 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 bfcf78813b9..47e2f828107 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 e7644198252..7c5e8245df6 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 1b3bfc9a34a..ac5cf969d96 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 3fdb8091377..26c685ff1ae 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 #include +#include #include #include #include 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 64115a6cd5b..586a29279c7 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 similarity index 72% rename from src/plugins/bearer/icd/iapmonitor.h rename to src/gui/kernel/qplatformscreen_qpa_p.h index 9f7c3b2cef2..67c222bdf34 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 +QT_BEGIN_HEADER -namespace Maemo { +QT_BEGIN_NAMESPACE -class IAPMonitorPrivate; -class IAPMonitor { +QT_MODULE(Gui) + +class QScreen; + +class QPlatformScreenPrivate +{ public: - IAPMonitor(); - ~IAPMonitor(); - -protected: - virtual void iapAdded(const QString &id); - virtual void iapRemoved(const QString &id); - -private: - IAPMonitorPrivate *d_ptr; - Q_DECLARE_PRIVATE(IAPMonitor); + 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 dcfd201ea34..3347f7984fc 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 76b564de25f..7ceb39f049e 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 c887d78edbc..22d4452f4ed 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 + 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 2090ce37e1c..c3e5b677a2b 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 87f96762c23..c278f414119 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 b65e6e197ad..71987aa723a 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 e17e36fc3da..c51d4e9fc51 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 0df9a8842d1..89348deae06 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 90fdec69f06..d69cb0e64ee 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 c6b5bb80ea8..7605a5a4aa9 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 8a35ce6b8f6..a1ed3014d09 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 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 6fc97c17995..7291e2ad7b3 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 similarity index 65% rename from src/plugins/bearer/icd/main.cpp rename to src/gui/kernel/qscreen_p.h index 0b52d25e602..50742c9f6b0 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 +#include +#include -#include +#include -#ifndef QT_NO_BEARERMANAGEMENT +QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QIcdEnginePlugin : public QBearerEnginePlugin +QT_MODULE(Gui) + +class QScreenPrivate : public QObjectPrivate { public: - QIcdEnginePlugin(); - ~QIcdEnginePlugin(); + QScreenPrivate(QPlatformScreen *screen) + : platformScreen(screen) + { + currentOrientation = screen->currentOrientation(); + geometry = screen->geometry(); + availableGeometry = screen->availableGeometry(); + logicalDpi = screen->logicalDpi(); + } - QStringList keys() const; - QBearerEngine *create(const QString &key) const; + Qt::ScreenOrientation currentOrientation; + QRect geometry; + QRect availableGeometry; + QDpi logicalDpi; + + QPlatformScreen *platformScreen; }; -QIcdEnginePlugin::QIcdEnginePlugin() -{ -} - -QIcdEnginePlugin::~QIcdEnginePlugin() -{ -} - -QStringList QIcdEnginePlugin::keys() const -{ - return QStringList() << QLatin1String("icd"); -} - -QBearerEngine *QIcdEnginePlugin::create(const QString &key) const -{ - if (key == QLatin1String("icd")) - return new QIcdEngine; - else - return 0; -} - -Q_EXPORT_STATIC_PLUGIN(QIcdEnginePlugin) -Q_EXPORT_PLUGIN2(qicdbearer, QIcdEnginePlugin) - 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 31a26c1582c..89c5cf47b6e 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 7ade0df3a8a..9b6ec26ff4a 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 64b0aa1741c..2bacac95984 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 28c37f9a2e2..e447507b872 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 7585d23558f..eb0f0552702 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 bcc9b589e22..6fa72110fbd 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 871b765bfd0..bfdb772cfb0 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 a6c8745a7a7..fba1690af43 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 b200cdb1136..39b2d491a39 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 cdbd50740ba..3d3bfeb30b8 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 3cb527d0b1a..98a516f54e6 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 abf1acc310f..b8d4d016552 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 496bb7a5229..6efa7814c92 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 f782d1585d5..c37e4a8bf5b 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 55329f56bd4..97c6b0cbc90 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 +#include + QT_BEGIN_NAMESPACE /*! @@ -741,30 +743,42 @@ QObject *QWindow::focusObject() const return const_cast(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(event)); + mouseMoveEvent(static_cast(ev)); break; case QEvent::MouseButtonPress: - mousePressEvent(static_cast(event)); + mousePressEvent(static_cast(ev)); break; case QEvent::MouseButtonRelease: - mouseReleaseEvent(static_cast(event)); + mouseReleaseEvent(static_cast(ev)); break; case QEvent::MouseButtonDblClick: - mouseDoubleClickEvent(static_cast(event)); + mouseDoubleClickEvent(static_cast(ev)); + break; + + case QEvent::TouchBegin: + case QEvent::TouchUpdate: + case QEvent::TouchEnd: + touchEvent(static_cast(ev)); break; case QEvent::Move: - moveEvent(static_cast(event)); + moveEvent(static_cast(ev)); break; case QEvent::Resize: - resizeEvent(static_cast(event)); + resizeEvent(static_cast(ev)); break; case QEvent::KeyPress: - keyPressEvent(static_cast(event)); + keyPressEvent(static_cast(ev)); break; case QEvent::KeyRelease: - keyReleaseEvent(static_cast(event)); + keyReleaseEvent(static_cast(ev)); break; case QEvent::FocusIn: - focusInEvent(static_cast(event)); + focusInEvent(static_cast(ev)); break; case QEvent::FocusOut: - focusOutEvent(static_cast(event)); + focusOutEvent(static_cast(ev)); break; #ifndef QT_NO_WHEELEVENT case QEvent::Wheel: - wheelEvent(static_cast(event)); + wheelEvent(static_cast(ev)); break; #endif @@ -852,62 +877,74 @@ bool QWindow::event(QEvent *event) break; } case QEvent::Expose: - exposeEvent(static_cast(event)); + exposeEvent(static_cast(ev)); break; case QEvent::Show: - showEvent(static_cast(event)); + showEvent(static_cast(ev)); break; case QEvent::Hide: - hideEvent(static_cast(event)); + hideEvent(static_cast(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 11ff6b101d4..4d161658c65 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 ee91b61cf19..d3b6868aa57 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 b77ec0b2f33..33666060367 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 2bf9c8e6729..2db1a4649fb 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 016446780b3..4a7ebd1c0ce 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 &points, Qt::KeyboardModifiers mods) +void QWindowSystemInterface::handleTouchEvent(QWindow *w, QTouchDevice *device, + const QList &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 &points, Qt::KeyboardModifiers mods) +QList QWindowSystemInterfacePrivate::convertTouchPoints(const QList &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 touchPoints; Qt::TouchPointStates states; QTouchEvent::TouchPoint p; - QList::const_iterator point = points.constBegin(); - QList::const_iterator end = points.constEnd(); + QList::const_iterator point = points.constBegin(); + QList::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 &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 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 423281955ce..4a17fb9035d 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 &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 &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 5580104c3b1..b5614eb38ee 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 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 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 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 screen; + qreal dpiX; + qreal dpiY; }; class MapEvent : public WindowSystemEvent { @@ -256,6 +262,8 @@ public: static void queueWindowSystemEvent(WindowSystemEvent *ev); static QTime eventTime; + + static QList convertTouchPoints(const QList &points, QEvent::Type *type); }; QT_END_HEADER diff --git a/src/gui/math3d/qgenericmatrix.cpp b/src/gui/math3d/qgenericmatrix.cpp index c1e1d92935c..88682702de5 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 a90d32a2b61..c992415426f 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 1797564a98d..b6b60e70723 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 2c98dd03e30..98f967f63c2 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 ef1b545e107..53e01323d9b 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 802de8b3b74..78b2d91d13b 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 cd94007aad4..a1c7ac048f9 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 f771ce34d0c..df435bcf49b 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 4e8a62fea3e..096d14223c0 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 17785a6c7c4..55c0e36ca2a 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 41c7b296bea..ce3d410b394 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 64b8079b762..ceff21163ff 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 3233fcfa5b7..246d4dfa24f 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 cc64804efd2..a3ec59cef15 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 ec26fdbf5bc..1db22236678 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 5ad4f7a237f..779fa5a545e 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 b09f9447dbc..5323604ce5c 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 bdd38018fad..6bf4fedc8e5 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 52a2c4d6401..83ad5cda519 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 6cedf66df1f..25a07b2a4cd 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 de459c00502..35c59a9e9b2 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 aaca6ad89cd..9520f07fcc8 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 1dcc4fe7a76..39cd2e4d70c 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 cb852123080..65e3fc54a53 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 65d92e3a65b..b66af217a68 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 bd2f1fd5dc4..261a6df27d2 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 8a57784f4f2..acce7d7391e 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 93a8bbf32f0..aeaa2a0e7d6 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 24cf858a7c3..a34dfc193cd 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 7d9e34740e8..2f4b5b18cb0 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 f8d61cd6206..dde5eaf93e2 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 53abf221d25..055798fcd86 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 4e5c2703dca..35ef609529f 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 9edc347b321..0a7bb3c9f35 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 c1bde757a23..834beda9773 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 1ce04eb5a74..9f125eb6160 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 86a8a861dad..02a1c84336b 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 05a058050c2..64435eb1c2e 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 70f9b042c7b..fab764ed6e7 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 4c123749a2d..f6244cd12cd 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 067b7a9e20f..a93ae91354e 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 bdee9f4e838..c6e46dd6cb6 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 55acdb39b92..9f5ce46854d 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 97f9ac3c649..5da8d1ce4b8 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 4d1a8f86b2e..65ee8753c40 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 abb10957c06..965fce61574 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 ac464a3fbe4..dbcf0371934 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 67c2a6494eb..c4b8aba9a74 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 #include #include #include @@ -720,78 +719,6 @@ inline void QInt64Set::clear() m_count = 0; } -//============================================================================// -// QRingBuffer // -//============================================================================// - -// T must be POD. -template -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 -bool QRingBuffer::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 -inline const T &QRingBuffer::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 -inline void QRingBuffer::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 // //============================================================================// diff --git a/src/gui/opengl/qtriangulator_p.h b/src/gui/opengl/qtriangulator_p.h index 8f95d58e23f..96dedd5eca0 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 fa295895083..08f809ed883 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 d5ec3b31d34..0172a78d854 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 9d204f9a396..75a75ead7d3 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 &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 f1f7eb155a2..368ae7e4834 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 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 &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 fd3a8fce529..40047d8c94b 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 76e71b9d2f3..412be40d674 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 11058582eff..020eba02359 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 a843733a56b..c704c86452e 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 b4aa27db2f0..66f0395582e 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 daad47cb19b..060d11fd792 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 df2aa1ffe80..5f15ccbc639 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 460a43183f3..ac525cb0680 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 454fe82cfea..14b984978c9 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 8aec184ee2c..f1a4d313e3f 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 eb00ec87d87..c59399c905c 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 53cdf2c0ac4..a7742769bd5 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 f670258e46d..4758a1362c3 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 fe5b7057b95..e555788343a 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 8247e4233b2..6c0f5d57c6f 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 cf899b986d3..26fe6df3d47 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 48b67f40203..e1784e049f2 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 a9def32b6cc..e920456d457 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 95266eecebe..59b9f28dcdf 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 45cfcd32a03..261cf06a423 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 204f061e1a0..7bec5ec3362 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 e2205a89a55..d6f70566691 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 a7e510e0ac7..09eba9103b4 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 0c0c6a4b1e2..d1e6e585c4d 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 97ef8ce4e67..6ce1d5e59e6 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 3d83ba8587a..52f50240a4f 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 a03ceee02a6..4e17c32c17a 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 3bbdae00bd7..f974b586d0c 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 513ed7d713d..42061feac34 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 3f2419578df..99ef917e715 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 ef6e33bc1e5..1281d4d526a 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 ac671ccc511..20d0f7a36b3 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 dad8f6cb5d2..28b9ceee8a2 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 903ab1f605d..3e40d25ec81 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 fdc36888760..b49ce2bdaf2 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 df5a6850532..dba52f75b4d 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 5334f977823..50ec22e73ab 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 d5932982db6..11470ab2796 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 46e09ddc49e..83cd9ad9702 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 4efe75df608..654602cefe4 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 ea46aa7902f..21bbeeeaed0 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 41278920cb8..cf99e31b90a 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 830a0a734f3..e963b90a449 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 857621df6e7..478d6470b2f 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 a8c2c6bfbd0..d9793b24041 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 8b607b28b8c..da77722491d 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 #include "qmath.h" +#include #include @@ -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 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 388858ca440..ceb70f1a7b0 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 m_element_types; QDataBuffer m_elements; - QDataBuffer m_elements_dev; QDataBuffer m_points; QDataBuffer m_tags; QDataBuffer m_contours; QRect m_clip_rect; - QDataBuffer 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 b7b882e93ad..038852a842a 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 9f06fc923a5..f1135349563 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 55f78d54c57..28a2c80b945 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 f9e8432a8c6..a4edba9299e 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 7cb743e5857..536d5c8a61c 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 857f1472317..b094019c842 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 476f8836458..fdceaa18860 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 8d7e86f4244..747047d53af 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 65eeaaa7e8b..eb7408dbff8 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 da97116c6f6..8364218b6e7 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 5d5424dfae1..ee08ef1fbd0 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 1ed6dea1611..37c158a3d95 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 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() <= 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); - } - } - } - - 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 updateClip() { - Q_Q(QBlitterPaintEngine); - const QClipData *clip = q->clip(); - bool complex = clip && !(clip->hasRectClip || clip->hasRegionClip); - capabillities->updateState(STATE_CLIP_COMPLEX, complex); - } - - void systemStateChanged() { - raster->d_func()->systemStateChanged(); - } - - QScopedPointer raster; + 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; - bool isBlitterLocked; - - QScopedPointer capabillities; - + 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 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 { + QRectF deviceRect(0, 0, q->paintDevice()->width(), q->paintDevice()->height()); + unlock(); + pmData->blittable()->fillRect(deviceRect & targetRect, color); + } + } +} + +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); +} + QBlitterPaintEngine::QBlitterPaintEngine(QBlittablePlatformPixmap *p) - : QPaintEngineEx(*(new QBlitterPaintEnginePrivate(p))) + : QRasterPaintEngine(*(new QBlitterPaintEnginePrivate(p)), p->buffer()) +{} + +// State tracking +void QBlitterPaintEngine::penChanged() { + Q_D(QBlitterPaintEngine); + + QRasterPaintEngine::penChanged(); + d->updatePenState(state()); } -QBlitterPaintEngine::~QBlitterPaintEngine() +void QBlitterPaintEngine::brushChanged() { + Q_D(QBlitterPaintEngine); + + QRasterPaintEngine::brushChanged(); + d->updateBrushState(state()); } -QPainterState *QBlitterPaintEngine::createState(QPainterState *orig) const +void QBlitterPaintEngine::opacityChanged() { - Q_D(const QBlitterPaintEngine); - return d->raster->createState(orig); + Q_D(QBlitterPaintEngine); + + QRasterPaintEngine::opacityChanged(); + d->updateOpacityState(state()); +} + +void QBlitterPaintEngine::compositionModeChanged() +{ + Q_D(QBlitterPaintEngine); + + QRasterPaintEngine::compositionModeChanged(); + d->updateCompositionModeState(state()); +} + +void QBlitterPaintEngine::renderHintsChanged() +{ + Q_D(QBlitterPaintEngine); + + QRasterPaintEngine::renderHintsChanged(); + d->updateRenderHintsState(state()); +} + +void QBlitterPaintEngine::transformChanged() +{ + Q_D(QBlitterPaintEngine); + + QRasterPaintEngine::transformChanged(); + d->updateTransformState(state()); +} + +void QBlitterPaintEngine::clipEnabledChanged() +{ + Q_D(QBlitterPaintEngine); + QRasterPaintEngine::clipEnabledChanged(); + d->updateClipState(state()); } bool QBlitterPaintEngine::begin(QPaintDevice *pdev) { - Q_D(QBlitterPaintEngine); - - setActive(true); - bool ok = d->raster->begin(pdev); + bool ok = QRasterPaintEngine::begin(pdev); #ifdef QT_BLITTER_RASTEROVERLAY + Q_D(QBlitterPaintEngine); d->pmData->unmergeOverlay(); #endif return ok; } - bool QBlitterPaintEngine::end() +{ +#ifdef QT_BLITTER_RASTEROVERLAY + Q_D(QBlitterPaintEngine); + d->pmData->mergeOverlay(); +#endif + + return QRasterPaintEngine::end(); +} + +void QBlitterPaintEngine::setState(QPainterState *s) { Q_D(QBlitterPaintEngine); - setActive(false); -#ifdef QT_BLITTER_RASTEROVERLAY - d->pmData->mergeOverlay(); -#endif - return d->raster->end(); + 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 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 ®ion, Qt::ClipOperation op) -{ - Q_D(QBlitterPaintEngine); - d->lock(); - d->raster->clip(region,op); - d->updateClip(); -} - -void QBlitterPaintEngine::clipEnabledChanged() -{ - Q_D(QBlitterPaintEngine); - d->lock(); - d->raster->clipEnabledChanged(); -} - -void QBlitterPaintEngine::penChanged() -{ - Q_D(QBlitterPaintEngine); - d->lock(); - d->raster->penChanged(); - d->capabillities->updateState(STATE_PEN_ENABLED,qpen_style(state()->pen) != Qt::NoPen); -} - -void QBlitterPaintEngine::brushChanged() -{ - 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); -} - -void QBlitterPaintEngine::brushOriginChanged() -{ - Q_D(QBlitterPaintEngine); - d->raster->brushOriginChanged(); -} - -void QBlitterPaintEngine::opacityChanged() -{ - Q_D(QBlitterPaintEngine); - d->raster->opacityChanged(); - - bool translucent = state()->opacity < 1; - d->capabillities->updateState(STATE_ALPHA,translucent); -} - -void QBlitterPaintEngine::compositionModeChanged() -{ - 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); -} - -void QBlitterPaintEngine::renderHintsChanged() -{ - Q_D(QBlitterPaintEngine); - d->raster->renderHintsChanged(); - - bool aa = state()->renderHints & QPainter::Antialiasing; - d->capabillities->updateState(STATE_ANTIALIASING, aa); - -} - -void QBlitterPaintEngine::transformChanged() -{ - 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; - -} - void QBlitterPaintEngine::drawRects(const QRect *rects, int rectCount) { Q_D(QBlitterPaintEngine); - if (d->capabillities->canBlitterDrawRectMask()) { - for (int i=0; icaps.canBlitterDrawRectMask()) { + for (int i=0; ifillRect(rects[i], qbrush_color(state()->brush)); - } } else { - d->pmData->markRasterOverlay(rects,rectCount); - QPaintEngineEx::drawRects(rects, rectCount); + d->pmData->markRasterOverlay(rects, rectCount); + QRasterPaintEngine::drawRects(rects, rectCount); } } void QBlitterPaintEngine::drawRects(const QRectF *rects, int rectCount) { Q_D(QBlitterPaintEngine); - if (d->capabillities->canBlitterDrawRectMask()) { - for (int i=0; icaps.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->pmData->markRasterOverlay(rects, rectCount); + QRasterPaintEngine::drawRects(rects, rectCount); } } +void QBlitterPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pm) +{ + drawPixmap(QRectF(pos, pm.size()), pm, pm.rect()); +} + void QBlitterPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) { Q_D(QBlitterPaintEngine); - if (d->capabillities->canBlitterDrawPixmap(r,pm,sr)) { + if (d->caps.canBlitterDrawPixmap(r, pm, sr)) { d->unlock(); QRectF targetRect = r; - if (d->hasXForm) { + if (d->hasXForm) targetRect = state()->matrix.mapRect(r); - } - const QClipData *clipData = clip(); + const QClipData *clipData = d->clip(); if (clipData) { if (clipData->hasRectClip) { - d->clipAndDrawPixmap(clipData->clipRect,targetRect,pm,sr); - }else if (clipData->hasRegionClip) { + d->clipAndDrawPixmap(clipData->clipRect, targetRect, pm, sr); + } else if (clipData->hasRegionClip) { QVectorrects = clipData->clipRegion.rects(); - for (int i = 0; iclipAndDrawPixmap(rects.at(i),targetRect,pm,sr); - } + for (int i = 0; iclipAndDrawPixmap(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); + QRectF deviceRect(0, 0, paintDevice()->width(), paintDevice()->height()); + d->clipAndDrawPixmap(deviceRect, targetRect, pm, sr); } }else { d->lock(); d->pmData->markRasterOverlay(r); - d->raster->drawPixmap(r, pm, sr); + QRasterPaintEngine::drawPixmap(r, pm, sr); } } +// Overriden methods to lock the graphics memory +void QBlitterPaintEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) +{ + Q_D(QBlitterPaintEngine); + d->lock(); + d->pmData->markRasterOverlay(points, pointCount); + QRasterPaintEngine::drawPolygon(points, pointCount, mode); +} + +void QBlitterPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode) +{ + Q_D(QBlitterPaintEngine); + d->lock(); + d->pmData->markRasterOverlay(points, pointCount); + QRasterPaintEngine::drawPolygon(points, pointCount, mode); +} + +void QBlitterPaintEngine::fillPath(const QPainterPath &path, QSpanData *fillData) +{ + Q_D(QBlitterPaintEngine); + d->lock(); + d->pmData->markRasterOverlay(path); + QRasterPaintEngine::fillPath(path, fillData); +} + +void QBlitterPaintEngine::fillPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) +{ + Q_D(QBlitterPaintEngine); + d->lock(); + d->pmData->markRasterOverlay(points, pointCount); + QRasterPaintEngine::fillPolygon(points, pointCount, mode); +} + +void QBlitterPaintEngine::drawEllipse(const QRectF &r) +{ + Q_D(QBlitterPaintEngine); + d->lock(); + d->pmData->markRasterOverlay(r); + QRasterPaintEngine::drawEllipse(r); +} + +void QBlitterPaintEngine::drawImage(const QPointF &pos, const QImage &image) +{ + drawImage(QRectF(pos, image.size()), image, image.rect()); +} + void QBlitterPaintEngine::drawImage(const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags) { Q_D(QBlitterPaintEngine); d->lock(); d->pmData->markRasterOverlay(r); - d->raster->drawImage(r, pm, sr, flags); + QRasterPaintEngine::drawImage(r, pm, sr, flags); } +void QBlitterPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr) +{ + Q_D(QBlitterPaintEngine); + d->lock(); + d->pmData->markRasterOverlay(r); + 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::drawPoints(const QPointF *points, int pointCount) +{ + Q_D(QBlitterPaintEngine); + d->lock(); + d->pmData->markRasterOverlay(points, pointCount); + QRasterPaintEngine::drawPoints(points, pointCount); +} + +void QBlitterPaintEngine::drawPoints(const QPoint *points, int pointCount) +{ + Q_D(QBlitterPaintEngine); + d->lock(); + d->pmData->markRasterOverlay(points, pointCount); + QRasterPaintEngine::drawPoints(points, pointCount); +} + +void QBlitterPaintEngine::stroke(const QVectorPath &path, const QPen &pen) +{ + Q_D(QBlitterPaintEngine); + d->lock(); + d->pmData->markRasterOverlay(path); + QRasterPaintEngine::stroke(path, pen); } void QBlitterPaintEngine::drawStaticTextItem(QStaticTextItem *sti) { Q_D(QBlitterPaintEngine); d->lock(); - d->raster->drawStaticTextItem(sti); + QRasterPaintEngine::drawStaticTextItem(sti); +#ifdef QT_BLITTER_RASTEROVERLAY //#### d->pmData->markRasterOverlay(sti); qWarning("not implemented: markRasterOverlay for QStaticTextItem"); - -} - - -void QBlitterPaintEngine::drawEllipse(const QRectF &r) -{ - Q_D(QBlitterPaintEngine); - d->lock(); - d->pmData->markRasterOverlay(r); - d->raster->drawEllipse(r); -} - -void QBlitterPaintEngine::setState(QPainterState *s) -{ - Q_D(QBlitterPaintEngine); - d->lock(); - QPaintEngineEx::setState(s); - d->raster->setState(s); - - clipEnabledChanged(); - penChanged(); - brushChanged(); - brushOriginChanged(); - opacityChanged(); - compositionModeChanged(); - renderHintsChanged(); - transformChanged(); - - d->updateClip(); -} - -inline QRasterPaintEngine *QBlitterPaintEngine::raster() const -{ - Q_D(const QBlitterPaintEngine); - return d->raster.data(); +#endif } QT_END_NAMESPACE diff --git a/src/gui/painting/qpaintengine_blitter_p.h b/src/gui/painting/qpaintengine_blitter_p.h index 1acc647fbed..dba0bad9efb 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 ®ion, 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 5d540bd11bb..57075fed90b 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 d5449a7eb5d..5100393c695 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 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(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 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(©); } 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(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 positions; QVarLengthArray 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 positions; + QVarLengthArray glyphs; + + ti.fontEngine->getGlyphPositions(ti.glyphs, QTransform::fromTranslate(p.x(), p.y()), + ti.flags, glyphs, positions); + QPair 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); } - - - QPaintEngineEx::drawTextItem(p, ti); } /*! @@ -4426,8 +4501,6 @@ void QSpanData::setupMatrix(const QTransform &matrix, int bilin) adjustSpanMethods(); } -extern const QVector *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(image)->data_ptr(); diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index d9cc4283375..aa454c05098 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 5c39a5fca2b..e5e14c9135e 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 9674f04ba11..33a6081570f 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 416fe5adbf3..77c3fc183f7 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 fd40111368e..ba9a9fbb977 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 79d4b4bbe03..0fb3069ee08 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 5b70f4b22ae..9c696440332 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 a558abca3df..46af341df3a 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 738c2d382d3..1cf00bbae34 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 f739198be04..03f48d8fda4 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 fe4a97ad4c8..daf97884c07 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 8f21663ffc0..62f4b9b3f65 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 6df5052c060..32b59e92e8d 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 a0f8df20617..23be05c49c2 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 005d8e640b5..dfe49b403a4 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 5358239014e..3654c6f007e 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 a751c2fdd33..708f131ece3 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 d91566664d1..4610026e2ff 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 2c0053af86c..9d855735f44 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 d5a2536ea62..a47106771e4 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 fc22aed392e..b745e1a6eea 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 cf3bf472f62..348cf9eef7b 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 df0bfccc3f8..6512a3a0ed3 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 8d9d4e92778..a113ab0abf4 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 1d3f581b889..5a46d1ba482 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 913e2d3229f..ed7d4eb957d 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 66b12e50344..68338602e2a 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 a5ea88b8bdd..834a015ceb2 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 1f9c922bf28..b9827073442 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 bbb951eb9bb..f7e50c82c08 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 58d4f5da40a..b6cae1d2a0b 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 1e0ed0f798e..07438043193 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 d9d57f41abb..d29a31f4f3f 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 e42eec6f96a..f9948bf8d1f 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 3289bf4d266..08a4861100e 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 6a061a405bc..8a54e65aedc 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 b744d6664c1..7d0eaa7b421 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 c392b545207..5dd29e6548d 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 8e792e9b80a..1362640b4f4 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 692b535991c..6f8f113bffc 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 6a28ff2d74c..06a88f02eee 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 171085b8007..fa60a3fd2ee 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 375f211d9fb..07928a62af1 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 804d3f9e66a..1ac398967d1 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 326dc9d63e6..afeea3ce65e 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 2d4f3de7e7c..b57af5f2134 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 28fd77df56b..2f5b6f76602 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 c80ded6e7ba..e7cbe2a8a8d 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 873d00946c0..3bfc07fbfdf 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 55b9023c7c6..a5cb9234601 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 5c6c8d186a4..d569cb58b9f 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 b2bff92b76d..e41c0a93c70 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 edc24576870..c84c11163a3 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 4caf91e7358..02523ada82f 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 c25ed43fdc5..3408d3a2a80 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 a88c1bc3cc1..d09692bc576 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 8bdaa465246..bedc54f92a3 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 9473e6b6b7c..8a79f65814c 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 952e06d1511..438d30a9135 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 edf1e6a182d..26198e64ee3 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 6b633d615c1..855c4a0aa01 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 37a724ec7cc..88e1d9f65df 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 1d80e316fdf..11e41ad6856 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 21e211a4a7e..f5184aacba9 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 de945e129b2..91d8264f769 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 a99236f4cc4..3dabec5f0b1 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 134293194b6..ac923bb6394 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 d05438ab5b2..e6da236552c 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 2e7097f88ce..3f9989090aa 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 826156fe11d..0c47c6f4bca 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 863b9d883e9..c3b6cf40be5 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 10356e4aeaf..aa48667e2e4 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 62f4515fccf..fc8bcafed45 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 4970a8c05e8..fb14df27bb7 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 8e69a4b67f7..f60b358dbee 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 8d5a9201d9b..fbd9cb09cf1 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) ** @@ -232,6 +232,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 diff --git a/src/gui/text/qplatformfontdatabase_qpa.h b/src/gui/text/qplatformfontdatabase_qpa.h index 901d8c2e6eb..9ee2bfd76a4 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 8fccd9b0ca0..65d97973744 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 b66bc04eabf..87f4a75bc7f 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 c941b986944..f0251b28f65 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 992cb2f720b..b1a71d96ab9 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 47815baf062..444efd0a0bc 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 a52cf25a986..c356aa7e99d 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 61a590c798d..ad55c6a05db 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 5f9410c31db..2607bcfe8a6 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 5f1a53b556e..d9bdeeddfee 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 1c421d1c260..bd64de34bbd 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 f74d67cf6df..b21dae5298c 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 f80c4c81b6e..e00ffd4042b 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 9c7ab563956..12dfbafb692 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 2bebf4c861c..766d9792cdd 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(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 bc4cdb5fb6a..32ded451376 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 c612169acfc..d64498a7ac0 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 8d9a8c405ac..30385045918 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 9d9af2b5bbd..b7c77c2c545 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 901375d8c85..9e410b40af0 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 fbf91bfc0e9..07a5230ec5f 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 0c8860e98ea..a42a4ce39a1 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 151a1a1ba54..cc7dd293f23 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 227123ed80c..44276d36291 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 5138aa3e700..80975f928be 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 bef4c844f65..e5f8cc19a80 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 11bf3fcb080..a371471b761 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 0b3f11042bc..7dc903c412e 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 d223b2ec37f..0dd8d0bef36 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 #include "qtextdocument_p.h" #include +#include #include @@ -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 d821fa50cb5..368ad3763d9 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 833414f79f0..9ce45fdaf3f 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(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()); @@ -3044,15 +3056,38 @@ QTextImageFormat::QTextImageFormat(const QTextFormat &fmt) Returns the current capitalization type of the font. */ +/*! + \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() */ /*! @@ -3078,6 +3113,28 @@ QTextImageFormat::QTextImageFormat(const QTextFormat &fmt) Returns the current word spacing value. */ +/*! + \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 a7bc15eb74f..5c9d6fe20ef 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(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 d7d082c39bd..61e3e1f2539 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 ced71f5c60b..4ee282c46e3 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 90199423046..f1a90ee0a3d 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 138fb1a168d..c7cf2df9031 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 8a14a46d5f1..ce1d481eba3 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 f2622a7b20a..1e8cb9e4783 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 QTextLine::glyphRuns(int from, int length) const QFontEngine *mainFontEngine = font.d->engineForScript(si.analysis.script); if (mainFontEngine->type() == QFontEngine::Multi) { QFontEngineMulti *multiFontEngine = static_cast(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 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 f1bfdc75db2..e698625d9bd 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 92e509d8d9c..97ad9dc82bf 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 83d10834c79..5a470f45825 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 d641266367b..e49b0d3ad89 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 c2b46e4d120..f56a38b3668 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 798b9d1340b..0ca2f87f0d6 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 8776b926c5c..0fe2efdd5fa 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 377c7fdeea8..51081752917 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 fe58583d046..2fe62845928 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 3c04c76933a..8b7b006921f 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 6935ffc6f41..64b28811e59 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 b275a5783ad..e5ea7609ddc 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 cd16f50a62c..237a1a883c6 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 0ffcade5918..b82e679d8bd 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 b1df316cab5..a569b584cf0 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 1ba93b88d73..0860c004f90 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 4fbf0a59f39..0bb233c82fb 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 ba7702f0d76..af9aa7bec71 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 f4b5263f628..d8224558862 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 c60cec84227..9e517a0166f 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 8b120b4bf15..fe6d65994aa 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 cf8dce3734f..e64833a20ce 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 7cebce0650a..7579e4ff780 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 37997c0359a..5b637e4383b 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 5ea7fef4fce..3e15b48c1ce 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 89d6c263e86..00000000000 --- 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 3d5558d3343..0047084eb15 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 c15337a0e54..638e93be538 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 3fff74cb5b7..5d037569575 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 9b0628f8291..162422f8c05 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 eaed4dff5a5..6fafff0f568 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 similarity index 92% rename from src/network/access/qftp.h rename to src/network/access/qftp_p.h index 671b9ba7c78..0dc6a2006f8 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 f2b24221fe3..00000000000 --- 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 -#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 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 > 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 >::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 >::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 seenKeys; - QList >::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 >::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 >::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 > &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 > 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 >::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 >::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 >::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 &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(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(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(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(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(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(socket)) { - QObject::connect(socket, SIGNAL(sslErrors(QList)), - q, SIGNAL(sslErrors(QList))); - 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(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 83b23f85f93..00000000000 --- 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 -#include -#include -#include -#include - -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 > &values); - void addValue(const QString &key, const QString &value); - QList > 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 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 &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 00000000000..6e87a05c6be --- /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 +#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 > 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 >::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 >::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 seenKeys; + QList >::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 >::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 >::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 > &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 > 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 >::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 >::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 >::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 00000000000..fec7da4f927 --- /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 +#include +#include +#include +#include + +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 > &values); + void addValue(const QString &key, const QString &value); + QList > 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 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 75456581f89..6de7a807e4a 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 76e8e14b8a2..317b068e3db 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 f57b0eb8a2b..0ab2fa1d7f8 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 fca3d5999e1..104a21f5913 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 #include -#include #include #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 networkSession) diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index 70b9cf37546..8ce9bf24fe9 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 #include #include +#include #include #include @@ -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 072648cf626..3acfe54ef7e 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 7a4dd07db1a..d5a0925f7da 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 ignoreSslErrorsList; diff --git a/src/network/access/qhttpnetworkheader.cpp b/src/network/access/qhttpnetworkheader.cpp index 1d457b90a73..531afe92e0f 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 38db0506b9c..00393b5e92a 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 e6d0d3238c3..a9ba5d2b249 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 a6bf3fcc8e4..1bb0832d19b 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 cbc0d97e127..e39faaeaa89 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 4000ecad873..71e09eba069 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 f0755337fcb..39a7e8ed083 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 d97193d7c7d..366d3bcc60c 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 1b15cf9cdf9..30e3174f250 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(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 ddfc11606d7..7e7be8ca8ab 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 8dfcb332821..6647c58f8d8 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 7f6aff9b79a..f9563da4a75 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 0458a59e225..2594e539491 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 b9f468e767d..813ba3c35fe 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 1881dac1265..baf62921246 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 be0f2fb84a5..54447037938 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 6a59bad2bd8..678d6e404e1 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 d22acf7c9fe..411c38b3ba3 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 6a8f0993a04..0080e23a8fc 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 795d4b9d257..2fbf806851c 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 0461da284bf..7b7ebb5e46f 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 2dc3c1becff..7338121493f 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 3978bd6c85d..3a80b9ed92a 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 c707243ec64..72fd86c5a54 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 39a9874acc9..bc8df575a0f 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 06707385fb8..a5c4fb516ce 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 0f7690c174a..fd9c825ddce 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 - Q_DECLARE_METATYPE(QNetworkCookie) Q_DECLARE_METATYPE(QList) diff --git a/src/network/access/qnetworkcookie_p.h b/src/network/access/qnetworkcookie_p.h index a059a7abbd0..7e45219fce2 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 a2fa6892563..54c2ccfabaa 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 006d58eafe9..4ff27d8cf02 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 #include -// ### Qt5 remove this include -#include - 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 34858d9c924..32fdecdb501 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 1c515c2ac73..8dd2033a355 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 5492a02d295..b8f1de5930e 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 ceb300d08c8..d8f386e9ebe 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 1ce7e8fce54..db62f2935ae 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(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, © }; - qt_metacall(QMetaObject::InvokeMetaMethod, id, arr); - } + setSslConfigurationImplementation(config); } /*! @@ -635,17 +621,52 @@ void QNetworkReply::setSslConfiguration(const QSslConfiguration &config) */ void QNetworkReply::ignoreSslErrors(const QList &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)"); - if (id != -1) { - QList copy(errors); - void *arr[] = { 0, © }; - 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 &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 &) +{ +} + /*! If this function is called, SSL errors related to network connection will be ignored, including certificate validation diff --git a/src/network/access/qnetworkreply.h b/src/network/access/qnetworkreply.h index f8352a2dfec..492336bbf6b 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 &); + private: Q_DECLARE_PRIVATE(QNetworkReply) }; diff --git a/src/network/access/qnetworkreply_p.h b/src/network/access/qnetworkreply_p.h index 687e65252ed..b725a115204 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 0cd10ce13b8..22f40b2420c 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 a63c4b1eeca..0b47bbbb345 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 decodeDataUrlResult; QBuffer decodedData; Q_DECLARE_PUBLIC(QNetworkReplyDataImpl) diff --git a/src/network/access/qnetworkreplyfileimpl.cpp b/src/network/access/qnetworkreplyfileimpl.cpp index 7a0c5c7fcce..0b4c89987c1 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 c9f5def12af..c097fedb688 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 2df18b24d96..2c1ad95ea82 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 0c6721b646e..432b769add9 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 &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 &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 46cc3641720..1f9efa6ed94 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 089c87e693f..0b7664acc66 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 &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 &errors); +#endif }; class QNetworkReplyImplPrivate: public QNetworkReplyPrivate diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index 608aaa5eec3..c909ce2fea5 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 aa860071278..66bfcf59421 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 54251c82a71..eb61f092f1e 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 b761eb2e9b3..5cf52af7449 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 64af68a5208..42481fcd153 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 bea7116451f..02f6e368072 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 424dfe1edd7..6533cebf4f7 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 28bbafab368..1a96ba77a95 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 e317cdfb44c..5f4e64b957e 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 54cd898c67f..5f8f0dff537 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 e73e9bb399d..dcd736cc6ee 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 e207feb97c5..150e1cf715a 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 4839b7b809a..5b650d03035 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 edb7105e6eb..9acda9210b5 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 f63298dba1d..7f76fde4f06 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 1eeea02ae10..5321875078b 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 ddf0428b526..c43762136db 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 f10eaaa489f..358bc95377c 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 31b61b53ec2..86946955a1f 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 8e649683463..0a3dddbe28a 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 #include #include -#include +#include #include #include #include @@ -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 QListoptions[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 QListoptions[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 37649e905b8..958532e9dcf 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 88a30511b17..4b79202d925 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 b662a1d610d..3bda5410d05 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 83e8a7ce3c0..4747499e382 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 255d7068587..bc863a85620 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 465345c0856..45073f6ad16 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) { return QHostInfoAgent::fromName(hostName); } +#endif /*! diff --git a/src/network/kernel/qhostinfo.h b/src/network/kernel/qhostinfo.h index 80e39573ed9..d84d6d72fa1 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 fb7ae37c537..35de89c1e9c 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 networkSession); +#endif }; class QHostInfoPrivate diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp index 37444ae2d97..73882dd54fc 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 10528634db6..fc3724f8797 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 ed479b2b3f8..1f69d9fa1bb 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 a749e53250d..17a8e09ceed 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 d58909eb6a4..a964f9bc545 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 528e195ef61..8bd7e327666 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 e8b96f6c470..da9fa80efc3 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 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 ipv4Netmasks() } } if (pAdapter != staticBuf) - qFree(pAdapter); + free(pAdapter); return ipv4netmasks; @@ -153,12 +153,12 @@ static QList 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 interfaceListingWinXP() } if (pAdapter != staticBuf) - qFree(pAdapter); + free(pAdapter); return interfaces; } @@ -234,12 +234,12 @@ static QList 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 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 f56d103a5f7..0445e512d26 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 19cf67feecf..a8873d3be9d 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 07da51e5ec1..472c220e629 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 f78f63d5616..9328eb379ab 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 56c25d66f52..a994976860d 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 84112867e05..84b2b79c111 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 fed954d30ab..8b320a9e039 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 bd460867bed..3bcdff6a9c9 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 d74a717d934..e1a24495937 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; } @@ -1453,27 +1477,6 @@ bool QAbstractSocket::isValid() const void QAbstractSocket::connectToHost(const QString &hostName, quint16 port, OpenMode openMode, 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) @@ -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(); @@ -2594,17 +2609,6 @@ void QAbstractSocket::close() \sa connectToHost() */ 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) diff --git a/src/network/socket/qabstractsocket.h b/src/network/socket/qabstractsocket.h index ee910e3b339..e821f3ddb2d 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 978fb1433a2..49e7c82e21f 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 7fc0ea39938..8c1ee88ce16 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 a8be98a0cf9..e365eb8b5eb 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 fd0119b8fd8..e882f77dcdf 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(); - QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(d->authenticator); + priv = QAuthenticatorPrivate::getPrivate(d->authenticator); + priv->hasFailed = true; + } + else if (d->authenticator.isNull()) + d->authenticator.detach(); + 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 d7cc7c1604e..1a93956bd21 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 ffd87aa9463..fc5fe3443ee 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 4468bf90e3b..6887c160566 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 ed699fc1d5c..d762818692f 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 47c42048020..cb4ee53f6a2 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 e0115de8d2a..5859ab00800 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 8e6bbc6deba..bdbe4d74f13 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 219d2aa8ad5..e311f6a060a 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 698c06377b5..bb39b0f4c8f 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 a0749fd35f7..3541d950e82 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 #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 38d2b627b13..3b83d0ee01c 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 1bdf604eb17..5bd929d477f 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 f595ba72ae5..99942a61385 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() -{ - 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())); - } - } - return 0; -} - void QLocalSocketPrivate::_q_pipeClosed() { Q_Q(QLocalSocket); - q->close(); + if (state == QLocalSocket::UnconnectedState) + return; + + emit q->readChannelFinished(); + if (state != QLocalSocket::ClosingState) { + state = QLocalSocket::ClosingState; + emit q->stateChanged(state); + if (state != QLocalSocket::ClosingState) + return; + } + state = QLocalSocket::UnconnectedState; + emit q->stateChanged(state); + emit q->disconnected(); + + 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(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 5e3e22a23e4..cae24693284 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 a024cd42d1b..60c13c12586 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 09aed255d67..324705d9986 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 247de010723..ee15702b761 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 fe22c329e44..7b2ba546489 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 5f510fa84b4..919bdea2e04 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 9b2f6e3adeb..386e4856a18 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 500d383e0ff..857827faccd 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 2fe090af326..a322294f58d 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 78fb4cd0506..f900ca752c1 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 8323836a546..aa2e89d840e 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 1ecc274fcdd..33672539cc5 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 e12034d86b3..f378fea7b9a 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 068c20b9c4e..ed5f539732c 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 d0d7584ff16..7bb68956eef 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 0793a846710..7da5a78c56f 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 d1624faaea5..5a4702d992b 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 dcc7f64aa45..3aa7075eb39 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 c4a833460aa..031165b2671 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 200ae3e0919..6c1d219a3bb 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 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 a583257a88a..3c59a8ebf9a 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 d9d3b9b31e7..8d58fa50ba9 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 a47c159adea..d4117abe3a6 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 0e9eb5db629..f29bb028135 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 ff8c8fc4b45..37df073ae98 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 class QList; class QSslCertificate; @@ -132,7 +132,7 @@ private: QSharedDataPointer 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 59078ae7cce..d9f41d63519 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 5091ed27a46..39e6d6114e9 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 451c95f180a..0bdc230b2e9 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 580b71bca9e..cb038d726f9 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 7064d22eb4b..d7d52fa9925 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 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 14075ecad07..1beb2a608ae 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 e3dd6ae0c5e..b428316a77b 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 &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 803e79e0c4c..936f27905ae 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 #include -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL # include # include #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 f70b4217bdf..96b2c8170b0 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(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(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 QSslSocketBackendPrivate::verify(QList 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(caCertificate.handle())); diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h index ef00b0998de..4d1ed9e6815 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 > errorList; // Platform specific functions diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index cd27c314569..c3bee3edd29 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 ad7a0a75577..1f1e842c133 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 b1dc656e883..6fa443d0c75 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 4374f80d350..50444ecc86d 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 904d20bdbb8..8324bab28e8 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 550b65237b8..9f1cd3cf32c 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 392c7775f8b..166779cd753 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 aebdce6e014..4daed7ebfa0 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 58c761df43e..fc922928cd0 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 1d35124bc85..8a6bce0d8cc 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 6ca09ba140b..96a8a4c33a6 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 600085a75f2..105afb157e9 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 5f239a698d2..2d013ae77ab 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 9fd16fcff9e..26f5076a5a9 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 45ac6392863..85773fa3ccd 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 dbf760929ca..629a0f3ddb6 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 3a3abb19d43..c3f02571007 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 7b7da9d8e80..ca5832ca4af 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 29e660fbc7e..7cad66e6ec3 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 2985a6e5502..3dbadaaddea 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 42235bca185..7afbaa9343b 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 5f164440be7..85c4eb9dbc4 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 2f8b677b7cc..78eb2d5d6b8 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 afa2772a6f8..009b43d297a 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 c1128a0ebd2..baeac676e75 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 0acf0c32edb..3dece18ab3b 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 8ff2f9fa0a6..8a3c9d7b868 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 cc8519173b7..5774aea1d07 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 42f1ea59ddd..34196b6181b 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 d391a996433..f8eff5a8bc2 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 d0d2b2773f8..dc62bf04261 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 817aecd9b74..a3211ebdfd5 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 61d39c6a07e..461d13bbccb 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 227e6cc176d..9c84fe637ea 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 3b50a1cd667..725fc22bc58 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 08807bdd49d..1ef13259c5e 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 32ae85dc904..c6300091714 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 ddabbef0b23..39f589cbaba 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 0c7ad38237c..09a7eeec7c2 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 05e161b7eff..559af5d63e7 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 0d1d8d6d217..8d8cd939750 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 af093bc9b4d..6ffba78b7c4 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 591aab27cd6..3af47e59390 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 c785fb29ada..b0c46a96cd3 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 7ae5f53d7e4..de6048acbf2 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 280baf48a54..a1a7f8bd897 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 facf8c9b7f1..8ac5039bf32 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 72da29c063d..857bc0356aa 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 82668a68c9d..980be04ff80 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 ea4b5566c52..5a01e5a03cb 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 7b5b9704153..1384f11b5eb 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 1f1f2154940..cab551fe519 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 7002c8b9c28..a0e984b390e 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 aeebd35d21b..a0a758fc518 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 ad77754eeec..3a2de0d7805 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 38aca26b424..9e6ff282ce2 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 005c44a0345..75ce257aac1 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 8a34e783573..e329dfb0b27 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 ba783c547a8..01e68661587 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 e50f57d9a8d..453fa06e137 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 similarity index 86% rename from src/platformsupport/eventdispatchers/qeventdispatcher_qpa.cpp rename to src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa.cpp index 8ccb1813655..838c59174d3 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 @@ -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 similarity index 83% rename from src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h rename to src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h index 7aeb7957429..b242f6350bc 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 aa395fec292..37b20752c23 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 6b0b152482c..d5c825092d0 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 9c5d3be637d..eb951cad410 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 3816ec58623..e7ccce445cd 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 0f4adca6f71..a859f6c6727 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 ecf2d4da490..389338b9114 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 ef2414a2d57..55e33fffaa1 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 6c3e403c51e..dc54efd67ba 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 &psNameToFam void QCoreTextFontDatabase::populateFontDatabase() { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + QCFType 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 63012f4f8dd..3e77548de65 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 687ddb24867..fa18de96214 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 502cf3819c0..543c170cdd2 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 5b65e13306f..3632f45b549 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 ce0c49d93f0..a857d734c39 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 4892b077290..df6fe99ed86 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 fa16fea6283..aa268ff9404 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 5c42931357e..c43658dd4a9 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 380ab06d9cb..737eab1a66e 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 ea9b10f66ce..e0ed477acbe 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 bac5ba20f06..db4737706eb 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 bcfc36799fb..95d82806598 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 1ceeb31b166..2c1330f1886 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(view)) { - header = tv->horizontalHeader(); -#endif -#ifndef QT_NO_TREEVIEW - } else if (const QTreeView *tv = qobject_cast(view)) { - header = tv->header(); -#endif - } - } - return header; -} - -QHeaderView *QAccessibleItemRow::verticalHeader() const -{ - QHeaderView *header = 0; -#ifndef QT_NO_TABLEVIEW - if (const QTableView *tv = qobject_cast(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(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(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(idx.model())->setData(idx, text, - Qt::AccessibleDescriptionRole); - break; - case Value: - const_cast(idx.model())->setData(idx, text, Qt::EditRole); - break; - default: - break; - } - } -} - -QModelIndex QAccessibleItemRow::childIndex(int child) const -{ - QList kids = children(); - Q_ASSERT(child >= 1 && child <= kids.count()); - return kids.at(child - 1); -} - -QList QAccessibleItemRow::children() const -{ - QList 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(view)) { - if (verticalHeader()) - ++count; - } -#endif - return count; -} - -int QAccessibleItemRow::indexOfChild(const QAccessibleInterface *iface) const -{ - if (!iface || iface->role() != Row) - return -1; - - //### meaningless code? - QList kids = children(); - QModelIndex idx = static_cast(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 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(view)) { - if (horizontalHeader()) { - if (!child) - return Row; - return ColumnHeader; - } - return TreeItem; -#endif -#ifndef QT_NO_LISTVIEW - } else if (qobject_cast(view)) { - return ListItem; -#endif -#ifndef QT_NO_TABLEVIEW - } else if (qobject_cast(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(m_view); -#endif -#ifndef QT_NO_TREEVIEW - tree = qobject_cast(m_view); -#endif -#ifndef QT_NO_TABLEVIEW - table = qobject_cast(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(itemView())) { - header = tv->horizontalHeader(); -#endif -#ifndef QT_NO_TREEVIEW - } else if (const QTreeView *tv = qobject_cast(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(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(itemView())) { - return (role == TreeItem || role == Row); -#endif -#ifndef QT_NO_LISTVIEW - } else if (qobject_cast(itemView())) { - return (role == ListItem); -#endif - } - // TableView - return role == Row; - } else { - if (false) { -#ifndef QT_NO_TREEVIEW - } else if (qobject_cast(itemView())) { - return (role == Tree); -#endif -#ifndef QT_NO_LISTVIEW - } else if (qobject_cast(itemView())) { - return (role == List); -#endif - } - // TableView - return (role == Table); - } -} - -QObject *QAccessibleItemView::object() const -{ - QObject *view = QAccessibleAbstractScrollArea::object(); - Q_ASSERT(qobject_cast(view)); - if (atViewport()) - view = qobject_cast(view)->viewport(); - return view; -} - -QAbstractItemView *QAccessibleItemView::itemView() const -{ - return qobject_cast(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(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(itemView())) { - entry = tree->visualIndex(index) + 1; -#endif -#ifndef QT_NO_LISTVIEW - } else if (QListView *list = qobject_cast(itemView())) { - entry = list->visualIndex(index) + 1; -#endif -#ifndef QT_NO_TABLEVIEW - } else if (QTableView *table = qobject_cast(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(view)) - return Table; -#endif -#ifndef QT_NO_LISTVIEW - if (qobject_cast(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(itemView())) - return QAccessible::queryAccessibleInterface(tree->header()); -#endif -#ifndef QT_NO_TABLEVIEW - if (QTableView *table = qobject_cast(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(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 *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 *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(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(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(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(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(child->object())); - if (index >= 0) - return ++index; - return -1; + return accessibleChildren().indexOf(qobject_cast(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; + if (!abstractScrollArea()->isVisible()) + return 0; - *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 (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(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(object()); diff --git a/src/plugins/accessible/widgets/complexwidgets.h b/src/plugins/accessible/widgets/complexwidgets.h index 2dde422b121..c596e0b3487 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 ¶ms); 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 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 ¶ms = 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 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 *rows); - int selectedColumns(int maxColumns, QList *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 b33260099f7..a7989ccd4e3 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(iface); - return logicalIndex(cell->m_index); + return logicalIndex(cell->m_index) - 1; } else if (iface->role() == QAccessible::ColumnHeader){ const QAccessibleTableHeaderCell* cell = static_cast(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(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(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(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(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(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(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 08e0bbb487e..4b5112350fe 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 821b219b36d..67e1a46703d 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 2fe67fedfe4..fcd118e745c 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(child->object())); - if (index != -1) - ++index; + return menu()->actions().indexOf(qobject_cast(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(child->object())); - if (index != -1) - ++index; + return menuBar()->actions().indexOf(qobject_cast(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(own)) { if (menu->activeAction() == m_action) - s |= QAccessible::Focused; + s.focused = true; #ifndef QT_NO_MENUBAR } else if (QMenuBar *menuBar = qobject_cast(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 cf6a703b0c1..873aacd5d4a 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 c1cdd7c45d1..70d1a7bf48b 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 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(area); -#endif -#ifndef QT_NO_WORKSPACE - const QWorkspace *workspace = qobject_cast(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 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 ¶ms) -{ - switch (method) { - case QAccessible::ListSupportedMethods: { - QSet set; - set << QAccessible::ListSupportedMethods << QAccessible::SetCursorPosition << QAccessible::GetCursorPosition; - return QVariant::fromValue(set | qvariant_cast >( - 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(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(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(object()); @@ -803,42 +648,26 @@ int QAccessibleMdiArea::childCount() const return mdiArea()->subWindowList().count(); } +QAccessibleInterface *QAccessibleMdiArea::child(int index) const +{ + QList 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(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 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(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,56 +725,22 @@ int QAccessibleMdiSubWindow::childCount() const return 0; } +QAccessibleInterface *QAccessibleMdiSubWindow::child(int index) const +{ + QMdiSubWindow *source = mdiSubWindow(); + if (index != 0 || !source->widget()) + return 0; + + return QAccessible::queryAccessibleInterface(source->widget()); +} + int QAccessibleMdiSubWindow::indexOfChild(const QAccessibleInterface *child) const { if (child && child->object() && child->object() == mdiSubWindow()->widget()) - return 1; + return 0; return -1; } -int QAccessibleMdiSubWindow::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) 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(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; -} - QRect QAccessibleMdiSubWindow::rect() const { if (mdiSubWindow()->isHidden()) @@ -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(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(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(object()); @@ -1041,10 +803,6 @@ QAccessibleDialogButtonBox::QAccessibleDialogButtonBox(QWidget *widget) Q_ASSERT(qobject_cast(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(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(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(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 kids = childWidgets(mainWindow(), true); @@ -1459,25 +1170,24 @@ int QAccessibleMainWindow::childCount() const int QAccessibleMainWindow::indexOfChild(const QAccessibleInterface *iface) const { QList kids = childWidgets(mainWindow(), true); - int childIndex = kids.indexOf(static_cast(iface->object())); - return childIndex == -1 ? -1 : ++childIndex; + return kids.indexOf(static_cast(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 232293b32a5..b53138636f6 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 ¶ms); 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 ¶ms); - 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 ¶ms); }; #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 ¶ms); 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 ¶ms); }; #endif //QT_NO_MAINWINDOW diff --git a/src/plugins/accessible/widgets/rangecontrols.cpp b/src/plugins/accessible/widgets/rangecontrols.cpp index 06ff8e2cbf4..6c439a71f0d 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 f6cbcc69006..218c48184ce 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 8f4fed48fe1..d645ad2d22c 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(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(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(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(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(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 ¶ms) -{ - switch (method) { - case QAccessible::ListSupportedMethods: { - QSet set; - set << QAccessible::ListSupportedMethods << QAccessible::SetCursorPosition << QAccessible::GetCursorPosition; - return QVariant::fromValue(set | qvariant_cast >( - 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 40386153bec..88bc931336f 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 ¶ms); 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 ead498e079d..12b18ac1ea3 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 a04f2a760f9..730e6857ed0 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 de3985efd36..254a5ddd87b 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 0175112c80c..ce944e33526 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 edb86650397..81024e0e8b4 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 00a8bd80872..02984597989 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 0980f79b99b..b6670c98d6f 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 e3282f12413..a6a64b8657c 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 781ec141b4d..7cc8e9db295 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 858d83a2f09..570640bc8f7 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 c81f56a92c6..5552252692e 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 838a6057f04..84d49a2365a 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 7e97ffef5b9..1413514794c 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 23abb2dbca0..33af624ce07 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 60e4640f22a..00000000000 --- 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 -#include -#include -#include -#include -#include -#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 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 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 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 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 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 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& args) { - emit signalReceived(interface, signal, args); } - -void DBusDispatcher::emitCallReply(const QString& method, - const QList& 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 bba63662fee..00000000000 --- 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 -#include - -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 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& args); - void emitCallReply(const QString& method, - const QList& args, - const QString& error = ""); - void synchronousDispatch(int timeout_ms); - -Q_SIGNALS: - void signalReceived(const QString& interface, - const QString& signal, - const QList& args); - void callReply(const QString& method, - const QList& 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 a29e326a225..00000000000 --- 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 -#include -#include - -#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 &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 f7b0ca316cd..00000000000 --- 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 -#include - -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 &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 ba20778861b..00000000000 --- 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 - -#include -#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 8cbf86d5482..00000000000 --- 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 2ab416ac5ac..00000000000 --- 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 -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -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&)), - icd, - SLOT(icdSignalReceived(const QString&, - const QString&, - const QList&))); - - QObject::disconnect(mDBus, - SIGNAL(callReply(const QString&, - const QList&, - const QString&)), - icd, - SLOT(icdCallReply(const QString&, - const QList&, - const QString&))); - - delete mDBus; - mDBus = 0; - } - - /* Icd2 dbus API functions */ - QStringList scan(icd_scan_request_flags flags, - QStringList &network_types, - QList& 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& state_results); - uint statistics(QList& stats_results); - uint addrinfo(QList& addr_results); - - void signalReceived(const QString& interface, - const QString& signal, - const QList& args); - void callReply(const QString& method, - const QList& args, - const QString& error); - -public: - DBusDispatcher *mDBus; - QString mMethod; - QString mInterface; - QString mSignal; - QString mError; - QList mArgs; - QList 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&)), - myfriend, - SLOT(icdSignalReceived(const QString&, - const QString&, - const QList&))); - - QObject::connect(mDBus, - SIGNAL(callReply(const QString&, - const QList&, - const QString&)), - myfriend, - SLOT(icdCallReply(const QString&, - const QList&, - 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& 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& /*args*/, - const QString& error) -{ - mMethod = method; - mError = error; -} - - -static void get_scan_result(QList& 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& 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 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& 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& 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& 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& 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& 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& 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 lst = reply.toList(); - for (int k=0; k& 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& 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& state_results) -{ - return d->state(state_results); -} - - -uint Icd::statistics(QList& stats_results) -{ - return d->statistics(stats_results); -} - - -uint Icd::addrinfo(QList& addr_results) -{ - return d->addrinfo(addr_results); -} - - -void Icd::icdSignalReceived(const QString& interface, - const QString& signal, - const QList& args) -{ - d->signalReceived(interface, signal, args); -} - - -void Icd::icdCallReply(const QString& method, - const QList& 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 367a1711898..00000000000 --- 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 -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#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 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& 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& state_results); - uint statistics(QList& stats_results); - uint addrinfo(QList& addr_results); - -private Q_SLOTS: - void icdSignalReceived(const QString& interface, - const QString& signal, - const QList& args); - void icdCallReply(const QString& method, - const QList& 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 904fabca942..00000000000 --- 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 -#include -#include -#include -#include -#include -#include -#include -#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 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 getEntries() const; - -private: - QString key; -}; - -#define withClient(c) for (GConfClient *c = gconf_client_get_default(); c; c=0) - - -QHash GConfItemFast::getEntries() const -{ - QHash 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="< queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery()); -}; - - -QList NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query) -{ - if (proxy_data_read == false) { - proxy_data_read = true; - proxy_conf.readProxyData(); - } - - QList 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 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 flush(const QNetworkProxyQuery &query); -}; - - -static QHash getValues(const QString& prefix) -{ - GConfItemFast item(prefix); - return item.getEntries(); -} - -static QHash 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 values = getValues(prefix); - QHash httpValues = getHttpValues(http_prefix); - - //qDebug()<<"values="< ProxyConfPrivate::flush(const QNetworkProxyQuery &query) -{ - QList 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 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 9f657f87ba2..00000000000 --- 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 -#include - -namespace Maemo { - -class ProxyConfPrivate; -class ProxyConf { -private: - ProxyConfPrivate *d_ptr; - -public: - ProxyConf(); - virtual ~ProxyConf(); - - QList 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 d79a513ec44..00000000000 --- 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 -#include -#include -#include - -#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 timers; - -public: - IapAddTimer() {} - ~IapAddTimer() {} - - void add(QString& iap_id, QIcdEngine *d); - void del(QString& iap_id); - void removeAll(); -}; - - -void IapAddTimer::removeAll() -{ - QHashIterator 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 scanned) -{ - /* Contains all known iap_ids from storage */ - QList knownConfigs = accessPointConfigurations.keys(); - - /* Contains all known WLAN network ids (like ssid) from storage */ - QMultiHash notDiscoveredWLANConfigs; - - QList 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; imutex.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 known_iaps = notDiscoveredWLANConfigs.values(toIcdConfig(ptr)->network_id); -rescan_list: - if (!known_iaps.isEmpty()) { - for (int k=0; kwlan_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 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 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 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 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 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(); - 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 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 a72cc72b8e7..00000000000 --- 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 - -#include - -#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(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 scanned = QList()); - void cancelAsyncConfigurationUpdate(); - void getIcdInitialState(); - bool ensureDBusConnection(); - -private: - IapMonitor *iapMonitor; - QDBusInterface *m_dbusInterface; - QTimer m_scanTimer; - QString m_onlineIapId; - QStringList m_typesToBeScanned; - QList 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 f08d8bf363c..00000000000 --- 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 - -#include -#include -#include - -#include -#include -#include - -#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()); - - for (int i = 0; i < detailsList.count(); ++i) - argument << detailsList[i]; - - argument.endArray(); - - return argument; -} - -static QHash 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 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 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"<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"<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 b47396b8e10..00000000000 --- 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 -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#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 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(); - qDBusRegisterMetaType(); - - 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 b98ee7e64cf..00000000000 --- 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 -#include -#include -#include - -/* 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 ce7d9063c22..5e9fb6ed7db 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 41ff30a165d..62ea55c6b2d 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 48f5536eda0..6bde5d46de1 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 c38b43ad970..2307538028e 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 5377bb0d588..01932429b1b 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 43c1d28c9b1..dd845314f56 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 24c170d52f3..445c3166270 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 8ca94b97d8a..126d3da891d 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 e8fd0d0284c..2c2f35a06c3 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 e66be4c51a1..86b6376ca76 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 0b84c5153ad..93f141b7a6d 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 963fbaa1df3..e70a3e381e8 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 c1556231404..a9ee4b4bb3f 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 72b3db82414..c0b6311f7de 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 1d8a8426e17..a4c9bac11ba 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 6a61c1bee0c..01bce7bf72b 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 4a14dcc9908..ab0c44321e3 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 a15ef9a44b7..e022c7b7d25 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 fc2e94b5a63..11a3dd0e6c9 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 11be817289f..fb1e61a4519 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 e647c5e78a3..28d42e0983d 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 4aacc42c8e1..492f59b2952 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 834ca31ad6a..f2e51cd57d1 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 2891f55671e..e4b22935db7 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 1154f443c4b..4ff555220bd 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 e40ba9506ca..af02ed95e4a 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 e73f67801b7..8c9d78087c2 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 37940440dbe..1f577498fbd 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 e9b3691174e..99c756e8594 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 eabbeca7863..aaf02a90d0c 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 8e1c5e52c70..feb0f410c19 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 a0ff5a453e4..069f49a1372 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 2a732ffc424..ac89b333c41 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 e61cc9136cf..c56a1033668 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 f54db8dc3f9..25723c79996 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 f5aea6554f2..6c0ea3d415b 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 683dee3f74f..16c49b6eea6 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 ec6395adeb8..979b9bb8bcb 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 0a86c274e89..d5be33e74ba 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 cb2792f232f..159752cc269 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 9ec7c75220c..f337dd8d8ad 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 495e378ef59..c5b649ef6fd 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 f76cba4dbc3..d63876c5d80 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 20391901bf9..d86fa125436 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 943b213ce07..497ae7d3bf3 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 b9475a1bf51..9f35397fd33 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 bed90163295..ac73f5f147e 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 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 ff476d16485..8ecd924950e 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 08db058e101..ced72e1599f 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 &points) +void QTouchEventSenderQPA::touch_point(const QList &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 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 b6e1613b24c..1eee2731591 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 &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 &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 fd2de62d6bc..8f37bab0c4f 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 +#include #include -#include #include #include #include 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 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 m_contacts, m_lastContacts; + QHash m_contacts, m_lastContacts; Contact m_currentData; + int findClosestContact(const QHash &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 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) { - m_touchPoints.clear(); - for (QMap::iterator it = m_contacts.begin(), ite = m_contacts.end(); - it != ite; ++it) { - QWindowSystemInterface::TouchPoint tp; - tp.id = it->trackingId; - tp.isPrimary = it->primary; - tp.pressure = it->state == Qt::TouchPointReleased ? 0 : 1; + // 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(); - if (m_lastContacts.contains(it->trackingId)) { - const Contact &prev(m_lastContacts.value(it->trackingId)); - if (it->state == Qt::TouchPointReleased) { + m_touchPoints.clear(); + Qt::TouchPointStates combinedStates; + QMutableHashIterator it(m_contacts); + while (it.hasNext()) { + it.next(); + QWindowSystemInterface::TouchPoint tp; + Contact &contact(it.value()); + tp.id = contact.trackingId; + tp.flags = contact.flags; + + 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 &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; - } - 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; + int minDist = -1, id = -1; + for (QHash::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() << " " << tp.id << tp.area << pointState << tp.normalPosition - << tp.pressure << tp.isPrimary << tp.area.center(); } + if (dist) + *dist = minDist; + return id; +} + +void QTouchScreenData::assignIds() +{ + QHash candidates = m_lastContacts, pending = m_contacts, newContacts; + int maxId = -1; + QHash::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); + } + } + m_contacts = newContacts; } diff --git a/src/plugins/generic/touchscreen/qtouchscreen.h b/src/plugins/generic/touchscreen/qtouchscreen.h index 3c35b0012f0..546826c8db8 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 &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 &points) = 0; }; class QTouchScreenHandler : public QObject diff --git a/src/plugins/generic/tslib/main.cpp b/src/plugins/generic/tslib/main.cpp index 9e86e26ece3..49bc60a6151 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 1349b9dbba2..5b08ec8a342 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 ea7e227c3cc..5e595b5a0ca 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 7a7cc0a9957..b006d56fd71 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 1d572fbe5db..ac9ceb037c3 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 da6b8a75bc5..c05ee126711 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 8a338018bbb..d6bf97f3194 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 785b77b6468..ed457ca7ec0 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 ae4909fa69f..9fed507ce41 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 6323b387f7d..4bfd07b8366 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 9d2dbc6b2a4..c93fef670a7 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 7adffbc2e2f..9d64b788622 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 9a91c4e484b..56e194c66b7 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 6ab142ce257..ed858c88534 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 5f0b4d46911..0f57bcd5a56 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 9d64b603f3c..c177c4f04a9 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 389eec3175f..7d7d174162f 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 c6dcfb10b9b..424ea02fe33 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 6848149c8b1..1c9c33e159b 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 45b1102a989..da5920c3963 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 8f134a5cb0d..2150cd1e573 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 f8558b498d2..5c87a9caed9 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 c66ea4a1782..cab0be40675 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 04eb28eab2d..4e6e724bdc4 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 5715d8f19a5..8f202384057 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 3ad589409c2..31cb82ba076 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 d59a0f1a0d8..09b708d9a19 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 0be6ebd6827..f88e1b77869 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 7f4a840b159..c3376ad5c59 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 +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 a2ce7438041..436d27eddfe 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 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 76509f9e438..2136d6628aa 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 332577d6e95..830e6860b7c 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 5b6b2f48f2a..edd50958de3 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 388e56db8e6..b389635eaaa 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(event))) + if (qApp && qApp->macEventFilter(0, reinterpret_cast(event))) return true; if ([event type] == NSApplicationDefined) { diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h index 7f8d1dfacd4..00546d6fe50 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 debda912434..26928d0df5b 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 359b5d34d01..1ce2c1bd051 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 d97793634e6..e6d7ecc82b2 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 938e27347c8..70ac8e109cb 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 0cde19644ef..8f7b0aafde7 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 #include @@ -80,6 +81,7 @@ void QCocoaBackingStore::flush(QWindow *widget, const QRegion ®ion, 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 dd66185f701..2c58994119f 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 67386c78e17..cd0a173596c 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 7184db84fac..823a5626fe9 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 #include #include #include -#include +#include +#include #include @@ -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,32 +123,16 @@ 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 registeredTimers(QObject *object) const; void wakeUp(); void interrupt(); - -private: - //friend void qt_mac_select_timer_callbk(__EventLoopTimer*, void*); - friend class QApplicationPrivate; + void flush(); }; -struct MacTimerInfo { - int id; - int interval; - QObject *obj; - bool pending; - CFRunLoopTimerRef runLoopTimer; - bool operator==(const MacTimerInfo &other) - { - return (id == other.id); - } -}; -typedef QHash MacTimerHash; - struct MacSocketInfo { MacSocketInfo() : socket(0), runloop(0), readNotifier(0), writeNotifier(0) {} CFSocketRef socket; @@ -156,33 +142,39 @@ struct MacSocketInfo { }; typedef QHash 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 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 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 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 8cdf40be78c..5c220507119 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 - - MacTimerInfo *tmr; - tmr = macTimerHash.value(timerID); - if (tmr == 0 || tmr->pending == true) - return; // Can't send another timer event if it's pending. - - - if (blockSendPostedEvents) { - QCoreApplication::postEvent(tmr->obj, new QTimerEvent(tmr->id)); - } 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; - } - + QCocoaEventDispatcherPrivate *d = static_cast(info); + (void) d->timerInfoList.activateTimers(); + d->maybeStartCFRunLoopTimer(); } -void QCocoaEventDispatcher::registerTimer(int timerId, int interval, QObject *obj) +void QCocoaEventDispatcherPrivate::maybeStartCFRunLoopTimer() +{ + if (timerInfoList.isEmpty()) { + // no active timers, so the CFRunLoopTimerRef should not be active either + Q_ASSERT(runLoopTimerRef == 0); + return; + } + + 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); + + CFRunLoopAddTimer(mainRunLoop(), runLoopTimerRef, kCFRunLoopCommonModes); + } else { + // 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, 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::registeredTimers(QObject *object) const { +#ifndef QT_NO_DEBUG if (!object) { - qWarning("QEventDispatcherMac:registeredTimers: invalid argument"); + qWarning("QCocoaEventDispatcher:registeredTimers: invalid argument"); return QList(); } +#endif - QList 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 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(info), blockSendPostedEvents); + static_cast(info)->processPostedEvents(); } void QCocoaEventDispatcherPrivate::postedEventsSourcePerformCallback(void *info) { - processPostedEvents(static_cast(info), blockSendPostedEvents); + static_cast(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 c5c40c69a13..e99fe58570a 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 820a5dcbd0a..a513237977e 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 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; - + 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(mDelegate); - bool hideDetails = qtFileDialog->testOption(QFileDialog::HideNameFilterDetails); - [delegate setNameFilters:filters hideDetails:hideDetails]; -} - void QCocoaFileDialogHelper::setFilter_sys() { QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast(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(mDelegate); [delegate->mPopUpButton selectItemAtIndex:index]; @@ -627,7 +613,7 @@ QString QCocoaFileDialogHelper::selectedNameFilter_sys() const { QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast(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(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(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 dc8a428a912..652c3b33c8c 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 2b21f086017..08c0ce61a8b 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 4ab19ee3fd3..61076aadd4c 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 1ac6911461e..45aa90c2960 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 #include +#include 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(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 1852173b5bf..46e8925ba74 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 #include QT_BEGIN_NAMESPACE @@ -90,11 +91,12 @@ public: QPlatformTheme *platformTheme() const; private: - QPlatformFontDatabase *mFontDb; + + QScopedPointer mFontDb; QAbstractEventDispatcher *mEventDispatcher; - QPlatformAccessibility *mAccessibility; - QPlatformTheme *mPlatformTheme; + QScopedPointer mAccessibility; + QScopedPointer mPlatformTheme; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 6d7770feccb..685b640843b 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 4e8ce20580f..e0ba8a116f9 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 1bb5f45a94d..5f695eb07af 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 2fcda512f09..c4b56a6d198 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 353808655fb..3c7d3c8bffa 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 f8216d8e616..3c190aedb20 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 c6aa0d39e63..426ac1e494d 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(window->handle())->currentContext()->nsOpenGLContext(); + } else if (resourceString == "nsview") { + return static_cast(window->handle())->m_contentView; } return 0; } diff --git a/src/plugins/platforms/cocoa/qcocoatheme.h b/src/plugins/platforms/cocoa/qcocoatheme.h index 8a7add73a84..901f6443f92 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 ef73cc2abef..db333417a9b 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 9fa04a0ca23..d3dc7d5f918 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 de38db5fab6..66f4b602d96 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(reinterpret_cast(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 0bca25ff5f4..1e72b2fa41a 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 dde6464392f..db6dda79f1f 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 855bfc2a06f..43767b09b26 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 811813c9631..146c21d53c7 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 eddc1aa7e90..73c8030e1dc 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 #include +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 4ae268dda5a..26ddd44aa63 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 #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 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 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 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 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 327bace123c..da6e4d04810 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 5cd226a71d3..c41477cc497 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 869ef7840b8..ddbff031c97 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 1a254e4fe75..77d8a7e5191 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 958a3be5e3f..0736b284c96 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 9e539392323..652a5b53da2 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 9666deb1c7c..8e03cde1017 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 2b129d547ef..d51237e7e8e 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 63b98a3fcb9..bb5fa0b288b 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 d1c6a0d6eea..99120dd25f0 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 a448cc7f6fc..9df56ac66a3 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 3a6176a2164..1dfce81eab8 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 1d3b2b37a31..3967630fde4 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 ec0c7446fa3..8a95f03d616 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 7c888ddcac8..91ae24d9769 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 2311ff2d04f..4a6018a99a9 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 3b803537bab..bcb291cdde3 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 5641943970d..ab9aa912a1d 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 b40e64e25ab..6c579f0dc70 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 42a085261d7..58372b4178f 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 c903a2995c2..6b9855e4898 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 b9d53beaa51..a3e1f1eebff 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 4648ed42f02..b18970cb50a 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 35b44ca8df9..bf009a14410 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 050dc62ac7f..f88ef1c9284 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 1d27be7fb34..448958758a1 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(window->screen()->handle())); } -void QEglFSBackingStore::flush(QWindow *widget, const QRegion ®ion, const QPoint &offset) +void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, 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(m_paintDevice)->context()->swapBuffers(); } diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.h b/src/plugins/platforms/eglfs/qeglfsbackingstore.h index d6a28a76657..7057544174a 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 57579e8fefd..47d5bd49eb7 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 9538850faf5..58af1462b0d 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 abbe0d951f1..ad1db3cd1cc 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 41465d871c4..c9b9ecd442f 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 a6115cc8290..7c5df8b1972 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 09f553d3b78..83ad7886b39 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 a07f1645dcb..743b82dbf49 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 eb682e8ab3c..7d6e709c4dd 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 e270d04db0d..6d06697cf1c 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 0c2eec0f3b6..743c592383a 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 59db7ebeb1f..1a0a41cf47f 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 f27673a24db..5a966deca4d 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 2f4f44c3d04..e1c636d925a 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 91c23b0f1cd..825c884a98c 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 96be88e991c..b4276c7b0c8 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 e0fac5611db..ed33829baab 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 4868a72ede1..5b4583a03be 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 d0055f258aa..5d219d73277 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 15bbd1b8278..4b3f5dc74b8 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 9ea20ae5055..26189b2d138 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 5807366f8b5..f78663dbf40 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 63271c4ef5d..5d540a8eb6a 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 789d42e6f85..6433ab7fd9c 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 aca8110c777..99efc68a320 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 1c098a0ffc1..7f76b045dea 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 f972a304526..1c10a6b8fc4 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 2627855ea0f..4d9b24edc1d 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 08281405a4e..c564e8eff06 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 9b61275e9d1..717474cd27c 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 7d882caecfb..05fd28a08b6 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 0835c39ab69..01118c32ee5 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 a93ee780f86..7b857d288cc 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 cd99daf1fa9..37f697a787c 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 418b3d7ae6b..c4808790e0d 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 7dadc291487..1e9960f0115 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 38c4325bb41..c882cb96c7e 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 43961add6d4..c10aecb8215 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 e20904470f1..14f7438b99c 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 f48c3a2bc05..3142aa2faa7 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 2d54d90e464..a48a342679a 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 22dee8c8ac9..3eb8010773b 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 19220a65742..de6b2e38b36 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 d8e4cc984cc..29a02fedb5f 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 6dc6a38439f..c661ad8ffe8 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 dad23c1638a..17136b88a1e 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 b6e22d820c2..2bd7b9e4175 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 c0159e72180..c7c05718adf 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 9e2d86a6180..b166d6e7f9b 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 c173de6c196..f7b2bb97342 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 d3ff6d45d8f..5c3049cfe40 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 83a55391245..32c3c0f74b6 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 748dde65e7f..3a54210bf89 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 3010fdb55b5..e807afbe363 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 0db717c4d61..e83c0da42c6 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 3287a853c78..bef8739fcba 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 3d577591833..ad9afb345d7 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 b5315b31da0..0359dc60d66 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 758e0c43980..b9647ac9c40 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 cff49dc8b07..5311d75f0ec 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 fb3292c31ab..da144b841e1 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 1697f076a9b..b852286061b 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 5f38e48eed6..7da54acbb79 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 497c43749ef..9378c3bc6a6 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 4e507a42a15..669ace68c35 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 dd953394049..93297d56735 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 0d3361899bf..0c6c8881646 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 fc65e504aca..5bd6cf243d7 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 15dc4b11c45..00f452a226b 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 3c97b014b1d..10cdda650e1 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 1c6b3907f4d..a603f7a414c 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 1ddf934ee9c..ae9b3ffebf5 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 c6bfcc519cb..cea8fe05948 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 3fdfe29cb1e..94b743ba161 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 2759fae848c..450f87c6462 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 662354e13cc..33d10091d84 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 889a6d063fe..9f787b79dd7 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 a5c02becf17..cdc4c78baeb 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 47d08702ac8..dca4013ee86 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 d7d9fe23075..cde3bba4e42 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 a0aa110508d..812de5ab052 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 893ab233e98..4519f8b6455 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 8884f634756..eef5976aa93 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 b8a15b38075..53ade53d482 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 37ba2b9a021..6d616a53170 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 bde4f89a1ef..ca26b3d5f9f 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 b938542df49..3955ba7e85c 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 7e4f8e9ddc5..9093e26049a 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 67f0242a483..b38cb877c94 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 cc17dbcbfb4..ddf52a8ed68 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 be3f608c599..c0f486a4dd8 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 54723f8a1aa..a78a47c2ea2 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 333c09fc801..9fd77ea87cc 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 5073f534d86..44f3bf45fac 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 5ca603a2da8..af9d6816e9e 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 7506bff3072..06eb52529a0 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 9787a59f0fb..c594ffb1421 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 37412b6bd10..832206c2eac 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 1ff8945f442..c3042410f4d 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 699bff5ac12..f098a77d006 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 69ef24be72e..4d8d4e732eb 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 770da9e9c6a..abb38a1bfd6 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 254463e445f..599fb0d2016 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 aa4507484da..fdf6c9116e2 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 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 aec3ffd4b15..892480ecf48 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 ecabdcfcc77..56e74c55875 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 72120abb344..60cc5ad7878 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 bc70307015c..e5edab3f4ba 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 ffe441f7320..321db201e8b 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 f620cf87241..5e101d1869e 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")); + if (!setLayeredWindowAttributes || !updateLayeredWindow) + qFatal("This version of Windows is not supported (User32.dll is missing the symbols 'SetLayeredWindowAttributes', 'UpdateLayeredWindow')."); + updateLayeredWindowIndirect = (UpdateLayeredWindowIndirect)(library.resolve("UpdateLayeredWindowIndirect")); - - Q_ASSERT(setLayeredWindowAttributes && updateLayeredWindow - && 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 1ff93e2d88f..9a8acbbb51d 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 a3edd785d3d..2b228e9fb8e 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 261aacc09e7..61ed170af26 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 58352470a67..9023769b8b8 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 -QWindowsDialogHelperBase::QWindowsDialogHelperBase(QDialog *dialog) : - m_dialog(dialog), +QWindowsDialogHelperBase::QWindowsDialogHelperBase() : m_nativeDialog(0), m_ownerWindow(0) { @@ -437,11 +436,8 @@ template QWindowsNativeDialogBase *QWindowsDialogHelperBase::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 -bool QWindowsDialogHelperBase::show_sys(QWindow *parent) +bool QWindowsDialogHelperBase::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::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(reinterpret_cast(s.utf16())); + m_fileDialog->SetDefaultExtension(wSuffix); +} + +void QWindowsNativeFileDialogBase::setLabelText(QFileDialogOptions::DialogLabel l, const QString &text) +{ + wchar_t *wText = const_cast(reinterpret_cast(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 { public: - explicit QWindowsFileDialogHelper(QDialog *dialog) : - QWindowsDialogHelperBase(dialog), - m_fileDialog(qobject_cast(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(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 &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 { public: - QWindowsColorDialogHelper(QDialog *dialog) : - QWindowsDialogHelperBase(dialog), m_currentColor(new QColor) { } + QWindowsColorDialogHelper() {} virtual bool supportsNonModalDialog() { return false; } @@ -1307,11 +1344,18 @@ public: private: inline QWindowsNativeColorDialog *nativeFileDialog() const { return static_cast(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 96c03bbaeca..120076e58bb 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 56f3a6d9060..cbd81b99a00 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 621b769d280..2f2aa569f1b 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 b96ae6f3da9..5969fbf0abd 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 #include +#include + #if !defined(QT_NO_DIRECTWRITE) # include # include diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.h b/src/plugins/platforms/windows/qwindowsfontdatabase.h index 2e25ccf1a13..c991aed5cae 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 1c4a855255b..c7bd5ebbb1d 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 #include +#include + 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 d9b8106227b..94cf556925b 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 b4faf597e12..f6c456bc7b2 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 9831d568eae..75968cc4034 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 6f1e12a6d02..293c1c3b15b 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 1dfa69e3b7b..f995c49a602 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 1685adccec9..1866faecd1a 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 f2784f3d9bd..17a33a7c14c 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 06ee97278aa..cd5d28317e5 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 c385631a30e..8d2bc1997bb 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 8cd26f1efe9..41c1a6c8f01 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 17cae5b1582..d735d1fd935 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 cebb17c9c7e..8bb8bafe74c 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(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 1c2a714fcb8..fa133fa5de7 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 9997bddcf77..ceecd08f701 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 8049b0832d0..369deb75987 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 0eb743c924f..e5e50c58861 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 cd4da16cffd..026ab94d32d 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 3b71e55cfac..adac573375e 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 a2b6aa8d680..e491029ea10 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 178936e2ec2..4885d82b847 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 2b252842e24..353366db8fa 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 f2efca55f9f..6d453b05098 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 f7b84a7b66b..fc61c2aa474 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 0da55a8a886..47fc22526c9 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 08696a646b2..c8966f2ecc5 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 b4243756944..dc1c8238d9c 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 a7001719fe0..31adcfa1670 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 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 057e30d2627..9bb937d6077 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 f61e15ddedd..282576105f6 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 95e497acdbe..364f3d0bc5d 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 c544f7073dc..16ef7628a7a 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 31e613d4ba9..c16052f021a 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 6b93a0a93f5..7c4dbb35c22 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 de41f862bd2..86b7f091669 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 211a654c03f..93c4805ec82 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 fb8384212db..ad8b47c25ac 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); + // 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(); - xcb_image_destroy(subimage); + // 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 a389f97ac3e..70fed465636 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 03ee054f594..14d802a8bd9 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 3fd59964c1e..c3b072984eb 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 6969124b2a6..ca21b1eb9de 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 *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 *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 *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 ebe95c00134..c227b4c863d 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 #include #include +#include #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 QXcbEventArray; + class QXcbConnection; class QXcbEventReader : public QThread { @@ -263,7 +266,7 @@ public: void run(); #endif - QList *lock(); + QXcbEventArray *lock(); void unlock(); signals: @@ -273,7 +276,7 @@ private: void addEvent(xcb_generic_event_t *event); QMutex m_mutex; - QList m_events; + QXcbEventArray m_events; QXcbConnection *m_connection; }; @@ -337,7 +340,7 @@ public: xcb_generic_event_t *checkEvent(int type); template - 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 -xcb_generic_event_t *QXcbConnection::checkEvent(const T &checker) +xcb_generic_event_t *QXcbConnection::checkEvent(T &checker) { - QList *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 719fc85ae20..12b3d67b9fc 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 f6856d56946..a00fdd48244 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 4bbb9a928b8..f766d7c74e8 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 c15bbeed83a..89b1fa7445f 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 8142a778755..0233cc32b22 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 a372cd98306..c4367cf5727 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 569e4fc4e47..824805a9839 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 1e7f1040847..6a066109374 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 2190722f98d..3cf50cbbd97 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 91fcc0b6cb0..8a3926dbfb9 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 581693ccb72..ef71b783398 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 a4b6a28886c..4a62dde11a1 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 271d41ae752..5d86a118c71 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 ac032db4426..02be4c9c5b5 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 5e0af8d24d2..52ff30991e4 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 0902af03eb5..517e92bc647 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 a5940665458..b164f63f762 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 1336ddb32af..8b01b4389f6 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 76cc0fa1b43..1975d561898 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 8e01c8ec404..2cd2a15fb73 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 6ff1627f985..f0b64376991 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 15e423e95b7..f06c9c503c3 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 7b0a21f035f..faa0934a3df 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 b4241fa2282..41c86a5c189 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 6733f220937..c995070fe38 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 e3172b718c3..c1ef2c9d367 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 24a346a29da..954b7c32a58 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 35093f67844..7c0ac4b2524 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 3ee4d4269cc..601314ff4f3 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 8fdc18b7d4e..e9faef465bf 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 7a074bc0e68..44c9ccd4898 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 fd574778d7f..74d520e2d1b 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 32cffcf4fe4..9e9536c93d4 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 650b72c6ddb..02cbd42809c 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 c1f09416198..216673cc651 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 f5150fca6fb..3b505df65a8 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 1d3dc83464d..688ff5bf4a7 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 a33ad61d273..4f781983e68 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 4f29a130634..40faa7ed981 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 ddfe908d885..a10b0002f99 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 2c706e64e4f..154b31fe3ff 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 4c6ce770b06..7bb5b01f615 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 314a3e4ecb1..c9b8bae49a8 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 13fc03ef0f1..44d2174f17f 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 c9ed13aeea7..147c591b858 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 a4a2106a772..d203fa3d5de 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 c14fadaaaad..eeb028d359a 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 9b64dc56245..f3e83deed57 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 14036e690c6..d88db04f288 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 1ed8f6d0ad8..415663b2604 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 09ae6325875..1420186a361 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 f7033733e17..208c26ea0b2 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 c45e79587a6..2774d0693a4 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 b8e9bdd8355..1a6ca90776e 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 6b3e0882080..059620314e5 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 de16ea760e4..5243c2cb337 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 a97126501bc..8d95db8867b 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 cd5debfd757..9b8cac6f982 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 ecaca846703..ce2273da5bb 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 f61ace9f4bf..8027f01bf37 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 de2299cc755..ebdb0b4d549 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 bde409ddc6e..81e3a21f9b2 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 8268065bfd8..33408b6bd27 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 597a7258d90..821d8775da5 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 3a4711dd6bd..659114cc8eb 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 25a287945cf..fa91c715c03 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 2f8a750827e..da6c8313475 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 e329cb3169e..3ecd749f2df 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 9c37572c3d0..f63835f5e40 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 1581ce6c418..1bc94ba9de2 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 0bbdbcc2427..d2bbfaa412e 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 e5b12f8ba53..6dc182631c3 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 2303db9fe84..c51b68dcadb 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 f177ec4ea5b..276cfc1b5b7 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 06ad99d02eb..09d5213bad2 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 6418fa2b585..238e22df51b 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 b1f211ffb3b..a4f73ea3968 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 d503623baef..2e338ad884b 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 d413faeb18e..24ba6e69103 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 7e5c7dac942..50783969c56 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 f2997b09f5b..f87cedafa71 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 76050d9d71e..46a6545952f 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 cb7a79e4868..3ad6e3e6a30 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 beda2c71448..6c0d1d8c26e 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 b662c166e8b..e04d2a61da4 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 3cf06f5770b..12de24d59d2 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 c2e11313c2a..417870827e5 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 e97ca3fef46..08a59f5f1bb 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 800713c5bbb..690f91bd0b4 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 8b3c75127e1..6b131855e8e 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 831a0546b0f..173e7818a2e 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 782b6ef8bd5..222f992f622 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 c8ce2cfa0f7..e66dfe5ae91 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 483cde9af99..c97635f941e 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 52fd7650510..48256388eaf 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 566e42ea2fb..e11b3cb63c9 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 03d58667d47..ae5b2def62d 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 f09a4cc7980..a4964d64bc2 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 362202fe322..d7982073794 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 baff9e88dc4..c49c8ab7cd0 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 59e6f2c138f..22372158dc3 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 6c94e4e2272..6a30eb062e0 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 63b7a2a7d94..9aeba9a4ce9 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 c12aa395561..4d69e5ae212 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 6514a1af8b9..551f9d2cedf 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 1c12bc09453..d3551b9c088 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 1cd782dbcbb..f8a803568ec 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 51450c134b5..4982aba7760 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 f5423d963dd..3d08649de9a 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 878d5f2a2b7..cd8d302db57 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 96b3b3fff1b..b0d8d04d1e5 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 b45d7c3bab8..632d29305bd 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 059cce6f5c0..9b4f8874217 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 1d1bf599622..5b82829221d 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 168ea22e3ef..f0d66ea8726 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& 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 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 1ac4549f6f4..c28ebce5350 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 c8578c6de70..55d8cc6146f 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 8b23bfbeb4c..16a40463fb1 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 38e4a63d578..d7ec53c451f 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(driver())->d->results.removeOne(this); + const QSqlDriver *sqlDriver = driver(); + if (sqlDriver) + qobject_cast(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 2ee8e096619..eac90b1e473 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 6593a696259..d69acc15a60 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 a34706d8f3c..6372495a54c 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 735e68b6033..c97d96beb8d 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 7808b5fd14f..d14d1b6cf7a 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 f23b518bfb1..54c9a684f6a 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 06ea6012297..a935acb661f 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 78a9758c9ea..a2ae24a2f48 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 dced9e74792..c2e4aeb2be7 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 6aa45c46e17..7ba3c249997 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 72c5694cebd..9dfbd43ed20 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 f5436ff594e..3b64bb10cb2 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 ee1e52538af..446cdf4df6d 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 8b9adb64d01..0f98ce31962 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 2c1def0a542..13ffd1e409a 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 fd731e4974e..8a8d2c318ad 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 c1df370a86a..11ebf5a615e 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 95e9a195a66..dca9e169fa9 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 93992ea9d43..3188b18a4a6 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 764e93a6783..ad66e814ef2 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 c88e30603f1..328a8716e23 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 1334e4229b4..9de9c5641bb 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 74812b5bb74..4b65ef1d8bb 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 bd498f344a3..27917843743 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 3f14cba2455..18dd9fbc803 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 8c7a17ab1d6..52168255d29 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 71a81c0a8d0..de348c99f5e 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 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 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(db); if(db) { setNumericalPrecisionPolicy(db->numericalPrecisionPolicy()); } diff --git a/src/sql/kernel/qsqlresult.h b/src/sql/kernel/qsqlresult.h index 984bd5e03fd..07780937a6c 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 5e619229161..a740071d334 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 5836122ad53..75ae2a5eff8 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 f974882602e..c25d3c98a0c 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 c20b5f86dac..aaba25d06a4 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 93f0089c712..60e56ff99d1 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 ad05e0f39be..6b0ed06ac41 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 32d88b31896..decdc082163 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 c615a30b48d..d2b94272879 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 87ddfc08d6b..d40e5912389 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 1c448f8fe5f..9275712cee9 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 0f7a380984a..80d1c4e3bd8 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 f7d8842c4cc..d3a2678ecf3 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 3e118630124..009fbddf23d 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 bcbbddff63f..ee18ec87f63 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 ae15ef259ed..b637a6e3372 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 -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 586d01be589..d43f1a6297c 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 38f34c416b4..402eccfa149 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 05d00156c81..a531d447484 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 3773aea7e75..3f94af2c676 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 be52b4f211f..db0f7c09581 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 53e44fd5318..82721e8c87d 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 -#ifdef HAVE_TICK_COUNTER #include -#endif #include QT_BEGIN_NAMESPACE diff --git a/src/testlib/qbenchmarkmetric.cpp b/src/testlib/qbenchmarkmetric.cpp index fb7f8f857aa..6cd9aa468fc 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 133a114cd64..35b441a84ee 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 a3e885b56a6..247a2ca7954 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 c5117968848..f62cd299bc8 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 e6a0720a37e..f242d855310 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 45fc8824929..f0e83183ec8 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 432e900320f..dc0cec6dc47 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 18a505066f4..ae8c353e6eb 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 ddc42291f41..acf259733d6 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 61ce12a3a49..61d65131f15 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 > { public: diff --git a/src/testlib/qsignalspy.qdoc b/src/testlib/qsignalspy.qdoc index fa7c48bc703..c63f315619c 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 950b5d537be..da3a8366361 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 730329a19cf..ddd749e29da 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 89f63e25c6c..a5877f9d230 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 #include -#include #include +#include + +#ifdef QT_WIDGETS_LIB +#include +#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 90ed8838b38..6bd3339a0f1 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 24edab278db..0dc24762ab3 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 b37dbc0203b..8bd836d7f94 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_WITH_TIMEOUT(actual, expected, timeout) + + \relates QTest + + 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 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. + + \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 - The QTRY_COMPARE() 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 - 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. + 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 argv(argc); + + QVector 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 const &t1, double const &t2 template <> Q_TESTLIB_EXPORT char *QTest::toString(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 091e9a8d961..4537e769206 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 17e6ede4b61..3eb50f20d40 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 263df17172b..2571f75af44 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 6ee00637381..1a246591c7b 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 02ee03ff7d5..90b1395bf53 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 d0af966e8c5..cad7b28da6e 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 583ef1cfead..22bcddaf876 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 1ab25af25b4..c3e62cc654d 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 9993321e819..04f06f20e31 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 c7af5b28d7a..ac23bb69cd8 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 356f10367db..405f64abcc9 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 cb7c0781367..205aba9fc7f 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 deb572b8fd0..71defcfbdc7 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 #include -#include +#include +#include #include -#include #include +#ifdef QT_WIDGETS_LIB +#include +#include +#endif + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp index 0951b9b3091..695c001e0f5 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 b2aa8c1890a..02bb54815c1 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 cc6b3de9a9a..6c68b057c16 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 #include #include -#include #include -#include #include +#ifdef QT_WIDGETS_LIB +#include +#include +#endif + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/testlib/qtestresult.cpp b/src/testlib/qtestresult.cpp index 35a3f042ada..9fc3c67ca5b 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 : "", - expected, val2 ? val2 : ""); + qsnprintf(buf, 1024, "%s\n Actual (%s): %s\n Expected (%s): %s", msg, + actual, val1 ? val1 : "", + expected, val2 ? val2 : ""); 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 1ce81854b53..134d0637b63 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 bf5a74ca4b3..20e396bda68 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 6a87fe34605..ff621cdb6f2 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 0c76076b883..203a74618d1 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 ed435865a90..46ee4a99d95 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 6a9909b6176..499db58b4df 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 #include #include +#ifdef QT_WIDGETS_LIB #include +#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 &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 touchPointList(const QList& pointList) + { + QList 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 touchPointList(const QList& pointList) - { - QList newList; - - Q_FOREACH (QTouchEvent::TouchPoint p, pointList) - { - newList.append(touchPoint(p)); - } - return newList; - } QMap previousPoints; QMap points; diff --git a/src/testlib/qtestxunitstreamer.cpp b/src/testlib/qtestxunitstreamer.cpp index 2c0b074cd80..607167ccce7 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 825890258a3..c43d399accf 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 fd18d1de309..b06f4736e7a 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 c273493c481..0adb8576338 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 97a02eaff29..892cce855ed 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 ea3aaf4d927..0778fa48432 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 50c1af1775e..83fcee18d68 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 fdebd9be247..b5869d826c9 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 cd2b20456a0..00000000000 --- 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 7a9684fd028..8793496b376 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 90e586b6a03..3be216ae765 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 1440b5ca7b6..fd59c1279ff 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}, - {CHARACTER, 0, 82, 514, CHARACTER}, - {CHARACTER, 0, 73, 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, 82, 514, CHARACTER}, + {CHARACTER, 0, 79, 515, CHARACTER}, + {CHARACTER, 0, 80, 516, 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 bf7e22c0b95..82bd288f0f6 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 d725919cace..6d8e6f899af 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 c2577a2f4ca..a80cf304d76 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 9286d293492..752fc0d6833 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 ab1723c2af8..526dc66d819 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 a2a0cda162b..4955cca1697 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 e960975ecff..39de3abbafa 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 651234dd785..7aeac80c384 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 f76d59da074..a4f139098e8 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 ecf6d7d4de9..376935cd603 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 11b6476380f..bf1e6d49b31 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 9c6de873655..6e773bcab18 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 25b5b62d0fa..d7ae9437e44 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 04e69141b61..359a46f2e8b 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 6340e9e98f2..1cb6c5f7eca 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 c40eb18c1ed..751019797b6 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 6f593a762b9..a6f7b3e29a0 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 31358db682e..e5aad4df9c1 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 46ff59e1540..6d90f024918 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 01cc0299f58..6748841615d 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 0a51c3cba54..0510df0bf3e 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 89ce0be0557..5cbe92309e1 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 45447d8660a..8d9060db449 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 ad0183e335a..9641e020606 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 d8adc4b7db8..afa26b27e4c 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 9a7d6edeb21..7d3653362fe 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 ab362ab0a7d..c0f9cc4149b 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 2ea0a5baa6a..7c43ba842ab 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 46788819e70..8ba9790f2c3 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 63369997b65..911aab473cd 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 f2a35a0b7d7..1045bafe0aa 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 dcbb0ef8dfc..2b4495785ac 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 c4613e20ae1..de0deb38523 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 e8215364b95..bce8ece0ec3 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 a887719d4fe..dfb4a3299eb 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 a33a1b98833..721eb0f79ee 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 f4a9381f73c..d63054313ca 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 f04dd538533..ed96a33c582 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 cbd26033fbf..53a6bf31117 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 87d4ceb1e3f..7df32fb6e00 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 0dd528c4cb2..38217c603e3 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 22575c9127a..66bfde6d53b 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 a30c35a91c8..45e01428215 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 1f6e27b2a45..ec63c70dc12 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 42b449530b4..2eed07f0dcb 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 5ad6a4a12ce..1afef3d3ac5 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 9974e61aab9..cc1dca3820e 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 8cd718509b5..f57b6009c29 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 5374fe9202e..0c8adcd07a4 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 6a56c9eadc1..ce8e9c14736 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 347efb10420..8f425c82123 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 a6437161eef..9f77e547499 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 edc1e2a5e2a..9455598868e 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 1d8157444c8..687b19599d6 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 53085b06d81..1cc313472ea 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 cb9f4a255c2..00000000000 --- 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 -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 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 str = Utils::OpenHandle(this); -+ if (IsDeadCheck(str->GetIsolate(), "v8::String::Hash()")) return 0; -+ return str->Hash(); -+} -+ -+ -+String::CompleteHashData String::CompleteHash() const { -+ i::Handle 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(string, length) >> i::String::kHashShift; -+} -+ -+ -+uint32_t String::ComputeHash(char *string, int length) { -+ return i::HashSequentialString(string, length) >> i::String::kHashShift; -+} -+ -+ -+uint16_t String::GetCharacter(int index) -+{ -+ i::Handle str = Utils::OpenHandle(this); -+ return str->Get(index); -+} -+ -+ -+bool String::Equals(uint16_t *string, int length) { -+ i::Handle 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 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 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 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 vec1 = lhs_content.ToAsciiVector(); -+ VectorIterator buf1(vec1); -+ VectorIterator ib(string, length); -+ return CompareStringContents(&buf1, &ib); -+ } else { -+ Vector vec1 = lhs_content.ToUC16Vector(); -+ Vector vec2(string, length); -+ return CompareRawStringContents(vec1, vec2); -+ } -+ } else { -+ Isolate* isolate = GetIsolate(); -+ isolate->objects_string_compare_buffer_a()->Reset(0, lhs); -+ VectorIterator 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(str1, len), -+ Vector(string, len)); -+ } -+ -+ if (lhs->IsFlat()) { -+ String::FlatContent lhs_content = lhs->GetFlatContent(); -+ Vector vec1 = lhs_content.ToUC16Vector(); -+ VectorIterator buf1(vec1); -+ VectorIterator buf2(string, length); -+ return CompareStringContents(&buf1, &buf2); -+ } else { -+ Isolate* isolate = GetIsolate(); -+ isolate->objects_string_compare_buffer_a()->Reset(0, lhs); -+ VectorIterator 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 { - - 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 str); - bool IsTwoByteEqualTo(Vector 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 35db5c2ca58..00000000000 --- 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 -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 data); - void SetIndexedInstancePropertyHandler(IndexedPropertyGetter getter, - IndexedPropertySetter setter, -@@ -2388,6 +2389,12 @@ class V8EXPORT ObjectTemplate : public Template { - NamedPropertyDeleter deleter = 0, - NamedPropertyEnumerator enumerator = 0, - Handle data = Handle()); -+ void SetFallbackPropertyHandler(NamedPropertyGetter getter, -+ NamedPropertySetter setter = 0, -+ NamedPropertyQuery query = 0, -+ NamedPropertyDeleter deleter = 0, -+ NamedPropertyEnumerator enumerator = 0, -+ Handle data = Handle()); - - /** - * 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 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 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 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 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 SetProperty(Handle object, - Handle key, - Handle 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 SetProperty(Handle object, - Handle key, - Handle value, - PropertyAttributes attributes, -- StrictModeFlag strict_mode); -+ StrictModeFlag strict_mode, -+ bool skip_fallback_interceptor = false); - - Handle SetProperty(Handle object, - Handle 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(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 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 ba384a62ee5..00000000000 --- 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 -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 key); - V8EXPORT bool HasRealNamedProperty(Handle 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 New(Handle 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 obj = Utils::OpenHandle(this); -+ if (CanBeEncodedAsSmi(resource)) { -+ obj->SetExternalResourceObject(EncodeAsSmi(resource)); -+ } else { -+ obj->SetExternalResourceObject(*isolate->factory()->NewForeign(static_cast((void *)resource))); -+ } -+ if (!obj->IsSymbol()) { -+ isolate->heap()->external_string_table()->AddObject(*obj); -+ } -+} -+ -+ -+v8::Object::ExternalResource *v8::Object::GetExternalResource() { -+ i::Handle obj = Utils::OpenHandle(this); -+ i::Object* value = obj->GetExternalResourceObject(); -+ if (value->IsSmi()) { -+ return reinterpret_cast(i::Internals::GetExternalPointerFromSmi(value)); -+ } else if (value->IsForeign()) { -+ return reinterpret_cast(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 Factory::CreateApiFunction( - Handle construct_stub = isolate()->builtins()->JSConstructStubApi(); - - int internal_field_count = 0; -+ bool has_external_resource = false; -+ - if (!obj->instance_template()->IsUndefined()) { - Handle instance_template = - Handle( - 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 Factory::CreateApiFunction( - - Handle map = Handle(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( -- reinterpret_cast(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( -+ reinterpret_cast(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(Internals::GetExternalPointerFromSmi(value)); -+ } else if (value->IsForeign()) { -+ resource = reinterpret_cast(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(last - start)); -+ external_string_table_.ShrinkNewObjects(static_cast(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 712c710df2e..00000000000 --- 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 -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