Commit Graph

14784 Commits

Author SHA1 Message Date
Mitch Curtis
c7c3a78075 Add json/savegame example.
There wasn't any example documentation besides json.html, which doesn't
actually describe usage of the various QJson* classes.

This also makes each QJson* class page link back to json.html.

Change-Id: If5ad6493d2728df0cec7bdbbc5790f0b755f816c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-22 19:14:03 +02:00
Frederik Gladhorn
3abecf2ee9 Accessibility for Android
This enables both modes for TalkBack,
explore-by-touch and the normal swiping mode.

It is partially inspired by the BarGraphView example
of the Google/Android Eyes-Free project.

Note that for any accessibility to work you'll need
a device with api level 16 at least.
Using reflection we should be able to dynamically pick up
the classes if we have the high enough api level.

Change-Id: I11b93bead451483782a1711434d45c8f9a35996f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-22 18:45:24 +02:00
Frederik Gladhorn
59b6a67b94 Remove rowColumnExtents from QAccessibleTableCellInterface
The API is broken and available in individual functions.
Don't make it more complicated than necessary to implement
the interfaces for new widgets.

Change-Id: Ie408c369ef05b2b8e7ac666b25153d090fcf3aae
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-08-22 18:45:24 +02:00
Richard Moe Gustavsen
ce16e70985 iOS: Activate window on touchesEnded instead of touchesBegan
Since we await giving focus to a focus object until a press
release, it also makes sense to await activating a window until
a press release, since they both have to do with focus. By doing
so, the input panel now stays open if the user selects a line edit
in one window when a line edit in another window still has focus. We
also avoid activating a window in case of a touch cancel (e.g as
a result of the user flicking or triggering a gesture).

Change-Id: Ic00c4be69c257fceb10ce2d5a81cb490ea93710f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-08-22 18:45:24 +02:00
Friedemann Kleint
4e04302672 Check for window handle in QBackingStore::flush().
Task-number: QTBUG-33062

Change-Id: Iab4ccc3a2a855ee7f6964659b53b3401af436212
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-08-22 16:44:37 +02:00
Martin Smith
e4df7fc75a qdoc: Fix the qdoc \include command
qdoc's \include command now works as expected.
This command is only for including a file that
contains qdoc comments that contain qdoc commands
to be processed by qdoc. The file to be included
should have the .qdocinc suffix, although qdoc
will accept any suffix now. The file must be in
one of the directories specified by the sourcedirs
variable in the qdocconf file.

Task-number: QTBUG-33046
Change-Id: I45ea08932b4218aae369469968117fb5132f764b
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-22 16:11:29 +02:00
Martin Smith
d9b5cead97 qdoc: Make example file names unique
To avoid duplicate files for examples, the files
are named this way. Suppose you have an example
called mandelbrot. The example is in a subdirectory
named mandelbrot, and there is a \example command
somewhere like this:

\example mandelbrot

In this case, the mandelbrot example is in the QtCore
module. Then the name of the example page will be:

"qtcore-mandelbrot-example"

...and the names of the example files will be:

"qtcore-mandelbrot-main-cpp.html"
"qtcore-mandelbrot-mandelbrot-pro.html"
"qtcore-mandelbrot-mandelbrotwidget-cpp.html"
"qtcore-mandelbrot-mandelbrotwidget-h.html"
"qtcore-mandelbrot-renderthread-cpp.html"
"qtcore-mandelbrot-renderthread-h.html"

Task-number: QTBUG-32580
Change-Id: Ic4445fd65b679523d6d94a8b0c19289d049ef0b0
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-22 16:11:29 +02:00
Mitch Curtis
5b4c0d4b0b Fix typo in qkeysequence.cpp code comment.
Change-Id: I833c4da7363d7ae5dcfa5a901dadc0e327080e40
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-08-22 16:11:29 +02:00
Olivier Goffart
8a96679493 moc generated code should compile with QT_NO_KEYWORDS
Don't use the 'emit' keyword in the moc generated code for properties
with MEMBER

