profile/ivi/qtbase.git
12 years agoFlag QGraphicsView test as unstable on Mac.
Toby Tomkins [Tue, 21 Feb 2012 04:55:13 +0000 (14:55 +1000)]
Flag QGraphicsView test as unstable on Mac.

Task-number: QTBUG-24296

Change-Id: I9f748c368fbc0cc2b272be9400da95d774d51bde
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoDrop file-engine abstraction from public API
João Abecasis [Fri, 17 Feb 2012 19:09:17 +0000 (20:09 +0100)]
Drop file-engine abstraction from public API

This abstraction imposed serious performance penalties and is being
dropped from the public API.

In particular, by allowing file names to be arbitrarily hijacked by
different file engines, and requiring engines to be instantiated in
order to decide, it imposed unnecessary overhead on all file operations.

Another flaw in the design with direct impact on performance is how
engines have no way to provide (or retain) additional information
obtained when querying the filesystem. In many places this has meant
repeated operations on the file system, where useful information is
immediately discarded to be queried again subsequently.

For Qt 4.8 a major refactoring of the code base took place to allow
bypassing the file-engine abstraction in select places, with
considerable performance gains observed. In Qt 5 it is expected we'll be
able to take this further, reaping even more benefits, but the
abstraction has to go.

[Dropping this now does not preclude that virtual file systems make an
appearance in Qt at a later point in Qt 5's lifecycle. Hopefully with a
new and improved abstraction.]

Forward declarations for QFileExtension(Result) were dropped, as the
classes were never used or defined.

Tests using "internalized" classes will only fully run on developer
builds. QFSFileEngine was removed altogether from exception safety test,
as it isn't its intent to test internal API.

Change-Id: Ie910e6c2628be202ea9e05366b091d6d529b246b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoCorrect pkg-config usage to respect sysroot
Donald Carr [Mon, 6 Feb 2012 15:28:19 +0000 (15:28 +0000)]
Correct pkg-config usage to respect sysroot

Direct use of pkg-config variables disregards the sysroot offset pkg-config
factors into consideration with the dedicated variables:

--cflags-only-I
--libs-only-L

these parameters exist exactly for this reason.

Change-Id: Ieecf31ebe0640f64b272b84fba22701aacf8f966
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix potential race condition in data structure of adopted thread watcher
jian liang [Sun, 19 Feb 2012 14:09:44 +0000 (22:09 +0800)]
Fix potential race condition in data structure of adopted thread watcher

Fix potential race condition in data structure of adopted thread watcher
in Windows. Since QVector is not thread safe, it is not safe to read and
append data to qt_adopted_thread_handles or qt_adopted_qthread
simultaneously in qthread_win.cpp. This patch fix this race condition.

Change-Id: I2d0c7a4cdde5390d38d15c98343f0fc6ddd24aba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMerge overloads
Richard Moore [Sun, 19 Feb 2012 15:55:29 +0000 (15:55 +0000)]
Merge overloads

Fixes ### Qt 5

Change-Id: I2846593616635440e17c8a9ce518780561992b84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMerge overloads.
Richard Moore [Sun, 19 Feb 2012 16:52:24 +0000 (16:52 +0000)]
Merge overloads.

Fixes a Qt 5 TODO

Change-Id: Ide3159a5b979bd8e8a1edefff7fccb98dbe9a78e
Reviewed-by: Pierre Rossi <pierre.rossi@nokia.com>
12 years agoQElapsedTimer/Win: Fix 64-bit integer overflow
Jonathan Liu [Tue, 21 Feb 2012 04:54:25 +0000 (15:54 +1100)]
QElapsedTimer/Win: Fix 64-bit integer overflow

The ticksToNanoseconds function in qelapsedtimer_win.cpp multiplies
ticks from performance counter with 1000000000 which can sometimes
result in 64-bit integer overflow. This can cause the elapsed time to
reset or jump around.

Task-number: QTBUG-23150
Change-Id: I464503e03cbe64e13906e773beafbf88e7dc256a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f30a91ba9d98de1a0ebee5608ba289ac35871a8c)

12 years agoFix the qlocalsocket test
Andrew Stanley-Jones [Tue, 21 Feb 2012 07:11:49 +0000 (08:11 +0100)]
Fix the qlocalsocket test

This test is broken in a couple of ways. A few one line fixes
combined into a single patch.

1. Linux is the only OS that does
abstract unix domain sockets by prepending a null as the first
character.  Don't test this on non-Linux platforms and expect
it to pass.

2. Change QVERIFY2 to QCOMPARE so we can see why this
fails in CI but no on the local system.  Use QCOMPARE
where possible.

Change-Id: Ic3d2cf9696730dc4d6589539fdfe8a48ccf28de5
Reviewed-by: Alex <alex.blasche@nokia.com>
12 years agoEnable qlocalsocket auto test
Andrew Stanley-Jones [Wed, 15 Feb 2012 12:58:29 +0000 (13:58 +0100)]
Enable qlocalsocket auto test

Due to recent changes in the test it should now compile
and run properly.  This re-enables the test.

Change-Id: I6c647d99fa1f1b1c53e006fef2865d6be08ec16c
Reviewed-by: Alex <alex.blasche@nokia.com>
12 years agoFix error in addrlen field
Andrew Stanley-Jones [Tue, 21 Feb 2012 20:37:57 +0000 (21:37 +0100)]
Fix error in addrlen field

addrlen must be initialize to the amount of space available
in the buffer.