Task-number: QTBUG-33094
Change-Id: I5a0950e9c7a0dee347a6a6c79098e3e7d4776014
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-22 16:03:28 +02:00
Olivier Goffart
2bd40c53ef moc: Fix related objects containing itself
This may happen when we have namespaces and the qualified name is used
to scope an enum.

Task-number: QTBUG-32933
Change-Id: Ic4923bbfb138387bae1e3694172661ace8342089
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-22 16:03:28 +02:00
Peter Hartmann
4f7e0fc632 HTTP socket engine: support newer HTTP proxies
After sending authentication, we need to revert all states to be able
to read the HTTP header again. Before, we would not try to read an
HTTP header after sending authentication.

Change-Id: Id4b95eda9881a37bcfbae0570756bb3e4918a568
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns.qt@gmail.com>
2013-08-22 12:37:30 +02:00
Frederik Gladhorn
676a10b3dc Fix bootstrap class path warning (java)
Due to forcing java 6 we need to pass the
bootstrap jar file (android.jar).
https://blogs.oracle.com/darcy/entry/bootclasspath_older_source

Change-Id: I530a7e2a7df40813011a6dde93d6ccc3aaaa61d6
warning: [options] bootstrap class path not set in conjunction with -source 1.6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-22 09:46:36 +02:00
Olivier Goffart
c20b358703 moc: Issue a warning instead of an error when macro argument mismatch
moc's C++ is not 100% accurate, so better process the invalid macro with
a warning rather than an error.

Such errors occurred in the QSKIP macro with variadic arguments since
that macro is defined conditionally.
It is also causing problem in boost header (cf task QTBUG-29331)

Task-number: QTBUG-29331
Change-Id: Ice6a01b675286540d6470c8e36920b7efd39b540
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-22 07:11:33 +02:00
Thorbjørn Martsum
e7168ff9fe QMessageBox - merge some mac and non-mac code
I have not located any significant behavior changes in this,
and it is annoying having too much similar code in different
branches.

The main change is a removal of Qt::AlignLeft, but
the icon Label should be in its own column.

Change-Id: Iaf07fc503075e61e2af1a93d5fc9e6e34a24451d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-08-22 06:47:19 +02:00
Thorbjørn Martsum
5ba72276c4 QMessageBox - move layout handling
This patch moves some layout handling to a new function.
That will be helpful later since we can re-use the new function.

Change-Id: I4cc846f9958d9530ec2b07292093b94bd27ee055
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-08-22 06:47:05 +02:00
Thiago Macieira
04bc63f2d6 Add x86 arch detection support for AVX512 and SHA instructions
The flags come from GCC commit 201219:
http://gcc.gnu.org/viewcvs/gcc/branches/avx512/gcc/config/i386/i386-c.c?limit_changes=0&r1=201219&r2=201218&pathrev=201219

Clang and ICC don't seem to have support for this yet.

Change-Id: Ic941654a5c56ed110d0e754e436a92dc5deaeb17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-22 02:04:39 +02:00
Thiago Macieira
065cff8311 Define Q_PROCESSOR_X86 to the x86 family
They are:
 3      Intel 80386 or equivalent
 4      Intel 80486 or equivalent
 5      Intel Pentium, Pentium MMX, AMD K6 and a few others
 6      everything since the Intel Pentium Pro and AMD Athlon

By necessity, this means all 64-bit builds have a family of 6. That
matches the family number that the CPUID instruction produces.

Change-Id: I5dc7344976f8da65938f44310b89ade4fe3f1a28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-22 02:04:39 +02:00
Thiago Macieira
c374f4441a Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-08-22 02:04:39 +02:00
David Faure
85b24bb2de QThreadPool: fix data races in activeThreadCount()
Rather than trying to make it lock-free (which requires double-bookkeeping of
4 atomic ints!), just lock the mutex before calling it.
tst_bench_qthreadpool shows no difference whatsoever between the two
solutions, I get 0.005 msecs per iteration in startRunnables().