Change-Id: I52945d780bba9d22aeaa7ac5a35a0e54dbea60dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoGive the compile flags an EXECUTABLE_ prefix.
Stephen Kelly [Tue, 21 Feb 2012 11:06:54 +0000 (12:06 +0100)]
Give the compile flags an EXECUTABLE_ prefix.

The fPIE flag should only be used with executables.

Change-Id: If799ae4a7fe2492af3aac67651659a52d365024a
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoAdd GL_BGR to the list of defined GL constants, right next to GL_BGRA
Simon Hausmann [Tue, 21 Feb 2012 15:38:00 +0000 (16:38 +0100)]
Add GL_BGR to the list of defined GL constants, right next to GL_BGRA

We use this one in WebKit's OpenGL texture mapper and it would be
convenient to have it here if it's not defined by the platform.

Change-Id: Idae33e49773e21c6290b164bccd4f209cf9820a2
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agomake resolution of default spec less inefficient
Oswald Buddenhagen [Wed, 1 Feb 2012 21:25:04 +0000 (22:25 +0100)]
make resolution of default spec less inefficient

resolve only once, in particular on unix.

Change-Id: I090698fc6029322a3a16d179d461af3e8336f6ad
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agorevamp reading of bootstrap variables
Oswald Buddenhagen [Tue, 31 Jan 2012 11:49:53 +0000 (12:49 +0100)]
revamp reading of bootstrap variables

make the "evaluator" able to process simple variable expansions.
cache the processed spec, so it is not re-read for every variable.

Change-Id: I20e69ec7b65faa7d571e68dbfea6c21c79a62641
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoregenerate unicode tables after rittk's patches
Oswald Buddenhagen [Tue, 21 Feb 2012 19:59:43 +0000 (20:59 +0100)]
regenerate unicode tables after rittk's patches

Change-Id: I60b416fc2dc2f0ccbcf13288a9ba2a42547269ec
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agooptimize QString::toLower()/toUpper() for special cases, step 2
Konstantin Ritt [Tue, 18 Oct 2011 17:12:21 +0000 (19:12 +0200)]
optimize QString::toLower()/toUpper() for special cases, step 2

from now, QUnicodeTables::specialCaseMap[] starts with a placeholder; so,
if somethingCaseSpecial is true, then somethingCaseDiff is always greater than 0

Change-Id: Ibb1870512836eee71b1521564c0745096c05b2f9
Merge-request: 70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agooptimize QString::toLower()/toUpper() for special cases, step 1
Konstantin Ritt [Tue, 18 Oct 2011 17:12:20 +0000 (19:12 +0200)]
optimize QString::toLower()/toUpper() for special cases, step 1

reorganize QUnicodeTables::specialCaseMap as follows:
specialCaseMap contains sequence entries in form { length, a, b, .. }

Change-Id: Iea1f80bc2f4dc1f505428dad981cde26daaa52c7
Merge-request: 70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agooptimize QString::toCaseFolded()
Konstantin Ritt [Tue, 18 Oct 2011 17:12:19 +0000 (19:12 +0200)]
optimize QString::toCaseFolded()

use the codepath similar to QString::toLower()

Change-Id: Ica1948c5e9c82199307d9f823e07d42b50d59480
Merge-request: 70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agooptimize handling of surrogate pairs in toLower()/toUpper()
Konstantin Ritt [Tue, 18 Oct 2011 17:12:19 +0000 (19:12 +0200)]
optimize handling of surrogate pairs in toLower()/toUpper()

high surrogate part never changes on upper/lower casing
(which tested explicitly in the qunicodetables generator),
thus we can copy the high surrogate part in the loop

Change-Id: I24642b35eea7596c6ad494f2a7bc670f10b759a8
Merge-request: 70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoreplace 'const QChar &' with 'QChar ' where appropriate
Konstantin Ritt [Tue, 18 Oct 2011 14:44:54 +0000 (16:44 +0200)]
replace 'const QChar &' with 'QChar ' where appropriate

as QChar is actually an ushort and there is no point in taking its
address.

Merge-request: 69
Change-Id: Idcc9d621e5627514ade006aa12a789a88929d48b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMove QSysInfo out of qglobal.h and into a separate header
Bradley T. Hughes [Mon, 20 Feb 2012 08:41:09 +0000 (09:41 +0100)]
Move QSysInfo out of qglobal.h and into a separate header

qsysinfo.h is still included by qglobal.h, but it may be possible
to remove the include from qglobal.h and instead include qsysinfo.h
only where needed (e.g. qendian.h, qdatastream.h).

Change-Id: Ifa2c72e0dae206d88eaa192e15a906297673c048
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQEasingCurve: implement copy assignment operator inline
Marc Mutz [Sun, 19 Feb 2012 19:55:09 +0000 (20:55 +0100)]
QEasingCurve: implement copy assignment operator inline

Implement the copy-assignment operator inline, using the
copy-swap idiom. This makes assignment strongly exception
safe, but also simplifies maintainence, because op= is
formulated in terms of the copy constructor now.

Change-Id: I803c9100a520d659b685992237cb76fd114222c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoPrint out the try_compile output for tests expected to fail.
Stephen Kelly [Tue, 21 Feb 2012 11:40:38 +0000 (12:40 +0100)]
Print out the try_compile output for tests expected to fail.

This way, ctest -V shows that it fails for the expected reason.

Change-Id: I97589d4e90d889ea0b10dbd6192526712dbfdd8e
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoremove bizarre late feeding of user_configs into base_vars
Oswald Buddenhagen [Thu, 2 Feb 2012 17:08:19 +0000 (18:08 +0100)]
remove bizarre late feeding of user_configs into base_vars

there is no obvious reason why this should happen. if base_vars is used
again, the user configs will be parsed again, too.

Change-Id: Ib56e01a468cdb5e81d610bcaf0163bf730cbae05
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoqmimetype: Fix test failure when LC_ALL is set.
David Faure [Mon, 20 Feb 2012 17:14:55 +0000 (18:14 +0100)]
qmimetype: Fix test failure when LC_ALL is set.

This code sets LANG=en_US so that the method comment(), which returns a translated
name, can be compared with an expected result in English.
(QMimeType::comment uses QLocale::system().name() and QLocale::system().uiLanguages())

But LANG= has no effect if LC_ALL is set, so LC_ALL needs to be cleared (or set
to en_US) for the test to work.

Change-Id: Icb031057769be9bc8c0fcab65daa45e7bf1d5b18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoTest for QT_NO_SSL instead of QT_NO_OPENSSL
Shane Kearns [Mon, 20 Feb 2012 17:02:41 +0000 (17:02 +0000)]
Test for QT_NO_SSL instead of QT_NO_OPENSSL

Change the ifdefs in our own code (except openssl backend) to use the
new configure flag.

Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoMake qget manual test compile without ssl support
Shane Kearns [Mon, 20 Feb 2012 16:40:55 +0000 (16:40 +0000)]
Make qget manual test compile without ssl support

Change-Id: I35f92328b79df1cfcae52fa6ff8290f260183aea
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoMake https requests fail fast when configured without ssl support
Shane Kearns [Mon, 20 Feb 2012 16:18:29 +0000 (16:18 +0000)]
Make https requests fail fast when configured without ssl support

Restored the Qt4 behaviour where attempting a https request using
QNetworkAccessManager fails with ProtocolUnsupportedError instead
of timing out or hanging.

Covered by existing autotests.

Task-number: QTBUG-17189
Change-Id: Iceb1ba6558c7d2b1af8ddf8d4ea9315a5b44d970
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoQEasingCurve: simplify and fix copy constructor
Marc Mutz [Sun, 19 Feb 2012 19:53:20 +0000 (20:53 +0100)]
QEasingCurve: simplify and fix copy constructor

The copy constructor used the default Private constructor,
followed by the application of the compiler-generated
copy assignment operator, and finally replaced the config
member with a copy of itself.

This is needlessly inefficient.

Worse: it's incorrect: if config->copy() throws, then
*d_ptr is leaked.

Solution: implement the copy constructor for Private,
and use it in the copy constructor of the public class.

Effect: everything that can throw now prevents the new
Private class from being created, and the compiler ends
up cleaning up after us.

Change-Id: I09ed18bb39ee7cd81aaa8ba01676fc202502a8e3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQHash: more robust use of qDebug()
Marc Mutz [Tue, 21 Feb 2012 12:41:25 +0000 (13:41 +0100)]
QHash: more robust use of qDebug()

I'm sure 'line' can't contain anything resembling a format string,
but better safe than sorry.

Change-Id: I0aa0f4a5a03d97b18d6a866c27fa721fcbe0f77b
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoQEasingCurve: implement move constructor
Marc Mutz [Sat, 18 Feb 2012 10:45:45 +0000 (11:45 +0100)]
QEasingCurve: implement move constructor

The move constructor sets other.d_ptr to zero. This is safe, because
after being moved from, the object is left in a state in which it
can be safely destroyed (delete nullptr is a no-op).

It cannot meaningfully be used anymore (most members will crash with
a nullptr dereference), but in most cases, the moved-from object
cannot be accessed anyway (not a named object), and if a named object
is moved from, it must have been through explicit std::move(), as in
the test case.

The STL makes better guarantees (moved-from containers are .empty()),
but I don't think it's worth introducing a null state into
QEasingCurve just for supporting a use-case that should be
considered a bug anyway.

Change-Id: I4115b7386cdea6960507da6843a0d0196d8e4139
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQEasingCurve: implement move-assignment operator
Marc Mutz [Sat, 18 Feb 2012 07:52:51 +0000 (08:52 +0100)]
QEasingCurve: implement move-assignment operator

Implemented as in QPen etc.

Change-Id: I65b43c6ec7308ca4b44f614594c15c41ab2f89f9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQEasingCurve: add member-swap
Marc Mutz [Sat, 18 Feb 2012 07:52:13 +0000 (08:52 +0100)]
QEasingCurve: add member-swap

Implementated as in QPen etc.

Change-Id: Ia08551bf7902b60e115d1b1d2353030597e34841
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQEasingCurve: mark as Q_MOVABLE_TYPE
Marc Mutz [Sat, 18 Feb 2012 07:50:45 +0000 (08:50 +0100)]
QEasingCurve: mark as Q_MOVABLE_TYPE

The private data doesn't contain any back-links to the public
class, afaics. So QEasingCurve qualifies for movable.

Change-Id: Id8ab186fc0a25740458341256b53425dc40bce37
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoUse requested window format to match rest of the patch in 38257651
Tor Arne Vestbø [Tue, 21 Feb 2012 12:08:42 +0000 (13:08 +0100)]
Use requested window format to match rest of the patch in 38257651

Otherwise we end up with an error at runtime:

  QEGLPlatformContext::makeCurrent: eglError: 3009, this: 0x4b5c58

Change-Id: I1e794f427243e40f0a8f572a936b9fb756e89f8a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoPort badxml autotest to QMetaObjectBuilder
Kent Hansen [Fri, 17 Feb 2012 21:45:08 +0000 (22:45 +0100)]
Port badxml autotest to QMetaObjectBuilder