Of course looping over calls to activeThreadCount() is a bit slower,
from 0.0002 msecs per iteration to 0.00027 msecs, i.e. 35% more.
But polling activeThreadCount() from the app is a really wrong thing to
do anyway, this benchmark was just for my own curiosity about the
price of a mutex in a function that sums up 4 ints.
What matters is start() performance, which is unchanged (0.00007 msecs
is just noise compared to a 0.005 total, that's 1.4%).

Change-Id: I993444eef8bc68eff9badd581fae3626dfd1cc6d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-21 23:50:59 +02:00
David Faure
1de1470189 QUrl: Use decoded mode by default for individual getters/setters.
This fixes the wrong value for path() and fileName() when a
path or file name actually contains a '%'.

userInfo() and authority() are not individual getters, they combine
two or more fields, so full decoding isn't possible (e.g. username
containing a ':').

[ChangeLog][Important Behavior Changes][QUrl and QUrlQuery]QUrl now
defaults to decoded mode in the getters and setters for userName,
password, host, topLevelDomain, path and fileName. This means a '%'
in one of those fields is now returned (or set) as '%' rather than "%25".
In the unlikely case where the former behavior was expected, pass PrettyDecoded
to the getter and TolerantMode to the setter.

Change-Id: Iaeecbde9c269882e79f08b29ff8c661157c41743
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 23:50:44 +02:00
David Faure
f874a5dd8b QUrl: fix host(FullyDecoded), it shouldn't trigger EncodeUnicode.
Change-Id: I9a62d5eb8b099b659cfcfc591c983b3d73ca9569
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 23:50:33 +02:00
David Faure
028def2ada Add benchmark for QThreadPool.
The current question is whether activeThreadCount() should be lock-free
(using atomic ints) or mutex-protected, so this tests start()
and activeThreadCount() directly.

Change-Id: Ica4a2ad023c2002e3c7d81558e6b9ee64af7f690
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-21 23:50:23 +02:00
Nicolás Alvarez
683451e7c7 configure: Abort if Xlib isn't present when building for XCB.
The XCB port is still incomplete and needs Xlib in several places.
The configure script should reflect that and make sure Xlib is present.

Change-Id: I6d81ea6cacef56084cf7ccfbcf908d597aae918f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-21 23:50:18 +02:00
David Faure
37dc44d499 QThreadPool: fix typos
Task-number: QTBUG-31919
Change-Id: I2718566595622895f182191b5693e91c1ab1e7d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 23:50:10 +02:00
David Faure
e8bc599a74 tst_qgraphicsproxywidget: fix memory leak
Change-Id: Ib449dc05cebd333310d6ea6b434c9db7082bdee9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-21 23:49:59 +02:00
Friedemann Kleint
95e880bd9d Windows: Handle Qt::ForeignWindow.
Task-number: QTBUG-33079

Change-Id: Iec2ddfe07b07b3a921098c7147f26aff316bf6e6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-21 23:00:32 +02:00
Giuseppe D'Angelo
4fbe3eb2a8 Mark qFuzzy* and qIsNull as Q_REQUIRED_RESULT
Calling them and not using the return value makes no sense.
And it's even worse -- in autotests people might call those
functions without wrapping them in QVERIFY(), effectively
not testing anything.

Change-Id: I2c90d1c85963ff1f35f00653d536a9252c2fcc48
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-21 21:23:16 +02:00
Nicolás Alvarez
2e9345b627 configure: Check for Xrender only when building for XCB.
The XCB platform plugin is the only one that requires Xrender.

Change-Id: Iac2efa31b4b51e38305ee5f635fe38b75c7752de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-21 21:13:09 +02:00
Thorbjørn Lund Martsum
7523bbb0c0 QComboBox - only react on a mouse-release if we had a mousepress
In delegates we get into trouble with calling showPopup in
setEditorData (edit by double click) - and that is not reasonable.
The user has requested edit - and therefore it is natural to save
a click for the user and show the popup at once.

However that fails since we have the mouse down and as soon as we
release the mouse we will call hidePopup.

This patch ensures that the mouseReleaseEvent, that caused the
problem is only considered if we have had a mousePressEvent.