The meta-object format is going to change for Qt5. Use QMOB to
insulate the badxml test from such changes.

(It just so happens that the QFAIL("a failure") statement is still on
line 109 after the refactoring, so the expected_badxml.* files'
location tags did not have to be changed.)

Change-Id: I04421d13c4df71c8004fa71cafc4823a59079a41
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoRename Q_MUTEX_LINUX to QT_LINUX_FUTEX
Harald Fernengel [Tue, 21 Feb 2012 10:08:39 +0000 (11:08 +0100)]
Rename Q_MUTEX_LINUX to QT_LINUX_FUTEX

As requested by Thiago

Change-Id: Ie5b00cf4e530e19d360d0bc588f0f051e04b338f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agomoc: Fix loading of plugins in release mode.
Friedemann Kleint [Tue, 21 Feb 2012 10:46:33 +0000 (11:46 +0100)]
moc: Fix loading of plugins in release mode.

Generate the plugin meta data with "debug" set to false/true
in two code sections #ifdefed QT_NO_DEBUG.

Do not use the value of QT_NO_DEBUG set at moc compile
time which does not work in release mode/Windows.

Change-Id: I0252795ed063bebb2c3b3784f880e64845b5b7e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoStreamline QPalette initialization code.
Friedemann Kleint [Tue, 21 Feb 2012 11:26:58 +0000 (12:26 +0100)]
Streamline QPalette initialization code.

Share the brushes to reduce memory usage by QBrushData.

Change-Id: I04044b4c54b1f6a35a73d8bb4d299661ec0136a5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoUse new plugin system for Input Context plugins.
Friedemann Kleint [Mon, 20 Feb 2012 13:05:33 +0000 (14:05 +0100)]
Use new plugin system for Input Context plugins.

Change-Id: Ifd1f63499afba546a745815762263a58ebf66460
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQHeaderView - create a union to save some space.
Thorbjørn Lund Martsum [Mon, 20 Feb 2012 15:11:31 +0000 (16:11 +0100)]
QHeaderView - create a union to save some space.

Beside saving some space it also ensures a bit faster vector operations
(remove and insert memcpy) - and lower the risk for a cache-miss.
(Many operations seems to be about 5-10% faster in the benchmark).

Change-Id: If8109e2146c25f642015906375dfbb449706ce8e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoQHeaderview - many sections removed performance boost.
Thorbjørn Lund Martsum [Thu, 16 Feb 2012 09:12:30 +0000 (10:12 +0100)]
QHeaderview - many sections removed performance boost.

When the QHeaderView model rowCount is decreased then the headerview
needs to remove some sections.

If e.g swapSections had occured then qheaderview before this patch did
a very slow removal by removing one section at a time and for each section
it restored visual and logical indexes.

By temporarily storing the logical index on the section we
can reduce the execution time of this a lot. The old code is only
faster when we remove one index (and is kept for that situation)

There is a complexity in difference (and many factors in our
qheaderview benchmark (the trunc part))

Change-Id: If45eab17fbca3364d458b004980570b5d013e4bd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoRemove qMacVersion()
Bradley T. Hughes [Mon, 20 Feb 2012 08:43:02 +0000 (09:43 +0100)]
Remove qMacVersion()

Add QSysInfo::macVersion() instead, to match the windowsVersion()
function.

Change-Id: I783e59583ca21653d25586156cbb0cb1f301868b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix qlogging test.
Friedemann Kleint [Tue, 21 Feb 2012 07:38:37 +0000 (08:38 +0100)]
Fix qlogging test.

Build app sub-process first.

Change-Id: I87a11f7fd5d8a82584e496722f79e236191b0fb3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoImprove tst_QPrinterInfo::testForDefaultPrinter().
Jason McDonald [Tue, 21 Feb 2012 02:57:27 +0000 (12:57 +1000)]
Improve tst_QPrinterInfo::testForDefaultPrinter().

Be explicit about skipping the test when no default printer is present.

Change-Id: If69b275eb0f490411471ec42798d8aefcc57fd83
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAllow printer names to contain hyphens in QPrinterInfo test.
Jason McDonald [Tue, 21 Feb 2012 02:52:15 +0000 (12:52 +1000)]
Allow printer names to contain hyphens in QPrinterInfo test.

Change-Id: I473627413d2f1cd5637704f2948eb07a264be49e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix warning about unregistered metatype in QWindow autotest.
Jason McDonald [Tue, 21 Feb 2012 02:00:14 +0000 (12:00 +1000)]
Fix warning about unregistered metatype in QWindow autotest.

Change-Id: If9d8d7e1cd52815ef7231294e4890dfafcd28ec8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFlag two tests (Win+A, Simon+G) in parseString as expect fail on OSX.
Toby Tomkins [Tue, 21 Feb 2012 01:03:00 +0000 (11:03 +1000)]
Flag two tests (Win+A, Simon+G) in parseString as expect fail on OSX.

Remove previously defined insignificant test flag as the number of
tests failing has been reduced.

Task-number: QTBUG-24406
Task-number: QTBUG-23058

Change-Id: I01b41f30469cf7a440e21195e105cb30a8db76e2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMake the QApplication autotest work for shadow builds.
Jason McDonald [Mon, 20 Feb 2012 06:01:43 +0000 (16:01 +1000)]
Make the QApplication autotest work for shadow builds.

Use QFINDTESTDATA to locate the helper applications.

Change-Id: I604d10e37c9367f2e95225864edf5bf705f1d961
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotst_qapplication: mark expected failure on mac
Rohan McGovern [Mon, 20 Feb 2012 05:12:50 +0000 (15:12 +1000)]
tst_qapplication: mark expected failure on mac