Change-Id: Ibe031fcb9ad2158f6969e41127bbb5f651b9cae6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 21:08:08 +02:00
David Faure
943ae90744 QHash: fix compilation with gcc-4.2.1 (Mac OS X)
The anonymous union isn't supported and can be replaced with a reinterpret_cast.

Change-Id: Ic76a31f36e61d910db16312d7a6c4bdc728aa825
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-21 21:08:01 +02:00
Sergio Ahumada
7978cef796 tests: Make the QT assignments more explicit
Remove unused 'QT -= gui' and replace some others with
'QT = core ...'

Change-Id: I2d14fae963afc21dbd21a4acdbba2c30cdf8fa61
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-21 19:05:52 +02:00
Friedemann Kleint
bc4ce284ad Windows: Generate expose events for layered transient children.
Layered (translucent/non-opaque) windows do not receive WM_PAINT,
expose events need to be generated. Improve
6800728d09 to handle transient
children as well.

Task-number: QTBUG-17548
Change-Id: Id113604512692dfbea1f2b10d0db3068213cf599
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-21 16:39:55 +02:00
Stephen Kelly
8074693425 CMake: Allow specifying a TARGET in invocations of macros.
Forward-port of 9ce60ff509c4ff27fe861fc5b2080f50897a68c4 (Qt4Macros:
Allow specifying a TARGET in invokations of macros., 2013-02-26)
from cmake.git.

This causes the INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS to be
used from the specified target when running moc.

Change-Id: I868a35ade3c6b059e64d226291cf2046709d86d4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 16:39:55 +02:00
Stephen Kelly
ee50096830 Populate INTERFACE_LINK_LIBRARIES property in the cmake files.
This is new in CMake 2.8.12 and replaces the old properties
matching IMPORTED_INTERFACE_LINK_LIBRARIES_<CONFIG>.

Change-Id: I5d4c454972f2535f6792e95718c73d80c56ac24c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 16:39:55 +02:00
Friedemann Kleint
4ef8144dd6 QWidget: Apply window opacity set before show.
Task-number: QTBUG-33078

Change-Id: Id9111f223a9dc58c88b072c52e36d42db450573a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-08-21 16:39:55 +02:00
Stephen Kelly
74a153e4b8 Add debugging output to randomly failing test.
The result at

 http://thread.gmane.org/gmane.comp.lib.qt.ci-reports/12118

shows an unusual value. The expected output is

 QDEBUG : tst_QColumnView::scrollTo() last= 0  ; HorizontalOffset=  -256
 QDEBUG : tst_QColumnView::scrollTo() last= -256  ; HorizontalOffset=  -512
 QDEBUG : tst_QColumnView::scrollTo() last= -512  ; HorizontalOffset=  -768
 QDEBUG : tst_QColumnView::scrollTo() last= -768  ; HorizontalOffset=  -1024

Change-Id: I8db091f4390cb1a41547d44ca966d172ac278e1a
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 16:39:55 +02:00
Stephen Kelly
89bb6be1f9 CMake: Move some code around.
This makes the diff clearer when adding plugin information
in a followup commit.

Change-Id: I857d9f71b08074f2ffa2f852ad72e5dd975adc3e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 16:39:55 +02:00
Shawn Rutledge
f7ebb8d4c6 QXcbBackingStore: don't crash in flush() if no platformWindow
Task-number: QTBUG-32681
Change-Id: Iec7204985867a8d65cea393ba6ab66d328a5e7b2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-21 16:39:55 +02:00
Tor Arne Vestbø
bd9a023a41 Don't use qt_mac_get_fixed_pitch() to resolve fixed pitch fonts on OSX
The call was resulting in inifinite recursion on OSX 10.9 when Qt was
built against the 10.7 SDK, as qt_mac_get_fixed_pitch uses QFontMetrics
to resolve the pitch, and we would end up in the font resolver again
when asking for the metrics.

The CoreText font-database already takes care of resolving whether or
not a font family is fixed-pitch, so the code is likely a leftover
from the ATSUI-days, and can be removed.

Task-number: QTBUG-31803
Change-Id: I37c90fa637927eb4adc16c0fd556c4c46c456034
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-08-21 16:39:55 +02:00
Eskil Abrahamsen Blomfeldt
ecbd3a70e4 Android: Remove EGL_BAD_SURFACE warning on suspension
When suspending the app we would destroy the surface twice,
causing libEGL to output a warning on the second attempt.
We would also destroy the surface before all references were
released which is not 100% nice. We don't need to call the
super class implementation at all, since we are managing
the EGL surface ourselves.

Change-Id: Ie1ab2ea8561d0018b5f16ac8cdf3296313a0a92c
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-08-21 16:39:55 +02:00
Andreas Holzammer
5680484476 [QNX]Fix transparencies
It is not guaranteed that buffers are cleared when they
are allocated. So don't use a buffer for the root window,
and clear buffers for the actual content.

Change-Id: I42939baec03fa05968c83bbf2739ab8d1d70c8be
Reviewed-by: Matt Hoosier <matt.hoosier@garmin.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-08-21 16:39:55 +02:00
Mitch Curtis
9d0b190f4b Construct a valid QTime when creating timestamps for iBase SQL driver.
0e62fc73c9 requires this.

Task-number: QTBUG-29261

Change-Id: Idd8b630c72d0fd1c255695a8c2c22f9fe32767ee
Reviewed-by: John Layt <jlayt@kde.org>
2013-08-21 16:39:55 +02:00
Peter Hartmann
fcd212e7ba QNetworkReply auto test: adapt to new session life time
... supported on the new test server. Once the new server image is in
place, we can only allow for the new life time hint of 300 seconds.

Task-number: QTBUG-33040
Change-Id: Id6ad9983789cc6badf3fc2f6628bf79379988201
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-21 14:48:04 +02:00
John Layt
6be9cb2068 QDateTime - Use the copy constructor in addDays/Months/Years
Currently the QDateTime::addDays/Months/Years methods copy all the
d member variables themselves, but this is bad practice as it means 3
more places where we have to get the copy code correct.  Instead use
the copy constructor to do what it's meant to.  This saves more changes
when we add proper OffsetFromUTC and TimeZone support.

Change-Id: Ie2641d0cb58405335206edcce2e2db30702b78bf
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 14:25:07 +02:00
Leonard Lee
35fd077c80 Specify maximum array size for QByteArray.
Task-number: QTBUG-33037
Change-Id: I3f39b1498fc70614402fca2281ffbd1a6ec4cf3f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 13:27:47 +02:00
Eskil Abrahamsen Blomfeldt
c8b0c428d2 Android: Add default values for min and target SDKs
The minimum SDK version supported should be set to 9, since this
is required by Qt. We also set the target SDK version to 14, since
this will remove certain compatibility features, like the overflow
button in the action bar.

Task-number: QTBUG-30860
Change-Id: Iddd0eba2e802d03c5fe6e9b5da626808bbbad71d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-08-21 11:45:08 +02:00
Friedemann Kleint
a4d4e18c31 XCB: Suppress warnings about unhandled client messages.
Introduced by the tray icon refactoring
d8090022f6 among other things.

Task-number: QTBUG-33068
Change-Id: I7c536c68acc2fae39ca30afb401500d0dc8701b1
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-08-21 11:13:56 +02:00
Frederik Gladhorn
c8ca300e49 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/src.pro

Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
2013-08-21 11:03:18 +02:00
Jerome Pasion
31c96d34d2 Doc: Renamed list of example page to "Item Views Example".
Previous name caused a conflict with another page with the same name.
This page will replace the one in qtdoc.

Task-number: QTBUG-32580
Change-Id: Ifda8841feaab4def6c16972a027947f75ccb7739
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-08-21 01:20:01 +02:00
John Layt
2f2a799f3d QDateTime - Fix tests to correctly restore time zone
The unit tests were caching the original TZ value to restore later
after testing with different TZ values.  The problem is reading TZ will
return a null value if no override TZ value is set, and if you then set
the TZ to null the system assumes UTC and not the system time zone.
Instead we need to unset TZ if it was null to start with.

Change-Id: Ib0625b1712e565f9fdfa99e2ffe1e5d74f059354
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 01:20:01 +02:00