The tab key behavior in Qt5 no longer respects the "Text boxes and lists
only" tab navigation option in OSX, which is the default.  This is a
regression since Qt4.

Task-number: QTBUG-24372
Change-Id: I54c1663f8fb259dd847083432102a0bfad7dd69c
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agoChanged qnetworksession unittest to work from installation dir
Kurt Korbatits [Mon, 20 Feb 2012 01:36:24 +0000 (11:36 +1000)]
Changed qnetworksession unittest to work from installation dir

- Made test depend on subprogram
- added install of subprogram

Change-Id: Ib263e9e75ed3c900b52fb1c9b6d319e71d19bdbb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoStabilize tst_qdbusabstractinterface and make it XFAIL
Rohan McGovern [Tue, 14 Feb 2012 02:55:49 +0000 (12:55 +1000)]
Stabilize tst_qdbusabstractinterface and make it XFAIL

This test was written incorrectly in a way which happened to allow it to
pass most of the time (but not all the time).

Reset the state of test objects between each test function, and mark the
broken functions with QEXPECT_FAIL and a link to a task.

Replace the unusual WaitForPinger construct with the usual
QTRY_VERIFY/QTRY_COMPARE method of verifying asynchronous operations.

Task-number: QTBUG-24262
Change-Id: I82d09002307c0b500bf60cd5b583674321b37609
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove many unneeded virtuals.
Richard Moore [Sun, 19 Feb 2012 15:43:57 +0000 (15:43 +0000)]
Remove many unneeded virtuals.

Cleanup a ### Qt 5 TODO.

Change-Id: I384e868ecc3ca4d80e4e71bb54d402f4ec1337a8
Reviewed-by: David Faure <faure@kde.org>
12 years agoconvert length functions in QDom from uint to int.
Richard Moore [Sun, 19 Feb 2012 15:31:44 +0000 (15:31 +0000)]
convert length functions in QDom from uint to int.

Fixes a ### Qt 5

Change-Id: I7a385f2b704d38ae626094f27b06a918d4a9bc48
Reviewed-by: David Faure <faure@kde.org>
12 years agoMerge overloads.
Richard Moore [Sun, 19 Feb 2012 13:41:31 +0000 (13:41 +0000)]
Merge overloads.

Fix a ### Qt 5 by merging the overloads.

Change-Id: If33e7592191c81b32caa6d68c73dbf2282437886
Reviewed-by: David Faure <faure@kde.org>
12 years agoInclude qt_windows.h for Windows CE.
Andreas Holzammer [Mon, 20 Feb 2012 17:38:52 +0000 (18:38 +0100)]
Include qt_windows.h for Windows CE.

The include is needed for OutputDebugString,
as it is defined in winbase.h. To include
use the centralized header.

Change-Id: I486da20d7b054cee352be085e65a0ede1394653d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoSilence warnings/debug output from qobject tests
Kent Hansen [Mon, 20 Feb 2012 13:26:00 +0000 (14:26 +0100)]
Silence warnings/debug output from qobject tests

They create noise in the test results.

Change-Id: I40e7239ba7cd41bec577fe8220c86476553a6502
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMerges several overloaded functions in QCoreApplication.
Xizhi Zhu [Sun, 19 Feb 2012 09:15:18 +0000 (10:15 +0100)]
Merges several overloaded functions in QCoreApplication.

The source compatibility is kept.

Change-Id: If66053b271d65062b3c0ce6ec66c8394a37b4e3e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agodon't attempt to build host tools which are gone from qtbase
Oswald Buddenhagen [Fri, 3 Feb 2012 21:15:07 +0000 (22:15 +0100)]
don't attempt to build host tools which are gone from qtbase

Change-Id: If9a3fb9792fc5d90496ff834b2c3adc177e1311e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoWindows - fix connecting to a socket using IPv4 mapped IPv6
Shane Kearns [Fri, 17 Feb 2012 20:33:57 +0000 (20:33 +0000)]
Windows - fix connecting to a socket using IPv4 mapped IPv6

Connecting to an IPv4 mapped IPv6 address (e.g. ::FFFF:127.0.0.1)
requires the IPV6_V6ONLY socket option to be cleared.
This was causing tst_qtcpserver::ipv6ServerMapped autotest to fail.
The same change is not required on MacOS X - the test passes there.

Task-number: QTBUG-24351
Change-Id: I6c08b19f0daa12765da2d44792ffb17299322695
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.
Friedemann Kleint [Mon, 20 Feb 2012 14:36:57 +0000 (15:36 +0100)]
Remove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.

Forward-declare instead.

Change-Id: I3851994e8bc05b389e94e948478339ba33d521c1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix warning about converting false to pointer value.
Friedemann Kleint [Mon, 20 Feb 2012 14:44:21 +0000 (15:44 +0100)]
Fix warning about converting false to pointer value.

Change-Id: I70c324e6fcfd2bba3ab44837c5ce2c007de8896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoMake sure that we pick up xcb from pkg-config
Jørgen Lind [Tue, 14 Feb 2012 15:38:32 +0000 (16:38 +0100)]
Make sure that we pick up xcb from pkg-config

and run the configure checks with the values

Change-Id: Ie8e0072c686c6a7dce1d02e25a9c1abce4679d34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove Native Client special casing from configure.
Morten Johan Sorvig [Mon, 20 Feb 2012 11:05:17 +0000 (12:05 +0100)]
Remove Native Client special casing from configure.

Change-Id: I20f044b267b6c18e5a3050de22710c45e7573cc3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove QAccessibleInterface::relationTo().
Jan-Arve Saether [Mon, 20 Feb 2012 13:42:41 +0000 (14:42 +0100)]
Remove QAccessibleInterface::relationTo().

QAccessibleInterface::relations() replaces both relatedTo() and
some of the RelationFlags that navigate() handled before.

Change-Id: I4b9d2c28ba3d753efe7cc9bfa0ad68bed3ee02fd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoUpdated for accessibility
Jan-Arve Saether [Mon, 20 Feb 2012 10:19:10 +0000 (11:19 +0100)]
Updated for accessibility

Change-Id: I13b5c2f293e9c1c238c7b7c6aae9d26f5c150f24
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoPort QDBusAdaptorConnector meta-object to revision 6
Kent Hansen [Sat, 18 Feb 2012 20:33:28 +0000 (21:33 +0100)]
Port QDBusAdaptorConnector meta-object to revision 6

We want to drop support for old revisions in Qt 5.

This commit brings the QDBusAdaptorConnector meta-object in sync with
current moc output.

The QtDBus implementation was assuming that the relaySlot() slot
would be created at index methodOffset() in the meta-object, but
since revision 4 that's no longer the case (signals always come
first). Made the code more robust by actually querying the
meta-object what the index is.

Change-Id: Ie0791680cc2e9e5fb1472c4462c391f92ea22ea6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove unused QtDBus meta-object extensions
Kent Hansen [Fri, 17 Feb 2012 22:00:41 +0000 (23:00 +0100)]
Remove unused QtDBus meta-object extensions

The inputSignature and outputSignature fields were not being used
anymore.

All tests still pass.

Change-Id: Icbc8fdcd5179a2b1b4843d58b90af925f6bef133
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQPoint/QPointF: inline manhattanLength(); QLineF: inline isNull()
Marc Mutz [Thu, 16 Feb 2012 06:42:11 +0000 (07:42 +0100)]
QPoint/QPointF: inline manhattanLength(); QLineF: inline isNull()

There's no reason for them not to be, and it's a prerequisite
for making these functions constexpr.

Change-Id: I03c9965147b51014c7af60a4c2d7f25a3f6e21a7
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoMove QTypeInfo out of qglobal.h and into a separate header
Bradley T. Hughes [Sat, 4 Feb 2012 13:32:16 +0000 (14:32 +0100)]
Move QTypeInfo out of qglobal.h and into a separate header

qtypeinfo.h is still included from qglobal.h, and defines QTypeInfo
as well as all the specializations for built-in and default Qt types.

Change-Id: I24116174de288a730cbb7aa2f80d346d2b2f9408
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoAdded note in QPlatformWindow::setGeometry() docs about position policy.
Samuel Rødal [Fri, 17 Feb 2012 15:58:09 +0000 (16:58 +0100)]
Added note in QPlatformWindow::setGeometry() docs about position policy.

Change-Id: I0ac76b7aac1aa717592c34f414b1dd8fbee92be2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agouic: use QStringLiteral() instead of QString::fromUtf8() where applicable
Marc Mutz [Sun, 11 Dec 2011 15:55:01 +0000 (16:55 +0100)]
uic: use QStringLiteral() instead of QString::fromUtf8() where applicable

Many (most?) strings written aren't in fact UTF-8, and we can check at
compile-time which are and which aren't, so don't hard-code fromUtf8()
but use the much more efficient QStringLiteral() where applicable.

This is low-hanging fruit. This patch only optimises US-ASCII string
literals, not those that are latin-1 or even UTF-8, because that would
require more extensive changes to the original fixString() function.

Likewise, there are also other calls to QString::fromUtf8() being
generated (e.g. in the pixmap code) that could benefit from being
turned into QStringLiterals, but their code paths are more involved
than those this patch fixes.

This patch at least suffices in turning all the setObjectName()
arguments into QStringLiterals, which was the main goal.

The autotest baseline has been updated with the new expected results.

Change-Id: Ic1ef67f500f9ff92d36164d515f4e004ef2a10bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix LSB mkspec
Harald Fernengel [Mon, 20 Feb 2012 08:25:24 +0000 (09:25 +0100)]
Fix LSB mkspec

Use the standard g++ specs, just override the compiler name

Change-Id: I4adacd7204d3880155bdfc3405e20f322ad593ea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agofix QProcess for Windows XP
Joerg Bornemann [Mon, 20 Feb 2012 11:31:37 +0000 (12:31 +0100)]
fix QProcess for Windows XP

CreateNamedPipe supports the flag PIPE_REJECT_REMOTE_CLIENTS since
Windows Vista. On earlier Windows versions the system call would fail
with ERROR_INVALID_PARAMETER.

This does not open a security hole on Windows XP as there can be only
one pipe instance.

Change-Id: I5a1c7fdf756678009857317c7b563c884afeef2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoEnsure the directory exists to receive a deprecated header.
Matthew Vogt [Sun, 19 Feb 2012 23:40:12 +0000 (09:40 +1000)]
Ensure the directory exists to receive a deprecated header.

When creating a deprecated header, create the directory it will be
located in, if it does not yet exist.

Change-Id: Id0ac7327e7dfe5b3e34b431c7bc3844b72251a3d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove QAccessibleInterface::navigate()
Jan-Arve Saether [Sat, 18 Feb 2012 22:29:24 +0000 (23:29 +0100)]
Remove QAccessibleInterface::navigate()

This is replaced by parent(), child() and relations()

Change-Id: Iabff6ec56176a1ca8465d6480860f6e0174fd134
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoUse standard unix mutexes on LSB
Harald Fernengel [Mon, 20 Feb 2012 08:37:07 +0000 (09:37 +0100)]
Use standard unix mutexes on LSB

LSB doesn't allow syscalls, so fall back to the normal _unix
implementation

Change-Id: I8aba6147da8b46e3f85b0454cf9aca219811c9fe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMove QMetaMethod::parameterTypes() implementation to helper function
Kent Hansen [Sun, 19 Feb 2012 18:34:50 +0000 (19:34 +0100)]
Move QMetaMethod::parameterTypes() implementation to helper function

Because of an upcoming change to the meta-object data format, the
ability to extract parameter types from a signature will be needed by
meta-object builders (such as QMetaObjectBuilder) soon.

Change-Id: I1f21b2be41761a5db2f1a05976fad29eb3aebb03
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoPort QSignalEventGenerator meta-object to revision 6
Kent Hansen [Sat, 18 Feb 2012 20:15:45 +0000 (21:15 +0100)]
Port QSignalEventGenerator meta-object to revision 6

We want to drop support for old revisions in Qt 5.

This commit brings the QSignalEventGenerator meta-object in sync with
current moc output.

Change-Id: Id5f4954b08cf49169850bd77543b2a7ab8274c18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoUse QMetaMethod::isValid() to check method validity
Kent Hansen [Fri, 17 Feb 2012 21:26:27 +0000 (22:26 +0100)]
Use QMetaMethod::isValid() to check method validity

The signature() method will soon be replaced by a function that
returns a QByteArray rather than a pointer, and calling it will be
more expensive than calling isValid(). Plus, isValid() looks nicer.

Change-Id: I6844988c84dcadf876fc86bc71c8b310a21f88de
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoAdd QMetaMethod::isValid() function
Kent Hansen [Fri, 17 Feb 2012 21:12:05 +0000 (22:12 +0100)]
Add QMetaMethod::isValid() function

This function provides a proper way of determining whether a function
returned by QMetaObject::method() is valid. (Checking whether
signature() returns a 0 pointer, which e.g. testlib does, is not an
ideal API -- especially given that signature() will soon be removed
and replaced by a function that returns a QByteArray.)

Change-Id: I644f476b09904925f2042945f5d0ad744482b682
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix typo in QByteArray(QConstByteArrayData) constructor
Kent Hansen [Sun, 19 Feb 2012 18:02:16 +0000 (19:02 +0100)]
Fix typo in QByteArray(QConstByteArrayData) constructor

There is no "str" member in QConstByteArrayData, it should be "ba".

Change-Id: Ife76460e9332733480c1ceded21e78388656092d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoDon't call metaObject() several times
Kent Hansen [Fri, 17 Feb 2012 20:48:52 +0000 (21:48 +0100)]
Don't call metaObject() several times

It's sufficient to call it once per invokeMethod.

Change-Id: I1db826027eca87c799f216d65e27c801a23e64e2
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoSmall moc cleanup: Pass lists by const reference
Kent Hansen [Sun, 19 Feb 2012 17:52:19 +0000 (18:52 +0100)]
Small moc cleanup: Pass lists by const reference

generateFunctions() shouldn't (and doesn't) modify the list of
functions, so the list should be passed by const reference.

Change-Id: If5ff810e5623e734816c3089eb8b3fd4f54f2345
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agomoc: Get rid of implicit conversions to const char *
Kent Hansen [Sat, 18 Feb 2012 17:51:46 +0000 (18:51 +0100)]
moc: Get rid of implicit conversions to const char *

moc mostly operates on QByteArrays. When an actual const char * is
needed, it should be explicit.

Change-Id: I0b3e262830128306688f4512a4b59ce8966c2579
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMinuscule moc cleanup: Don't declare i in function scope
Kent Hansen [Mon, 20 Feb 2012 05:48:17 +0000 (06:48 +0100)]
Minuscule moc cleanup: Don't declare i in function scope

This is not C.
Furthermore, the function-level i was already shadowed in several
places by "for (int i = 0; ..." blocks later in the function.

Change-Id: Ic1777f78d9838bc2921d68337be05de454bbeabe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoDon't force CFG_ENDIAN to "auto" on Mac.
Morten Johan Sorvig [Fri, 17 Feb 2012 13:21:37 +0000 (14:21 +0100)]
Don't force CFG_ENDIAN to "auto" on Mac.

We no longer support universal ppc/x86 builds.

Change-Id: I8c4a1d087d02da1ad80d91a7a04147b37e81d74f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoDon't use -rpath-link when building on Mac.
Morten Johan Sorvig [Fri, 17 Feb 2012 13:34:25 +0000 (14:34 +0100)]
Don't use -rpath-link when building on Mac.

The logic here was wrong: test if the
target linker supports -rpath-link, and then set
it for both host and target via mkspecs/qmodule.pri.

Change-Id: Ie4da7ed2e06e784f9edb65a27290913ab838a8c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix compilation with MinGW-w64
Jonathan Liu [Sun, 19 Feb 2012 11:33:35 +0000 (22:33 +1100)]
Fix compilation with MinGW-w64

This fixes a "cast from 'void*' to 'int' loses precision" error and adds
a missing argument to qWarning.

Change-Id: I38544c4e317a3f6d1ecf26ebb3e35c66b1878d24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRename Q_PROCESSOR_POWERPC to Q_PROCESSOR_POWER
Bradley T. Hughes [Fri, 17 Feb 2012 13:17:54 +0000 (14:17 +0100)]
Rename Q_PROCESSOR_POWERPC to Q_PROCESSOR_POWER

IBM's POWER and the PowerPC architecture have been merged into a single
ISA, the Power ISA (see http://www.power.org). Use this unified name in
Qt.

Change-Id: Ia41492b0031d890843e43c5f7ecd1e60c65bb75b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoqwidget_p.h: Remove DontSetCompositionMode from the internal flags
Holger Hans Peter Freyther [Sun, 19 Feb 2012 18:20:49 +0000 (19:20 +0100)]
qwidget_p.h: Remove DontSetCompositionMode from the internal flags

This flag was used by QWS to set or not set the composition mode
when filling the background. E.g. this was used by 'transparent'
windows to set the alpha bits. QPA didn't have this enabled in 4.8,
the code paths are gone in Qt5 and it is the responsibility of the
QPlatformBackingStore to initialize the alpha bits properly.

Change-Id: I4011d842b718d6a40b19922b5f75c597e63079c8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoqpa: Verify that the platform returns a WId that is not WId(0)
Holger Hans Peter Freyther [Wed, 1 Feb 2012 12:32:53 +0000 (13:32 +0100)]
qpa: Verify that the platform returns a WId that is not WId(0)

This is motivated by visiting a customer that re-implemented the
::winId method and returned WId(0) that resulted in a crash. Currently
there is only a comment inside the implementation of the ::winId
default implementation. Add a note to the API documentation, add
a Q_ASSERT to check if our assumption holds true.

Change-Id: I8607a4efc4f561f7849c976cd2454f6fbcb20eaa
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove dead method.
Richard Moore [Sun, 19 Feb 2012 16:31:39 +0000 (16:31 +0000)]
Remove dead method.

Fix Qt 5 TODO

Change-Id: I9a12cc07ebc7c039bbeb53922b0539f177b226f8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoChanged qabstractnetworkcache unittest to use TESTDATA
Kurt Korbatits [Mon, 20 Feb 2012 04:05:47 +0000 (14:05 +1000)]
Changed qabstractnetworkcache unittest to use TESTDATA

- Changed qabstractnetworkcache to install testdata

Change-Id: I8f2ae6103214755ee7898dbc0ee50c0e4d7d45ab
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoModify helper functions to remove embedded QSKIP call and return status.
Toby Tomkins [Mon, 20 Feb 2012 03:29:13 +0000 (13:29 +1000)]
Modify helper functions to remove embedded QSKIP call and return status.

The helper functions contained QSKIP macros which do not also skip their
parent function. These QSKIP function were removed and replaced with a
return success value.

Change-Id: I533f57842fc95beaeb1fcde5235678e9807db056
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoSet tst_qtoolbutton triggered function skipped.
Toby Tomkins [Mon, 20 Feb 2012 05:46:46 +0000 (15:46 +1000)]
Set tst_qtoolbutton triggered function skipped.

This autotest seems to be caught in an event loop preventing further
correct signalling. Mark test function skipped with QSKIP.

Task-number: QTBUG-24374

Change-Id: Ic943a33b71fa87d0873278cb7b7b134c22602be3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMake QLocale autotest pass for shadow builds.
Jason McDonald [Mon, 20 Feb 2012 01:39:31 +0000 (11:39 +1000)]
Make QLocale autotest pass for shadow builds.

For shadow builds where "make install" had not been run, the
tst_QLocale::emptyCtor test function would fail to find its helper
application because QFINDTESTDATA was not searching for it in the build
directory due to the test not instantiating QCoreApplication.

This commit fixes the test by instantiating a QCoreApplication using the
QTEST_MAIN macro, which also allows some special case code for Windows
CE to be removed.

Change-Id: Ic81d4699da2538c24b36b3d6bd52c4a02ad417f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: Report one test result per benchmark test.
Jason McDonald [Fri, 17 Feb 2012 03:39:30 +0000 (13:39 +1000)]
testlib: Report one test result per benchmark test.

Prior to this commit, a benchmark test could report 0..n passes and 0..m
fails or skips, where n is the number of accumulation iterations used to
collect benchmark data and m is the number of times the test function
was invoked.  Depending on the type of benchmark measurer being used,
this could result in a very large volume of test output and inconsistent
pass, fail and skip counts between test runs.

This commit changes the behaviour so that each benchmark test reports
one pass, fail or skip, regardless of the number of iterations used to
collect benchmark data.

This commit also prevents benchmark data being reported in the test
output if the benchmark test failed or skipped, as any benchmark data is
of dubious value in such cases.

The latter change in behaviour requires a minor modification to the
badxml selftest, which now tests quoting of literal strings in xml test
output for both passing and failing benchmarks.

Finally, this commit also adds a new selftest specifically for verifying
correct behaviour for benchmarks that fail or skip.

Task-number: QTBUG-24313
Change-Id: I3426dc659a7511b62fd183a031c7235bc753f497
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFixed qobject unittest to work from installation directory
Kurt Korbatits [Mon, 20 Feb 2012 00:18:01 +0000 (10:18 +1000)]
Fixed qobject unittest to work from installation directory

- Made test depend on subprogram to make sure it was there when
  test ran.
- install signalbug subprogram

Change-Id: Ie0a19e52d131adcd17c97b263389aecffb81520e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agotestlib: Add selftests for XPASS and XFAIL involving QCOMPARE.
Jason McDonald [Mon, 20 Feb 2012 00:15:57 +0000 (10:15 +1000)]
testlib: Add selftests for XPASS and XFAIL involving QCOMPARE.

Change-Id: I4f897b411aaa51ff453208eda50e12665489074b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>