Commit Graph

1177 Commits

Author SHA1 Message Date
Sergio Ahumada
d2f1c6cd75 test: Skipping tst_qmdisubwindow::setFont() as it's unstable
This unstable test is preventing some good changes from being
merged. Further investigation needs to follow, so people can
refer to QTBUG-22544 for a real fix.

Change-Id: I038e5f340ccd2562d0e67428af595a2bcfc8c11d
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-11-03 20:07:04 +01:00
Bradley T. Hughes
faa6113c41 Fix unstable test due to a race in QThread
QThread::finished() is emitted before setting the thread's state to
finished and !running, which means it's possible to receive the
finished() signal and act on it while QThread::isRunning() still
returns true.

This test randomly fails due to this race. Fix it by using checking
the return value of QThread::wait() instead.

Change-Id: Ibf347fc9a2e8d32b328227ee6978e1129dd781f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-03 18:43:52 +01:00
Olivier Goffart
ec5e59b73c QThread::isFinished should return true from finished()
and isRunning() should return false.

This restore the Qt 4.7 behaviour

In Qt 4.7, the finished() was called with the thread's intenal mutex
locked. Which mean that:
 - Call to isRunning or isFinished called from a slot connected to
   finish within the thread would deadlock. (Hence no compatibility
   to keep here)
 - Call to isRunning or isFinished from a slot connected with
   QueuedConnection in another thread would lock the mutex until
   the destructors are finished. and then return as if the thread have
   finished.

Change-Id: I963eccae8f7634aff90cc4bbab6ca886a78e35eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-03 18:43:52 +01:00
Jason McDonald
f79dc01304 Remove empty functions from QDirModel test.
Change-Id: Ieb8af41425739f9175df26224b171cd9f8b3c4f3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 08:17:54 +01:00
Jason McDonald
edc77f5aa8 Improve QDirModel autotest
The unreadable() test function has been disabled since before the tests
were imported into the Qt repository.  The idea of the test seems valid
(though the original implementation failed to correctly create an
unreadable file), so it should be re-enabled.

Change-Id: I94634bc5785dfbfbb42ca975badaead7fe812b29
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 08:17:43 +01:00
Jason McDonald
8cb52795f1 Allow extra selftests without modifying source.
Change-Id: I21708b725611eb64bdb0414cee08ca00dd62b213
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 02:42:56 +01:00
Samuel Rødal
9022f42a4f Get rid of "#if 0" and skipped tests in QPainter autotest.
qt_format_text_clip() and qt_format_text_boundingrect() have been
skipped ever since they were originally added to git, so I see no point
in keeping them.

The #if 0 in setEqualClipRegionAndPath() was ifdefed out from when that
specific test case was added (maybe it was failing to begin with?), but
it passes now, so we should enable it.

Change-Id: I6551e3b5612a4d4b00a969511af6abc85db43892
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-03 01:06:05 +01:00
Jo Asplin
938ce35cec Re-enabled passing tests in tst_qgraphicsitem
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsitem test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: If311bc61801d2a279c274928ae7f0faeb595eeb3
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:42 +01:00
Jo Asplin
718f58487d Re-enabled passing tests in tst_qgraphicsview
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsview test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: I6b8eb09000ece789b990a2dd697cdb8b47cc8e1c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:38 +01:00
Jo Asplin
b92fed185e Re-enabled passing tests in tst_qgraphicsscene
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsscene test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Idd229532787ce8138d8e1c86daf1f91b90e87e38
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:34 +01:00
Jo Asplin
006c5a7d73 Moved tests into network/ssl/
This commit moves qsslsocket_onDemandCertificates_member and
qsslsocket_onDemandCertificates_static from tests/auto/ to
tests/auto/network/ssl/.

Change-Id: I1593e113016ce7bb7dffbee82f1196275784d0ac
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:29 +01:00
Olivier Goffart
f3242864c3 Use C++11 static_assert
Change-Id: I75aa2bc209cdc8869e7daa9fd0dd865ccf65a68e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-11-02 13:24:36 +01:00
Jason McDonald
e9b5cd0266 Reinstate disabled part of qsortfilterproxymodel test
This test function has been disabled since before the tests were
imported into the Qt repository in 2006, but seems to pass today, at
least on Linux.

Change-Id: I8ff90a11a0fbb260d66b20ae735b5f21c450a5af
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:34 +01:00
Jason McDonald
5eb0a7be74 Remove stale test data from qsortfilterproxymodel test
The removed test data has been disabled since before the tests were
added to the Qt repository in June 2006, and was incomplete (the
"pattern" field was missing).

Change-Id: I974d03a4dcca76ba1a20f740372702612c8ce02b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:27 +01:00
Jason McDonald
82a4516c5d Remove disabled code from QWidget autotest.
The removed code was already disabled when first committed in January
2009.

Change-Id: I00a82f2e673fee76869cc76d756c36d081da2d2a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:20 +01:00
Jason McDonald
647e59fdb1 Remove disabled code from qgridlayout autotest
The removed code was already disabled when it was first added in June
2006, and is based on assumptions that no longer hold true.

Change-Id: Id7941d46e2a993aac422554dcc5540eb64eac492
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:43:55 +01:00
Jason McDonald
a7b1f30d57 Remove disabled test data from QUrl autotest
The removed test data was for obex URLs, which are not supported by
QUrl.

Change-Id: I166130ae936342d415165e46b7943d198de8986b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:43:49 +01:00
Jason McDonald
1f0f5c1691 Remove redundant #if 1 from qdbusmarshall test
Change-Id: I5342210cda1f02950667621e5e64d65d6357c6ce
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:43:40 +01:00
Jason McDonald
98992786f3 Remove redundant code from qsortfilterproxymodel test
Remove a couple of "#if 1" directives (but not their contents), which
have been present since before the tests were imported into the Qt
repository in 2006.

Change-Id: Id43aff37843e7a44ed96973f809de3838ba0e5b9
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:22:50 +01:00
Jason McDonald
238bdc2e91 Improve QWidget autotest.
Remove some "#if 1" directives and a line of debug code.

Change-Id: Ib34f5b65470a24ee499799525ffe0645ccc117fe
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:22:16 +01:00
Jason McDonald
6fce33dd4c Remove debugging code from qgraphicsitem autotest.
Change-Id: Ia2ff65b5e980b42c5c64b957143860e94395d54f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:21:00 +01:00
Jason McDonald
60f6f63c54 Remove unused code from qdbusmarshall test.
The removed functions have been unsued since at least as far back as
2006.

Change-Id: Id1ea77dbfffa319c18891968f3aa378cfb563fd4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 00:53:26 +01:00
Jason McDonald
983ba6510b Remove obsolete code from qdbusmarshall test.
The removed code had been disabled since 2007 and tested functionality
that was no longer supported.

Change-Id: I49dfe58601c1cc6d41590ab2980daba27eca6bfb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 00:53:26 +01:00
Jason McDonald
5b744aefa3 Remove obsolete code from qdbuspendingcall test
The tested functionality hasn't been in the public API since 2008.

Change-Id: I2898da3730fa6248eea2e19779b33ccc793b7a31
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 00:53:26 +01:00
Jason McDonald
2c665596ae Remove disabled code in QItemView test.
The removed code was disabled in January 2007.  The commit history does
not make clear what the code was supposed to achieve and the code
doesn't do what the comment at the top says (that looks like a TODO).
Best to delete it and start again.

Change-Id: I42b6b1d865c96518d74dc189a4a41d0d2776e5bc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 00:53:26 +01:00
Casper van Donderen
51bee2babf Remove test that hasn't been enabled since 2007.
Task-number: QTBUG-22444

Change-Id: Id7569cf60cb314511a7d4f38833913c442f3fbba
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2011-11-01 17:39:32 +01:00
Friedemann Kleint
735457a40b Remove remains of qpa in tests.
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>

Change-Id: I41aed5290df5aebeb30ebf5d2796aca6c65980d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-01 16:15:08 +01:00
Jędrzej Nowacki
991d9cf928 Fix broken build.
Variadic macros are not supported by C++98 standard.

Change-Id: Ib520297e43b654b46925f3ee2735a975ebbe8e35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-01 16:15:08 +01:00
Jo Asplin
6264bf242a Re-enabled passing tests in tst_qgraphicswidget
To increase the effective test coverage, this patch
re-enables the tst_qgraphicswidget test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Ic484fde3492f077453f47a959dd6dc862288dcaf
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-01 13:15:44 +01:00
Olivier Goffart
d2ed588419 tst_qvariant: add a test QVariant works with not movable types
Soon, QVariant will use more internal storage. It is important
that it still work with not movable types

Also, check with type that are movable but cannot be copyed
without their copy constructor to be called such as QSharedDataPointer

Change-Id: I6d67755476e4822468599bebfa8774ad96a15306
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-11-01 12:56:09 +01:00
Jason McDonald
d304b3a5bb Remove debug code from qsortfilterproxymodel test
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: I80691b274d9d2abda72bca894ace9de545410ed8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:57 +01:00
Jason McDonald
ceb4dd4b54 Improve QWidget autotest
There are two cases where a QCOMPARE may fail on some platforms. Rather
than disabling the QCOMPAREs with "#if 0", use QEXPECT_FAIL so that we
can look in the CI logs to see which platforms fail.

Change-Id: Ife93c8032e01a04e8068bf213e2040778c12f711
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:51 +01:00
Jason McDonald
3e05a987b1 Remove debug code from QLayout autotest.
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: Id4efb74a2d3646f3554b643762beefba113c3602
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:44 +01:00
Jason McDonald
b2ed01891d Remove debug code from QGridLayout autotest
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: Ifd2bbd17677e16ddb0f1846287d722cdae76d984
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:36 +01:00
Jason McDonald
3e035a5edb Remove obsolete test.
The commit that disabled this test a few days after it was originally
comitted (bda80c4b in the grafted history) makes it clear that this
test was never valid.

Change-Id: Ib0090fc35d0b9251d7b7367de2c71a66a332c567
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:28 +01:00
Jason McDonald
390e20fc71 Improve QMenu autotest.
Originally this commit was just going to reinstate the disabled line of
test data (after correcting it to use keyboard modifiers instead of
invalid bitwise-or of key-codes, which would trigger an assert in
qtestlib).  Unfortunately, this revealed a minor bug in QMenu, as
reported in QTBUG-22449, so a QEXPECT_FAIL has also been added.

Change-Id: I29699fcbfa353c037a83379a6140f0e3da5be027
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 03:17:57 +01:00
Jason McDonald
9a9d2e8ba2 Improve QMenu autotest
The test for keyboard navigation was only checking correct highlighting
when a menu item was not activated by the latest key-click.  It should
also check that no item is highlighted after an item is activated.

Change-Id: I443e154be5cdc2def4f12d3f0abab2cc1bc6e4a8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 00:25:34 +01:00
Robin Burchell
03f852cb47 Move support for socket binding from QUdpSocket upstream to QAbstractSocket.
This should be API-compatible with Qt 4, but is not ABI-compatible, due to
removing the enum from QUdpSocket.

Task-number: QTBUG-121
Change-Id: I967968c6cb6f96d3ab1d6300eadd5bde6154b300
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-10-31 20:25:12 +01:00
Lars Knoll
5761d8546f Correctly handle null windows or widgets in keyClick()
Allow passing of null windows or widgets to keyClick().
In that case route the event through the normal Qt event
processing. This allows e.g. shortcuts to catch the
key event.

Change-Id: Ic9455ea9be5164918b1c0bccbd58dd32eae74ff1
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-10-31 09:55:07 +01:00
Jason McDonald
79fb588030 Remove disabled code from QMainWindow autotest.
The removed code has been disabled since it was first added in October
2006.

Change-Id: I10243aa2979fd1615c919ec522d10d77d6527b3b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 08:31:30 +01:00
Jason McDonald
fd672569e4 Remove unstable test from qgraphicsscene test.
The removed test was disabled in February 2007 because it did not work
cross-platform.  The comment that was added at the time claims that the
functionality is covered thoroughly by other tests, but even if that
isn't true we're not losing anything by removing this test as it is not
even useful as a starting-point for a new test due to its reliance on
random test data.

Change-Id: Ica74262082184908d02595702486803d1efff4d2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 08:31:24 +01:00
Jason McDonald
35d75fac0a Remove obsolete test data from qgraphicsitem test
The removed test data was disabled by commit 83747a82 and should have
been removed at that time.

Change-Id: Ia2cef0bf4394a5b95fdf37db26369e733c7e86ec
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:59:47 +01:00
Jason McDonald
a1c3bd7547 Remove disabled code from qgraphicssceneindex test
The removed code used to test API that was removed in the graphicsview
refactor that was done for Qt 4.5.1.

Change-Id: I3b312b9e51114e24c6ef1191353c35688b229d99
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:59:42 +01:00
Jason McDonald
a6e6296ce3 Remove disabled code from QString autotest.
The removed code was disabled before the tests were imported into the Qt
repository in 2006, so its meaning or usefulness is lost in the mists of
time.

Change-Id: I3108a1a1d86cd135886608f47dcd88bf49f2d3fd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:59:36 +01:00
Jason McDonald
2e8b151049 Remove disabled code from QRegExp test
The removed code was disabled before the tests were imported into the Qt
repository in 2006, so its meaning or usefulness is lost in the mists of
time.

Change-Id: Iccdf5638106b054f02ed73790f7acda1b17b045b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:59:30 +01:00
Jason McDonald
665c9390d0 Remove tests for API that never made it into Qt.
Change-Id: If78d82abfb4ff3402eb8f36729bacc3c4d343d0c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:59:24 +01:00
Jason McDonald
7698cd3750 Remove obsolete code from QChar autotest.
QUnicodeTables::ligature() was removed from the API in 2006.  The
commit that disabled the test also changed the code to call
QChar::ligature(), which has never existed.

Change-Id: I056c17c178a527b076538fb007404ff0b735ba02
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:59:18 +01:00
Jason McDonald
e92f9fc49e Remove obsolete code from qstate autotest.
This was originaly the only test function in this test, and should have
been deleted when it was replaced by the other test functions.

Change-Id: Idc71a5462fd4d19955f9b14389b877be16c62ab5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:59:11 +01:00
Jason McDonald
a13b24eac0 Improve QBuffer autotest
The documentation of QIODevice::pos() states: "For sequential devices or
closed devices, where there is no concept of a "current position", 0 is
returned".  The test had a disabled check for a position of -1 before
the device is opened.  Make the test agree with the documentation.

Change-Id: Ide5729bfc825cdb84caf4851574a57d3ef42ccb2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:58:15 +01:00
Jason McDonald
be16b833a5 Remove debugging code from QFileSystemWatcher test
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: I201ba754df26ffc30997bead8b822f97913db2b6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 05:27:56 +01:00
Jason McDonald
31e3f78336 Remove disabled tests from QUrl test.
Some tests were copied in from KDE's KURL sometime prior to Qt's tests
being added to the Qt repository in June 2006.  This was presumably
done with the intention of making the tests work for QUrl, but that
never happened and the copied tests have never been enabled.

This commit removes the copied material.

Change-Id: Ic35526f0018900bd60d7905646b24c62317b5e47
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 05:27:48 +01:00
Jason McDonald
9d606227c6 Remove obsolete code from qtconcurrentiteratekernel test.
The removed code refers to WhileIteration, which does not exist.

Change-Id: I4c44bc319ac776d16ce9ba7b5c2938ce1642a3f6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 05:27:40 +01:00
Jason McDonald
5a71947ee4 Remove obsolete code from qtconcurrentrun test.
The removed code was left over from an unfinished MSVC6 compatibility
API (see commit e3e28e7a in the grafted history).  That compiler is
no longer supported, so this code can be retired.

Change-Id: I81bcfa771ae13579f2458eb2d3ebf41c6af8577c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 05:27:33 +01:00
Jason McDonald
37eb6c7d5c Remove debug code from QLocalSocket autotest.
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: Ie44b6ea8dd496857ea264f730148d3dc4f5c8324
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 05:27:26 +01:00
Jason McDonald
8f7b138833 Remove debugging code from languagechange test
Change-Id: Ic3f1ea9ed3dd4ad78fccd66718f53a798cf8103a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 05:27:15 +01:00
Jason McDonald
c8c9f6b46f Remove dead code from QTransform autotest.
Remove the operator_star_qrect() test function.  The body of this test
function has been inside "#if 0" since the commit that created the test
in 2006 and the operator it is trying to test doesn't exist.  Seems fair
to assume that this function isn't worth keeping.

Change-Id: I9748273b28eae4b07c3a25f77cee412ad94ea822
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 02:34:43 +01:00
Jason McDonald
5b9ada3cd5 Remove debugging code from QPainter autotest.
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: Ic7fb619081e9ff453769f4064431dc726e90b985
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 02:34:36 +01:00
Jason McDonald
f935b98b20 Remove debugging code from QPathClipper autotest.
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: I36c0624cccf70853a697a2395259b387fa334134
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 02:34:30 +01:00
Jason McDonald
5029a99118 Remove dead code from qpixmap autotest
The removed code was in #if 0 in the original commit of the test
function and appears to be an earlier version that should have been
discarded before the initial commit.

Change-Id: I91f16aa7adcccb50f4f3a02062fb9d105d85000c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 02:34:23 +01:00
Olivier Goffart
4fe3cf8ee9 moc: support c++11 style enums
Task-number: QTBUG-21480

Change-Id: Ic116a5a06dd68036823f27146e49511c68cf2de6
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2011-10-29 21:18:45 +02:00
Jo Asplin
b5ef53df45 Re-enabled tst_LargeFile
tst_LargeFile currently seems to pass in a stable way in CI

It does have an issue on 64-bit Linux (see QTBUG-21175), so
that test function is still disabled (QEXPECT_FAIL'ed) on that platform.

Change-Id: I818046f84f2db5eb2155ae1f51f69581029bfaee
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-10-29 19:56:37 +02:00
Robin Burchell
a2337f79ff Remove Windows and X11 from src/widgets/platforms.
This is dead code, unused with QPA in place, so remove it to avoid confusion
caused through grepping for class names existing in both old and new places.

Mac code is left in place for now, as some of it is still in use.

Change-Id: Ia82cd5bbabe71285ca997f79d8fd9c0504e32c28
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-10-28 16:29:13 +02:00
Jason McDonald
0b77a19394 Improve QTextBrowser unit test.
The relativeLinks() test function was not performing sufficient
verification steps and thus hid a regression.

Task-number: QTBUG-22416
Change-Id: I2db4d4035e7a32f3c84630c7a15408d31d85ac9e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-28 09:33:54 +02:00
Jason McDonald
0a75be21b3 Move test data to the right place.
This file seems to have been forgotten when the test it belongs to got
moved -- probably because the test was poorly written and still passed
when the file couldn't be opened.  The file is supposed to live one
directory up from the qtextbrowser test so that it can be used to test
opening url's with relative paths.

Change-Id: Id80965b1c73b37de75691ae3a18f909f9c6d799a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-28 09:33:47 +02:00
Jason McDonald
f2f4115235 Remove redundant preprocessor directive.
In Qt5, it's quite safe to assume that QT_VERSION is greater than 4.x.

Change-Id: I2b7f491d79e084f3a52ee54c9e97419570b57584
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-28 09:33:29 +02:00
Bradley T. Hughes
ba90d5cc8b Update QMutex benchmark to match the one in 4.8
Pull in recent changes in the 4.8 branch for the QMutex benchmark.

Change-Id: Ie1e9bff33cecafb36d3d12207100f09f99597f8e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-10-27 16:32:09 +02:00
Steven Ceuppens
fca432c1c0 Add QDataStream operators to QMargins, so it can be streamed
* QDataStream format documented
 * Added Unit test for QDataStream operators

 * Updated Unit test

Change-Id: Idbcfcb0b927e6369e8d31b57693c7aa0d1a154e7
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-10-27 13:32:01 +02:00
Jason McDonald
919c5982b8 Remove pointless QVERIFY(1) calls in QPainter test
Change-Id: Iae5fcb9fa7dc64ed2d2bd369dbe689c5136ad283
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 11:14:53 +02:00
Jason McDonald
e822eb1a65 Use standard method of excluding a test.
If we find out at run-time that an entire test program is not
applicable, the correct way to skip the test is by calling QSKIP from
the test's initTestCase() method.

Change-Id: Iaf1dbcce38c569ee9513bf37232e9e4ea287d872
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 11:14:44 +02:00
Jason McDonald
1bc8f124b8 Prefer compile-time checks to QSKIP.
Qt has compile-time defines for determining the presence of each style
in the build.  Use these to exclude inapplicable test data instead of
including all test data and then being unable to distinguish the absence
of a style from regressions in QStyleFactory.

Change-Id: Iab1756aec80892a8b587bb635779537c64b1d4dd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 11:14:21 +02:00
Jason McDonald
c9bc2a6fda Remove unnecessary QSKIP.
Change-Id: Icaa0687d5d0370ede6076cbee9d97d89e338ca17
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 11:14:12 +02:00
Frederik Gladhorn
5aa14793c4 Add default actions to QAccessibleWidget.
Change-Id: I9f251aad663fd0b8db2ef068c6581241d91c090d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-27 11:12:38 +02:00
Friedemann Kleint
0c3d898a03 Tests: Remove Q_WS_QPA, qpa-sections from .profiles.
Compile without -qpa.

- Make Q_WS_QPA-#ifdefed sections the default in the code
- Replace some Q_WS_ by Q_OS_
- Add ### fixme for places that need checking
- Remove qpa conditionals from .pro files.

Change-Id: I6ea930afc0c236cc12a7b7e95f1b8a1c24b3a513
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-27 09:50:30 +02:00
Jason McDonald
af8795c2b5 Remove unreachable QSKIP in UIC autotest.
If an autotest's initTestCase() method fails or skips, the remaining
test functions are not executed.  Thus the QSKIP in the run() test
function was unreachable.

Change-Id: If1f1b484958367236357f9445491bed50bee2239
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 06:12:17 +02:00
Jason McDonald
238c304613 Remove obsolete MSVC workarounds from autotests.
Qt5 doesn't support MSVC versions before 2008, so workarounds for
earlier versions are no longer required.

Change-Id: I429feff99fe61d286637b960d92fd58962f8aefa
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 06:12:09 +02:00
Jason McDonald
eeaf051558 Replace QSKIP with QFAIL in qputenv test
If qputenv fails, the test should fail rather than skip, particularly as
the test is supposed to be testing qputenv.

Change-Id: Iabe13d360cabaeffda46fab19f1dd0d4ed8e1eee
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 03:15:09 +02:00
Jason McDonald
66c3f8753c Remove inappropriate QSKIP in QTextCodec autotest.
There were only two ways the QSKIP could be called: (1) the C++ runtime
is broken, or (2) the earlier call to resize the string failed.

In both cases there should be a hard test failure. In the former case, a
broken C++ runtime calls all of the test results into question.  In the
latter case, the QByteArray::resize() method has suffered a regression.

Change-Id: I5adf942d2eb4d746d2ab31e98571c5d9bdd40890
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 03:14:59 +02:00
Jason McDonald
a97c0c3c99 Remove obsolete QSKIP call.
The bug referenced in the QSKIP has been marked as resolved, so this
QSKIP should no longer be needed.

Change-Id: I41dd964827a3df8fb5ebb9674cef9db59c03d432
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 01:38:39 +02:00
Sergio Ahumada
c3313fdd1c Doc: Fixing typo
Fix typos I was able to find in `tests/auto' directory.

Change-Id: Id0bfcc18301381ac8b1ca8d5af17bd926e5913d4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-10-26 13:50:12 +02:00
Jo Asplin
1b345e8655 Re-enabled tests
This commit re-enables tests that are assumed to be ok by now, since they:
- Have been passing in CI for a long time recently (more precisely, not failed once in pulse run range 730-829).
- Did not have any known issues associated with them.

Note that not all of these tests were disabled as a result of QTBUG-21402.

Task-number: QTBUG-21402
Change-Id: I80bbf8b351bd9165aa968e98f4dc17e8be6bc7c3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-26 02:58:36 +02:00
Jo Asplin
2dd6745306 Re-enabled tst_qstatictext
tst_qstatictext is fixed by 8b4e40f535

Task-number: QTBUG-20977
Change-Id: I70631951c98ee3033f4d0c7a61fad102d28846d1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-26 00:47:24 +02:00
Jo Asplin
777d34ab5a Re-enabled tst_qrawfont
tst_qrawfont is fixed by 8b4e40f535

Task-number: QTBUG-20976
Change-Id: I862674211f581abec8714d1a3da4dc38227c2606
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-26 00:45:06 +02:00
Jo Asplin
2f4a95d24d Re-enabled tst_qhttpnetworkconnection
tst_qhttpnetworkconnection is fixed by 13df02ad04

Task-number: QTBUG-20981
Change-Id: I5666dbafe09113a7ecc3680f7608f874d66e2c19
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-26 00:43:11 +02:00
Jo Asplin
6d8c149217 Re-enabled tst_qsocketnotifier
tst_qsocketnotifier is fixed by 0e7cecb861

Task-number: QTBUG-20982
Change-Id: I97c0bc0f94a04e57f239de99bf3b64451a492434
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-26 00:41:24 +02:00
Frederik Gladhorn
0fd8514a57 Fix QDialog test: Q_WS_X11 is no more.
Change-Id: Ia4182b22f4a4999a80d7792378e1b9dfa03e7f9c
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
2011-10-25 15:17:00 +02:00
Frederik Gladhorn
3ff8e94925 Bring back QDoubleSpinBox test.
Returning text "1.00" instead of "1" sounds right to me.
Checking the test before the widget is shown/validated sounds pointless.

Change-Id: Ifc9e51dc9448a5bb3afbd566fe10524fbabc654f
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
2011-10-25 15:16:56 +02:00
Frederik Gladhorn
692b49abf8 Fix autotest tst_qtextbrowser.cpp
The qrc tests need further investigation.
Bring at least back the basic test.

Change-Id: I302a37b6c989af76db67716ffcf10a0960234156
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
2011-10-25 15:16:46 +02:00
Shane Kearns
ba995c372c QNetworkReply autotest no longer needs private_tests
Due to clearAccessCache being made part of the public API in Qt5,
this autotest can be run on normal Qt builds again

Task-number: QTBUG-17312
Change-Id: I3b70237a28ed141ffb49762cc40c8a528f9be6a8
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-10-25 12:53:46 +02:00
Honglei Zhang
bcdc64f1e0 Fix QtSQL auto test server addresses
Fix QtSQL aoto test server addresses. New servers are located in
Brisbane. Old Oslo test servers shall not be used anymore.

Change-Id: Icd4ae4c0193f71410d572bfa014272e1e77586c0
Reviewed-by: Trust Me
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2011-10-25 10:07:26 +02:00
Rohan McGovern
d04bf8f407 all remaining tests: eliminated usage of qttest_p4.prf
qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I02fe27b2c1800f929250fa8694ca2976c9661a12
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-10-25 08:42:23 +02:00
Rohan McGovern
6b29e881cd widgets: eliminated usage of qttest_p4.prf
qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I3c1d993d5682db913aadc267d98a638061f393d6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-10-25 08:42:23 +02:00
Rohan McGovern
55b6e6fdfb benchmarks: eliminated usage of qttest_p4.prf
qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I48ab0ee64d8348cada2e6c7b27c67b6bbc36280d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-10-25 08:42:23 +02:00
Sergio Ahumada
433f5dbbfb test: Leftover for split `qsqlquery' unit and benchmark test
Add new directory structure to benchmarks.pro file introduced by
3172631f0d .

Task-number: QTQAINFRA-353
Change-Id: I998530cd00bb1849f7a42816d61195f6a5bb4b92
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-25 08:42:23 +02:00
Jason McDonald
f6b05d5075 Remove QSKIPs from qgraphicslinearlayout test
If the test decides not to do some extra testing for certain styles, but
doesn't find any failures in what it has done so far, it should pass
rather than skipping.  Removing the QSKIPs also corrects the leakage of
the memory pointed to by "widget".

Change-Id: Ibd0f3f0605660c92e9bab2a3d1d9f31b52192575
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-25 08:42:23 +02:00
Jason McDonald
54318131a5 Remove QSKIPs from qgraphicsgridlayout test
If the test decides not to do some extra testing for certain styles, but
doesn't find any failures in what it has done so far, it should pass
rather than skipping.  Removing the QSKIPs also corrects the leakage of
the memory pointed to by "widget".

Change-Id: Id4cf7e8dc48f836d2c6dcde57dde87797a2fe036
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-25 08:42:23 +02:00
Jason McDonald
c7dd882b7a Improve qhostinfo autotest on HPUX 11i
Several test functions use IPv6 reverse lookups, which evidently don't
work on HPUX 11i, but only one of these tests was skipped on that
platform and the others presumably fail.

This commit also removes the commented-out test data and makes it easier
to put some useful test data back. QTBUG-22287 records the fact that no
real IPv6 hostnames are currently used in the reverseLookup test.

Change-Id: Iff1ed1b725492bcc28ca4cb5f8e2dc106887c0b4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-25 08:42:23 +02:00
Rohan McGovern
c0fb09465b gui: eliminated usage of qttest_p4.prf
qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I97046aa51f1b3fc100e2eb2fa115f1bf8ae6437d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-10-25 07:19:31 +02:00
Rohan McGovern
07102cebde corelib: eliminated usage of qttest_p4.prf
qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Change-Id: I7c1ffe9c8c294dbdc988e1582e580b1ed3f4593e
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-10-25 05:03:08 +02:00
Jason McDonald
39560b85d5 Don't call QSKIP/QVERIFY outside of test functions.
These macros should only be called inside a test function, otherwise
they cannot abort the test function correctly.  Solve this by making the
helper function return a boolean result (and output a warning on
failure to help with debugging) and verify the return value in each test
function that calls the helper.

Change-Id: I599673fda49051baf80a8c94b5d85a4d8c2cb406
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-25 03:39:23 +02:00
Jason McDonald
87514cb291 Update bug number in autotests.
Change-Id: I4b17736d86f8dc571090820a545107bb89cb493d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-25 03:39:15 +02:00
Shane Kearns
3736dcb65e Network - Add QHostAddress::isLoopback API.
The standard IPv4 loopback address is 127.0.0.1, however anything in
the 127.0.0.0/8 range is also a loopback address.

isLoopback returns true for any address that is in the IPv4 loopback
address range, or is the single IPv6 loopback address ::1

Task-number: QTBUG-22246
Change-Id: Ic39100e2e97a52db700e01b109998a1cfd4335e3
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
2011-10-24 13:56:41 +02:00
Jędrzej Nowacki
28c3d56d4f Extend QVariant benchmarks
Add new cases for custom types and QStringList.

Change-Id: I79f8d415be43774e6b2488e8a6a8028bf4a5fd45
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-24 11:04:04 +02:00
Sergio Ahumada
ccf27301e0 test: Split `qcontiguouscache' unit and benchmark tests
Moving three benchmark tests from 'tests/auto' to 'tests/benchmarks'.
Also removing 'qttest_p4' usage while we are at it.

- void asScrollingList();
- void cacheBenchmark();
- void contiguousCacheBenchmark();

were moved to 'tests/benchmarks/corelib/tools/qcontiguouscache'

Task-number: QTQAINFRA-353
Change-Id: Icbdd852f9c14c3df042d2e19abd42af6c645a3cb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-24 11:04:04 +02:00
Sergio Ahumada
31d6ac1386 tests: do not run benchmarks by default in 'make check'
`make check' is intended primarily for running functional tests.
For the most part, it does not make sense to run benchmarks in the same
test environment as the functional tests.

Change-Id: I33b2cf1e833fc6b1d0b3525018945148ba2d3492
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-24 09:36:58 +02:00
Jason McDonald
47fc4e0f8c Fix qcolumnview test for shadow builds.
Change-Id: I4a81d7c8504400d7fb4bb42fb93508ac28cfb990
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-24 05:00:44 +02:00
Jason McDonald
9d40e953d3 Fix qsidebar test for shadow builds.
Change-Id: I3b58a1c81881401edb2a768b2a9995b1e833e90c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-24 05:00:44 +02:00
Jason McDonald
89c415d686 Fix qfilesystemmodel test for shadow builds.
Change-Id: Ic9d174670f7411561bdfc0881b426a7ff1ab546d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-24 05:00:44 +02:00
Jason McDonald
4fbaf84b6d Fix QFileDialog test for shadow builds.
Using relative paths in #include is best avoided.

Change-Id: Iacaab7b4c402dfc96f944f21c634afa6e4a2a32a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-24 05:00:44 +02:00
Pekka Vuorela
29aa93387b Multiline editors not to limit anchor position inputMethodQuery
The queries were limited to current block, because that is the
available surrounding text. Input method side, however, cannot then
distinguish between anchor being really at start or end of the
surrounding text, or beyond it. Without the limitation there at least
is a way to know anchor is at unknown territory.

Change-Id: I388d33566388344ec816ea7d86662b7e36a3d7d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-10-24 03:31:10 +02:00
Sergio Ahumada
3172631f0d test: Split `qsqlquery' unit and benchmark test
Moving benchmark test from 'tests/auto' to 'tests/benchmarks'.
Also removing 'qttest_p4' usage while we are at it.

- void benchmark();

was moved to 'tests/benchmarks/sql/kernel/qsqlquery'

Task-number: QTQAINFRA-353
Change-Id: I241bb1a2fba1c1b5524c21e5941a6c5daf5a4a89
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2011-10-23 22:14:38 +02:00
David Faure
c7865e0fc6 Fix compilation with -fno-exceptions
Change-Id: I3dbe8be62d2fe94ed6f97fb565a9e417544c58f9
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
2011-10-23 15:29:35 +02:00
David Faure
dfa24768a3 Deprecate QDesktopServices::storageLocation/displayName
Which required porting the related unittests to qstandardpaths

Change-Id: I6eb63c46845f05cd29cc42b59872707526277c90
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
2011-10-23 15:28:25 +02:00
David Faure
03fd37cdf4 Add the missing unittest
Change-Id: I2384d9de7b9ef409db521087670070bd5afc85ff
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
2011-10-23 00:57:10 +02:00
David Faure
fa0ad643a6 Check QFileInfo::isExecutable for symlinks, works as intended.
Change-Id: I35acce7ba0e111f651864b9d16abf1bac1923f22
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
2011-10-23 00:56:45 +02:00
David Faure
8f3032dfe0 QStandardPaths: add Config and GenericData, add methods
New methods: standardLocations, locate, locateAll.

Change-Id: I60bc90f8df53727a72c4b1839ea4d1d88a204e29
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
2011-10-23 00:56:39 +02:00
João Abecasis
fd61059d35 Fix QTemporaryFile regressions and new found issues
With this change, the file template is always processed in original
QString format. Trying to generate native paths before adding a missing
placeholder mask could change the meaning of templates, such as "." and
"..", which are now tested to mean "..XXXXXX" and "...XXXXXX",
respectively.

After ensuring the template includes a placeholder mask, the path is
converted to a native *absolute* file path and the mask is sought for
again. On Windows, native paths were already absolute. On Symbian, we'd
need at least a clean path, as "." and ",," are not natively understood.

There is a requirement that the placeholder mask /XXXXXX+/ makes it
through this conversion unaltered, which relaxes prior requirements on
*nix platforms. On Windows and Symbian the conversion is under Qt's
control and not user-configurable.

Reviewed-by: Shane Kearns
(cherry picked from commit 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6)

Conflicts:

	tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp

Change-Id: Iac823881c865adf0931dc4f429c6c1ef135eeb56
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:20:42 +02:00
João Abecasis
f4f729cb7b Atomic implementation of create file and obtain handle for Win/Symbian
Besides generating a unique name, createFileFromTemplate now also
acquires a file handle on all platforms. The file engine's native handle
is passed by reference and modified in place.

This fixes a long standing security issue on Windows.

On Windows and Symbian platforms we directly use the "native" file path
when processing the template and generating the unique name. Since the
native encoding is known, conversions at this point are safe.

Errors other than "file exists" are propagated to Q(Temporary)File,
and result in a failure in open(). The changes also unify error handling
and should give consistent behaviour across all platforms.

Worthy of note, there's a change in behaviour on Windows and Symbian:
fileNames returned by QTemporaryFile on Windows and Symbian are always
absolute after open has been called. This has to do with how
QFileSystemEntry::nativeFilePath works on these platforms. (Test was
updated to reflect change in behaviour.)

Reviewed-by: Gareth Stockwell
Reviewed-by: Shane Kearns
(cherry picked from commit ff9b69838ec146aeb43d4af8a03043f9c5f0454d)

Conflicts:

	tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp

Change-Id: Ibc9affb321ea4f4b193efc1f7336c9770b43d8df
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-21 22:20:18 +02:00
Jason McDonald
27f9f136f7 Remove SkipMode parameter from QSKIP calls.
The previous commit removed SkipMode from the testlib APi.  This commit
removes the parameter from all calls to QSKIP.

Task-number: QTBUG-21851, QTBUG-21652
Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-21 01:20:29 +02:00
Jason McDonald
016cd01846 Remove QTest::SkipMode from qtestlib API.
When the SkipAll mode is used, tests only report a SKIP for the first
line of test data and subsequent lines are not reported at all.  This
behaviour makes it impossible for anything post-processing test results
to accurately report test pass- and run- rates because they cannot see
how many lines of test data were skipped.

This commit removes SkipMode.  QSKIPs in regular test functions and data
functions are treated the same as SkipSingle, so that every skipped line
of local or global test data is reported in the test log.  QSKIPs
elsewhere are treated the same as SkipAll -- skipping in init() causes
the next test function to be skipped entirely, and skipping in
initTestCase() or initTestCase_data() causes all test functions to be
skipped.

This commit only changes qtestlib and the selftests. A further commit
will change the autotests to remove the SkipMode parameter from QSKIP
calls.

Note that the change in expected output for the globaldata selftest is
deliberate, as the QSKIP in the skipLocal test function has effectively
changed from SkipAll to SkipSingle.

Task-number: QTBUG-21851, QTBUG-21652
Change-Id: I7b1c53fe7ca9dde032810b789d967e2a402bbe5d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
2011-10-21 01:20:29 +02:00
Jo Asplin
9f1aa866bd Moved tests into integrationtests/ and widgets/
Task-number: QTBUG-19013

Change-Id: Ibb776f5967c0645ce6d22ef7afdc40657c575461
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
2011-10-20 19:45:41 +02:00
Richard Moore
78d02e93ac Add the ability to enable various SSL bug workarounds.
There are lots of buggy SSL servers around and to connect to them you
need to disable various features. This commit adds the ability to
disable the SSL ticket extension, the ability to disable the insertion
of empty fragments, and the ability to disable compression.

Task-number: QTBUG-21906

Change-Id: I3e1d0347a46e9030b889bbf15b2aad19b8513b73
Merge-request: 68
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-10-20 18:20:12 +02:00
Shane Kearns
0e7cecb861 Fix tst_qsocketnotifier
Removed the bogusFds test, as it is only run on symbian in 4.8
Forward ported the posixSockets fix from 4.8

Task-number: QTBUG-20892
Change-Id: I8a8c67e12eae402724bbb07fe37e7ea1770aaeee
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-10-20 16:49:24 +02:00
Kent Hansen
ce5adc7684 Revert "Update V8"
This reverts commit 1c4a5fcab76d1b769a4c0369d40dd0dd7c0e7495

Several of the qtdeclarative tests and examples are dying randomly with messages like this:
> 
> #
> # Fatal error in ../3rdparty/v8/src/objects-inl.h, line 2169
> # CHECK(object->IsJSFunction()) failed
> #
> 
> 
> ==== Stack trace ============================================
> 
> 
> ==== Details ================================================
> 
> ==== Key         ============================================
> 
> =====================
> 
> Aborted (core dumped)

Change-Id: Iebaa2497a6f6ef616ef4c3576c217d2a8a2c1ea5
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-10-20 13:30:26 +02:00
Thiago Macieira
c7f8213bc5 Move the non-atomic and implicit functions from QBasicAtomicXXX
Now, users of QBasicAtomicInt and QBasicAtomicPointer must be sure to
use .load() and .store() to access the values.

Change-Id: I6b48ed175618baf387dd38d821bd50e6e93c082e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-10-20 10:05:49 +02:00
Liang Qi
b1b843dcf5 Update keyToValue and keysToValue in QMetaEnum
Add a ok return value for whether found or not.

Task-number: QTBUG-21672
Reviewed-by: Olivier Goffart
Change-Id: Ic0ea7455dccf1ac91705bcc1479444eb4091ded3
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-10-19 22:27:09 +02:00
Aaron Kennedy
7dc5973bf1 Update V8
Change-Id: I7a9da7dbb2116a441788407d60ed10155cded941
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-10-19 20:48:25 +02:00
Frederik Gladhorn
4dc25c1f29 Refactor QAccessibleActionInterface.
Some refinements done by Jan-Arve Sæther.

Change-Id: I99195b3c7273316cfa9c46e451924bbcfddd11a9
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-19 19:25:42 +02:00
Jędrzej Nowacki
663cd17718 Introduce Q_STATIC_ASSERT
Example of message of failed assert (gcc 4.6, file tst_qglobal.cpp:300):
tst_qglobal.cpp:300:92: error: invalid application of ‘sizeof’
to incomplete type ‘QStaticAssertFailure<false>’

Change-Id: Ic1798094f718eaad388d754034115aafbbb6bd5e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-19 19:25:37 +02:00
Kent Hansen
f8b89fa507 Add benchmarks for QMetaType::construct()
Change-Id: Ia5883c5712e5d634b0e62189b639209eb3d5cd93
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-10-19 10:25:31 +02:00
Kent Hansen
9e92ecde74 Provide API for "placement new" construction of meta-types
By making it possible to specify the place in memory where a
type should be constructed, any meta-type can be allocated on
the stack, for example. In the QML/JS QObject binding, this
makes it possible to call slots and access properties from
JavaScript without having to perform any mallocs (e.g. due to
QVariant creation) in the C++ <--> JS value conversion, in
the best case.

In addition to QMetaType::construct() and QMetaType::destruct(),
this change introduces QMetaType::typeSize(), which returns the
size of a type in bytes. This can be used to prepare a suitable
buffer for constructing a type using construct().

Benchmarks indicate that in-place construction is 2-5x faster
than normal construction for core and GUI types on linux-g++.

Note that there is already a QMetaType::construct() function
in Qt 4, which has been renamed to QMetaType::create() in Qt 5.
In order to avoid existing usages of construct() in user code
to call the Qt 5 construct() (when they really meant to call
create()), the third argument ("copy") of construct() is made
mandatory. Hence, calls to QMetaType::construct() written for
Qt 4 will cause a compile error when compiled with Qt 5, and
the user must adapt his code.

Task-number: QTBUG-12574
Change-Id: I836f06f6ee1c1c3edbd199a03424c78c942bdd3e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-10-19 10:25:28 +02:00
Jason McDonald
47f016f519 Sanitize paths in selftest data.
Use a standard path for filenames that appear in the selftest's expected
test data.  This will make future patches smaller.

Change-Id: I04b2e739d261f80d20b834e5b33c5b6e88d26379
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-19 07:24:40 +02:00
Jason McDonald
af5f17e214 Remove skipglobal testlib selftest.
This test duplicates the skipinitdata selftest and has slightly less
informative output.

Change-Id: Ifd40e3ef8030059ec8fa0089ce5b2a994624abeb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-19 07:24:26 +02:00
Jason McDonald
8f02339e76 Remove DEPENDS_ON from qtestlib API.
The DEPENDS_ON macro didn't do anything and has misled many users to
think that they can write test functions that depend on other test
functions.

Task-number: QTBUG-21851
Change-Id: Ibe65b2d5d88bb81b6a0ebbe0b220f7d409a1446c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-19 07:24:13 +02:00
Jason McDonald
ae1810658b Move QTRY_VERIFY/QTRY_COMPARE into testlib.
These functions have lived in tests/shared/util.h for a long time, but
they really belong in qtestlib.

Change-Id: I60d569d002dea220b51563931d8b7aa77a20b98b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-19 07:23:44 +02:00
Jason McDonald
604619fc38 Prefer QSKIP to QTEST_NOOP_MAIN.
Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that this test won't be testing anything until it gets fixed
for Qt5.

Change-Id: I4fa73883f58d8d4a533a7c21ecd4dd5b3c55b174
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-19 05:56:55 +02:00
Jason McDonald
afb80f0cd9 Prefer QSKIP to QTEST_NOOP_MAIN.
Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that this test isn't testing anything when not built for X11.

Change-Id: I9e9ef8fe738c06eb86f2ce398f6a515bf17e220a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-19 03:05:31 +02:00
Jason McDonald
d884f24fe1 Prefer QSKIP to QTEST_NOOP_MAIN.
There is no way for a .pro file to know if QProcess is in the Qt build,
so the QProcess autotest cannot be omitted from the build if QProcess is
not available.  Because of this limitation, the test was using
QTEST_NOOP_MAIN when QProcess was not available, making the test appear
to pass.  This commit changes QTEST_NOOP_MAIN to QSKIP, so that the user
receives a clear indication that the test isn't testing anything when
QProcess is not available.

Change-Id: I79f667b17ff98dfc47eb61fb977365abef8883fb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-19 01:38:36 +02:00
Jason McDonald
730382a968 Prefer QSKIP to QTEST_NOOP_MAIN.
Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that these tests aren't testing anything when the required
defines are not defined.

Change-Id: I977e24205a1bb7787ecddbdb1ebbeda1f2ded321
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-18 03:10:24 +02:00
Jason McDonald
f6e3d9d695 Prefer QSKIP to QTEST_NOOP_MAIN.
Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that these tests aren't testing anything when the required
defines are not defined.

Change-Id: I8508f50c6264fafa836090c5d6ffa6ce02dda102
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-18 03:09:44 +02:00
Rohan McGovern
be9939ac89 Reduce the runtime of tst_selftests
The addition of testing for multiple loggers greatly increased the total
runtime of this test, in fact making it the slowest testcase in Qt.
Fortunately this is only due to a couple of slow subtests whose behavior
is unlikely to be affected by the loggers.  Change it to run these slow
subtests just for a couple of loggers, instead of all the combinations.

Change-Id: Ie90f6c0ca29470ed6a7c4e2e185f852602a2d162
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-10-18 00:56:54 +02:00
Jason McDonald
19168ca21f Prefer QSKIP to QTEST_NOOP_MAIN.
There is no way for a .pro file to know if exceptions are supported in
the Qt build, so these tests cannot be omitted from the build if
exceptions are not supported. Because of this limitation, these tests
were using QTEST_NOOP_MAIN when exceptions were not available, making
the tests appear to pass.  This commit changes QTEST_NOOP_MAIN to QSKIP,
so that the user receives a clear indication that the test isn't testing
anything when exceptions are not available.

Change-Id: I2facf08ba69e6f985e2da50dd36ad2658246b22e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 10:30:04 +02:00
Jason McDonald
83611473ac Remove qcopchannel autotest.
The QCopChannel class was removed during Qt5 refactoring.

Change-Id: I62914eca1db65c680d90233ce9dad5d891890c4a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 07:59:29 +02:00
Jason McDonald
25a62d7d6b Don't build empty tests.
The qgraphicswidget and qgraphicsproxywidget tests are empty if Qt is
built without the cleanlooks style, so don't build the tests in that
case.

Change-Id: I2308e723a9b0abcc3e95b32a562fcb02afe0444d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 03:30:55 +02:00
Jason McDonald
a40ebefcd3 Only build exceptionsafety_objects test if useful
The test appears to be applicable only if building with g++, and even
then the test is broken.

Change-Id: I9eefb13325a10ec295a59c2bd1111e3c324ff94f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 03:30:55 +02:00
Jason McDonald
73d2970acd Remove Mac accessibility autotest.
This test was empty, the logic having been recently removed because it
only applied to the Carbon UI, which will not be supported by Qt5.

Change-Id: I2b5d6aba6be4a51eadbac3ca9d19d1a68c4fc1ab
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 03:30:55 +02:00
Jason McDonald
33af6dfa7d Tidy qwizard autotest .pro file
Remove commented out sources and redundant Symbian-specific directive.

Change-Id: I7637b4dfc186eeac7f314faf13aa97e8ef1990de
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 03:30:55 +02:00
Jason McDonald
43dd58eba3 Remove QtMD5 autotest.
This test is only valid with obsolete Qt Solutions packages.  Any Qt
Solutions that are still of value need to be rewritten as Qt5 addons and
will be delivered with their own unit tests.

Change-Id: I099ef816655cc7de13715f5a4e5f4a06099df2d5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 03:30:55 +02:00
Jason McDonald
a1121b977e Make test .pro files more consistent.
Make the parent .pro files follow the pattern of listing all tests in
one place and then removing inapplicable tests as needed.

Change-Id: Ide1ae98d50dd63cd8c1b4d6fd53135cdff801bc3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 03:30:55 +02:00
Jason McDonald
fe48366b48 Don't build empty qwineventnotifier test.
This test is only useful on Windows, so avoid building it elsewhere
rather than building an empty test.

Change-Id: I01d91266bcb2dd242e02e70741ad5b81a13c33f0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 03:30:55 +02:00
Jason McDonald
55f1560605 Remove redundant logic from tools autotests.
The tools tests are not built for cross-compiled Qt builds, so the logic
to make those tests empty when cross-compiled is redundant.

Change-Id: Ia3a3a680d7ade2cee78aa633b41c9ef5be6f2f15
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 03:30:55 +02:00
Jason McDonald
9e31f88d7a Don't build empty qaccessibility test on WinCE.
Rather than building the test with all the logic #ifdef'd out, just
avoid building the test at all.

Change-Id: I394f48b2dacb40325d03de719096da36fcb7312a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 03:30:55 +02:00
Jason McDonald
e33713f03a Only build Mac-specific tests on Mac.
All but one of these tests was already excluded from the build on
non-Mac platforms, but still had #ifdef's to make the test empty if
compiled on a non-Mac platform.

Change-Id: I1a3677c1cdb7bd467cf4317ed4cfbac89e934e76
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-17 03:30:55 +02:00
Kent Hansen
d5aa4355f1 Add autotest for QMetaType creation of gui types
This test verifies that all gui types with built-in QMetaType
support can be created, either using the default constructor
or the copy constructor.

Change-Id: Ibb1c5aab8571b598638c74112471d6869516a202
Reviewed-on: http://codereview.qt-project.org/6344
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-10-14 14:46:35 +02:00
Kent Hansen
45358303d1 Improve the QMetaType::create() autotest coverage
It only tested creating a copy of QSize.
This change adds testing of all core types, both
copy and non-copy creation.

Change-Id: If2b8fb45718c4a976dd8b883b332878f7fb0da6f
Reviewed-on: http://codereview.qt-project.org/6343
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-10-14 14:46:35 +02:00
Jędrzej Nowacki
3bdce9a8ba Small re-factor of QVariant autotest.
Enrich playWithVaraint template by a macro that returns correct line
number in case of failure.

Change-Id: I7684169852481a6905b71e4420135e7e3f298b12
Reviewed-on: http://codereview.qt-project.org/6570
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-14 13:13:01 +02:00
Shane Kearns
f43ca8d4e7 fix tst_QNetworkReply::headFromHttp failure
The reference file has suffered whitespace changes during the cherry
pick from 4.8. Refetched from the test server.

Change-Id: I03a0b7a66cf6743de3391905422b2f4cdcd86dcf
Reviewed-on: http://codereview.qt-project.org/6454
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-10-12 18:01:19 +02:00
Jason McDonald
8ad18813fb Avoid building empty, inapplicable QWS tests.
It is better to avoid building a test when we know that it is not
applicable, rather than building an empty test that appears to pass.
Note that some of the tests were already excluded by
tests/auto/other.pro, but still had the preprocessor directives to make
an empty test.

Change-Id: I71b75c37a05f6e20dbef43d82f72b29b35ef496a
Reviewed-on: http://codereview.qt-project.org/6410
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-12 18:01:19 +02:00
Jason McDonald
7c64ab4966 Exclude qtconcurrent tests via .pro files.
If Qt is built without QtConcurrent, the relevant autotests should be
excluded from the build, rather than building empty tests that appear
to pass and thus produce confusing test results.

Change-Id: I43bafcb0ffa42e8981bec4e27bf6a23a28d86df9
Reviewed-on: http://codereview.qt-project.org/6395
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-12 18:01:19 +02:00
Shane Kearns
450962be95 Fix platformsocketengine test failures
The platformsocketengine autotest uses the native socket engine directly
rather than through QAbstractSocket. The bind tests were failing because
the autotest was creating a socket with IPv4 (AF_INET) and then binding
with QHostAddress::Any (AF_INET6).
A linux kernel update caused this to start failing on the test machines.

Change-Id: Iea62f3d56dbfb35fcb952dcf00313578eb2bd764
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-10-12 16:17:45 +02:00
Joona Petrell
e941b37fcc Move input panel visibility ownership from QInputPanel to QPlatformInputContext
Now QInputPanel::visible() can be set true even when platform doesn't provide
a virtual keyboard. Like keyboard geometry, visibility should be dictated by
the platform plugin and not QInputPanel, whose role is more like that of a mediator.
QInputPanel::show() and ::hide() calls should be treated as requests that may fail.
Changed the QInputPanel's visible property to read-only as a setter that may
fail is not really a setter, show() and hide() should be used instead.

Enabling the new functionality cannot be activated immediatelly without breaking
existing keyboards, added a temporary function handlesInputPanelVisibility that
handovers the responsiblity of updating input panel visibility to QInputContextPlatform
only once QInputContextPlatform says that it is able to handle it.

Change-Id: Ideecaf7225cc3971f33a0ac976bd92cf7767475b
Reviewed-on: http://codereview.qt-project.org/6429
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-10-11 16:03:25 +02:00
Kent Hansen
e5ce564b1d Rename QMetaType::construct() to create()
create() is symmetric with destroy().

Also rename the internal methods and fields to be
consistent (qDeleteHelper already had the "right"
name, though!).

This change will allow us to use construct() and
destruct() for something else: Placement new-style
allocation (QTBUG-12574).

The old construct() is still kept for now, until
the other repositories have been updated to use
create().

Change-Id: Iceb184af6cffcb0a634359cfc3516c718ba0c2f5
Reviewed-on: http://codereview.qt-project.org/6342
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-10-11 16:01:45 +02:00
Lorn Potter
0cb7a66989 add qmetaobjectbuilder to qtbase.
Use the QMetaObjectBuilder code from declarative and add it to libQtCore.

    Consolidating various QMetaObjectBuilder implimentations to avoid
    code duplications in those modules.

    This is currently still a private API only.

Change-Id: Ie363b4fd769c41efbb3caa7fb1d6f77af13c3c9c
Reviewed-on: http://codereview.qt-project.org/6287
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
2011-10-11 07:02:14 +02:00
Jason McDonald
a165cbb1f0 Remove redundant logic from dbus test .pro files.
There was logic in .pro files for the dbus tests to omit the body of
each test if dbus was not available in the Qt build.  This was all
redundant however, because tests/auto/auto.pro already excluded all dbus
tests if dbus was not available in the Qt build.

Change-Id: Iaea06e38622e5227daec4d2e08106c2da3fb4013
Reviewed-on: http://codereview.qt-project.org/6372
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-11 07:02:14 +02:00
Morten Sorvig
9fa6e8f627 Clean-up a macro for Cocoa
Remove the usage of Q_MAC_USE_COCOA and Carbon code paths.

Change-Id: Ib569ad8c6d9ffe258f454b3c3b06e95294a10112
Reviewed-on: http://codereview.qt-project.org/5100
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Sanity-Review: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-10-10 07:47:58 +02:00
Samuel Rødal
c66b7cf55b Added Orientation API to QScreen and QWindow.
QScreen now has a primary and current orientation, and a QWindow can set
its orientation as well. The current screen orientation is just a hint
to the application.

Change-Id: I4635982cfac2d16634d4edd5c6ab78e9d0ac55a4
Reviewed-on: http://codereview.qt-project.org/5988
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-10-07 22:23:30 +02:00
Jason McDonald
569d7a4d2e Improve QMenu test coverage for Mac and WinCE.
Add a couple of previously excluded lines of code that should work for
all platforms.

Change-Id: I5f0b5365060a91cb708a3143b28f7de703fc419e
Reviewed-on: http://codereview.qt-project.org/6196
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 06:39:42 +02:00
Jason McDonald
413b40eaf7 Remove redundant qWarning's.
The removed warnings just repeat information that is already in the
QSKIP's that immediately follow the warnings.

Change-Id: Id13158487e8075aab8a8f48955303edde3f4af63
Reviewed-on: http://codereview.qt-project.org/6194
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 06:39:30 +02:00
Jason McDonald
435d21383c Remove redundant define.
Q_CHECK_PAINTEVENTS was guaranteed to be defined prior to the code that
was conditional on it being undefined.

Change-Id: I8b48a2c6bff997de7d0e3f640203308718dd865b
Reviewed-on: http://codereview.qt-project.org/6193
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 06:39:20 +02:00
Jason McDonald
92acab50d2 Comment out test that is always skipped.
Change-Id: I0af7a5c6708d09ce9b63b7c177d31e0631da43cd
Reviewed-on: http://codereview.qt-project.org/6192
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 06:39:09 +02:00
Jason McDonald
931978a126 Remove dead code and empty test functions.
Change-Id: Iaf8ac514d814c9321f8dcd09b2bf3331f87154e6
Reviewed-on: http://codereview.qt-project.org/6191
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 06:38:59 +02:00
Jason McDonald
bf7d30bf1f Fail test in preference to calling qFatal.
Calling qFatal may result in test output not being well-formed.

Change-Id: Ia16bade4d3311485c6ba4dd23d5624d18b192b71
Reviewed-on: http://codereview.qt-project.org/6190
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 04:30:30 +02:00
Jason McDonald
b4de0b1721 No need to return after QSKIP.
QSKIP already causes the test function that calls it to return, so the
returns removed by this commit were unreachable.

Change-Id: I1fa2f3a3271927d8a600b02d8b31bd81db9146b1
Reviewed-on: http://codereview.qt-project.org/6188
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 04:30:30 +02:00
Jason McDonald
924d810dbd Avoid using QSKIP in lieu of compile-time checks
QSKIP is intended to be used to skip test functions that are found at
run-time to be inapplicable or unsafe.  If a test function can be
determined to be inapplicable at compile-time, the entire test function
should be omitted instead of replacing the body of the test function
with a QSKIP, which only serves to slow down test runs and to inflate
test run-rates with empty, inapplicable tests.

Task-number: QTQAINFRA-278

Change-Id: I95feba3edbfa092c0ef4d85bb8c6877bd6be698e
Reviewed-on: http://codereview.qt-project.org/6128
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 04:30:30 +02:00
Jason McDonald
13251dcaea Remove obsolete test functions.
Commit 2cbeb6c08cb7c79d6126f75c2cbc470679d671e1 made these test
functions obsolete.

Change-Id: I89a379d7228584a83e9d7674060081f4201f561c
Reviewed-on: http://codereview.qt-project.org/6113
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 04:30:30 +02:00
Jason McDonald
8aaff67510 Eliminate needless QSKIPs in qaccessibility test.
On Unix the table1 interface was replaced by the table2 interface, while
table1 is still used on other platforms.  This commit changes the test
so that only the applicable test functions are built and run, where
previously both sets of tests were built and one set would always skip.

Change-Id: I5a785fb88fcbf4e5896e1fdb80c7c0a659597e34
Reviewed-on: http://codereview.qt-project.org/6097
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 04:30:30 +02:00
Pierre Rossi
614b9efcf5 Fix QFont::defaultFamily() in the new QPA world.
This is so that the results of LayoutTests in WebKit are
more in line with what things were like in Qt 4.8.

Change-Id: I25962e03bd8e0316cb303c0d94c25ac4e73ea9a8
Reviewed-on: http://codereview.qt-project.org/6162
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-10-07 00:43:26 +02:00
Konstantin Ritt
2bf2bb3daf fix QChar::isSpace() to handle codepoint U+0085
according to the Unicode specs, code point U+0085 should be treated
like a white space character (an exceptional Cc one)

Change-Id: Ib17ae0c4d3cdafe667cafa38b645138ef24c238c
Merge-request: 32
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-on: http://codereview.qt-project.org/6158
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-10-06 19:24:26 +02:00
Shane Kearns
0b67ad9db2 Merge fixes for QDir::operator==
There were two fixes in 4.8 which each fixed a part of the problem.
Comparing canonical paths is more correct, but is only possible where
both directories exist. If neither directory exists, then compare
absolute paths instead.
Changed a regression test, because /tmp is a symbolic link on MacOS.
I.E. "/tmp/.." is canonically "/private" and not "/" as expected.

Task-Number: QTBUG-20495
Reviewed-By: joao
(cherry-picked from ad35d25e78c8252a72108a4ba931934047c4707e)

Change-Id: Ia4986e8337f0e512e1a3398a5a4dd36e62680b9c
Reviewed-on: http://codereview.qt-project.org/5813
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-10-06 17:32:57 +02:00
Shane Kearns
cb2e618127 Create auto test for http HEAD request
This is in order to have a regression test for QT-5304.
However the test is also checking basic functionality of head
requests too.

Task-Number: QT-5304
Change-Id: I0d98bd1f1125ffd49d9f3c859a51b2aaee95379a
Reviewed-By: Martin Petersson
Reviewed-on: http://codereview.qt-project.org/6033
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-10-06 11:24:20 +02:00
João Abecasis
d3ef642614 Fix QDir::operator==(const QDir &) const
We can't rely on absolute paths when comparing directories for equality
as these don't take into account symbolic links and may also bypass ../
and ./ simplification.

Instead, canonical paths must be computed and can then be compared
according to the case sensitivity rules for the platform or file engine,
as is done in QFileInfo.

Task-number: QTBUG-20495
Reviewed-by: Prasanth Ullattil
(cherry-picked from dcee6e1371d899eb79717b8e3f3eec08b765db82)

Change-Id: Ib5f2a6ee11311c55782ea5dd0e9c3b45f9231686
Reviewed-on: http://codereview.qt-project.org/5812
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-10-06 11:24:20 +02:00
Jason McDonald
edd377245a Fix unreachable QSKIP in QMenu autotest
The QSKIP is only reachable on Mac, so only compile it for Mac.

Change-Id: I268e87829e01755051f81cdaf856d936b04b3d49
Reviewed-on: http://codereview.qt-project.org/6091
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 07:36:54 +02:00
Jason McDonald
18488067be Improve formatting of QMenu autotest
Remove literal tabs and empty functions.  Bring layout closer to Qt
coding guidelines.

Change-Id: I4f1b214c69ee9bfe46c3275eb224e38df15e8744
Reviewed-on: http://codereview.qt-project.org/6090
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 07:36:46 +02:00
Jason McDonald
ef5fa1b668 Tidy qsqldatabase autotest
Remove unused macro and remove redundant returns after calls to QSKIP.

Change-Id: Ie333801cbec6c3123931f2fedbcd8902cab69a2e
Reviewed-on: http://codereview.qt-project.org/6021
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 07:36:34 +02:00
Jason McDonald
cd62bacc89 Remove code to selectively run test functions.
QTestLib already makes a superior version of this functionality
available to all tests, without the need to recompile.  Each qtestlib
test program can be passed, via the command line, a list of test
functions and test data tags to be executed instead of executing all
test functions.

Change-Id: I1b54fc70a0c58a17209817afabfb953b5748dac4
Reviewed-on: http://codereview.qt-project.org/6015
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 05:28:32 +02:00
Jason McDonald
338d3f1197 Avoid QSKIP in lieu of compile-time checks.
Change compiler autotest to omit inapplicable functions at compile-time
in preference to skipping at run-time.

Change-Id: I8a221cadbb7b59d926754862332c0665673b8a56
Reviewed-on: http://codereview.qt-project.org/6011
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 05:28:32 +02:00
Jason McDonald
a55034062b Avoid QSKIP in lieu of compile-time check.
Omit focusColors test function at compile-time in preference to
skipping at run-time.  Also removed commented out code.

Change-Id: Ib8955656f5a43b30df95b4c9865e52902dbd6b1e
Reviewed-on: http://codereview.qt-project.org/6010
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 05:28:32 +02:00
Jason McDonald
7232bc0e1c Tidy QActionGroup autotest.
Remove empty constructor/destructor.  Remove dropDownDeleted test
function which has been entirely skipped since before Qt 4.0, is
obviously incomplete (it attempts to use a QComboBox that does not
exist) and provides no statement of intention that might allow the
incompleteness to be addressed.

Change-Id: I4975b6d5a5dde1e58dab1dd393be92eddeb4c9f8
Reviewed-on: http://codereview.qt-project.org/6009
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 05:28:32 +02:00
Jason McDonald
0a663b92ff Don't build qwindowsurface autotest on Mac OS.
The test was a no-op on Mac OS. It's better to avoid building or running
it on Mac OS, rather than spending time compiling and running a test
that does nothing on that platform.

Change-Id: I4aa579036788e404f8a6a8f1a80acd32338fb3cd
Reviewed-on: http://codereview.qt-project.org/5958
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 05:28:32 +02:00
Frederik Gladhorn
21acdf645f Accessible: remove calls with virtual int children in test.
Change-Id: I08ba2fab8ed17b75b971c86cb085af4d3828ec8a
Reviewed-on: http://codereview.qt-project.org/6025
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-06 01:28:21 +02:00
Frederik Gladhorn
887eec6781 Clean up accessible spin box test.
Change-Id: Ic56f5a99ee57a23d43a81d66af82324ecba8964c
Reviewed-on: http://codereview.qt-project.org/5994
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-06 01:28:15 +02:00
Frederik Gladhorn
b4ea7762c5 Remove empty test function.
Change-Id: I02b688a25ab77a2df2da8beb57eb94a7432e537d
Reviewed-on: http://codereview.qt-project.org/5995
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-06 01:28:15 +02:00
Frederik Gladhorn
74448afd03 Use child/parent function in QAccessibleWidget and test.
This also uncovered a missing implementation of child for
dock widgets.

Change-Id: Iac4c5a51d4626769af11b277a9a345e1e31dc490
Reviewed-on: http://codereview.qt-project.org/5987
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-06 01:28:12 +02:00
Jason McDonald
454f6f43dc Remove obsolete QMatrix test function.
The operator tested by this function (QMatrix * QRect) has not existed
since Qt 2.x.

Change-Id: Id09154de2bdda70c0fe342fe78b82709953e2b56
Reviewed-on: http://codereview.qt-project.org/5965
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 01:28:04 +02:00
Jason McDonald
2ca3373376 Don't build qitemview autotest on IRIX.
The test was being skipped one test function at a time on IRIX.  It's
better to avoid building or running it, rather than spending time
running a test that does nothing on that platform.

This commit also turns a silent skip on other platforms into an explicit
QSKIP to make it more obvious that there's an unfixed TODO there.

Change-Id: I7cae4f0f2eaebf5977a781b2ce15d1e71ef13b36
Reviewed-on: http://codereview.qt-project.org/5957
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 01:28:04 +02:00
Jason McDonald
2aa9cb5957 Removed disabled test data in QDir autotest.
The unprintablenames test was designed to prevent an old failure in
QDir from returning, but the test can't be run reliably on some
file-systems and certainly isn't going to achieve its goal when it's
commented out.

Change-Id: Ib4cb965d59c291ab2436130b87e865ac21b9b483
Reviewed-on: http://codereview.qt-project.org/5956
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 01:28:04 +02:00
Jason McDonald
c6ad1b0e1d Remove last remnants of Maemo 5 from autotests
Change-Id: I69bc9a3fc5ec4f7f9b927919ca7627a8a1e61700
Reviewed-on: http://codereview.qt-project.org/5951
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 01:28:01 +02:00
Jason McDonald
1fad83bac6 Remove last remnants of symbian in autotests.
Change-Id: I91489614653cfe4bcf16b723976e33531402a464
Reviewed-on: http://codereview.qt-project.org/5948
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-06 01:27:58 +02:00
Kent Hansen
5049cff496 Add missing Q_OBJECT macro to GoToStateTransition
The missing macro caused qFindChild() to return any
QAbstractTransition.

Task-number: QTBUG-21813
Change-Id: I80507aa86c8c32d7fa59a1b5ae551043f5f90315
Reviewed-on: http://codereview.qt-project.org/6044
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-10-05 15:00:38 +02:00
Samuel Rødal
11070a090a Added QWindow::isActive() and focus in / out events.
Renamed QGuiApplication::activeWindow() to
QGuiApplication::focusWindow(), implemented QWindow::isActive() as a
style hint, and added focus in / out events.

Change-Id: I71866e76c5a817def3e17bcc20a4fc32081a0e7a
Reviewed-on: http://codereview.qt-project.org/5811
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-10-05 12:49:29 +02:00
Jason McDonald
253497b744 Avoid using QSKIP in lieu of compile-time checks
QSKIP is intended to be used to skip test functions that are found at
run-time to be inapplicable or unsafe.  If a test function can be
determined to be inapplicable at compile-time, the entire test function
should be omitted instead of replacing the body of the test function
with a QSKIP, which only serves to slow down test runs and to inflate
test run-rates with empty, inapplicable tests.

Task-number: QTQAINFRA-278

Change-Id: I582732e3dd657df834f9a98fd52d7ee368f2f29b
Reviewed-on: http://codereview.qt-project.org/5946
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-05 06:15:00 +02:00
Jason McDonald
3f88da82b1 Remove Symbian-only test function.
Change-Id: I817c234a6104a072f131c17e9492c68d79ca5f8d
Reviewed-on: http://codereview.qt-project.org/5943
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-05 03:05:33 +02:00
Jason McDonald
7cfad460c5 Avoid using QSKIP in lieu of compile-time checks
QSKIP is intended to be used to skip test functions that are found at
run-time to be inapplicable or unsafe.  If a test function can be
determined to be inapplicable at compile-time, the entire test function
should be omitted instead of replacing the body of the test function
with a QSKIP, which only serves to slow down test runs and to inflate
test run-rates with empty, inapplicable tests.

Task-number: QTQAINFRA-278

Change-Id: Ib2025339422749cf216e87ac414a3056250bf8f9
Reviewed-on: http://codereview.qt-project.org/5942
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-05 03:04:31 +02:00
Bradley T. Hughes
992a37234c Don't crash by modifying read-only shared_null
Functions that modify the d-pointer must detach or otherwise take
measures to not modify the const, read-only shared_null.

The setSharable(bool) function takes care to detach when setting
sharable to false, but should avoid setting the sharable data member
unless d is not the shared null.

Similarly, QMap<Key, T>::setInsertInOrder() needs to detach if it is
shared with the shared_null (the logic has been updated to be the same
as setSharable()).

Change-Id: Ida5cb9818b86695f1b9f0264418b955c56424898
Reviewed-on: http://codereview.qt-project.org/5929
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-04 11:21:25 +02:00
Jason McDonald
9d2ff58f36 Avoid using QSKIP in lieu of compile-time checks
QSKIP is intended to be used to skip test functions that are found at
run-time to be inapplicable or unsafe.  If a test function can be
determined to be inapplicable at compile-time, the entire test function
should be omitted instead of replacing the body of the test function
with a QSKIP, which only serves to slow down test runs and to inflate
test run-rates with empty, inapplicable tests.

Task-number: QTQAINFRA-278

Change-Id: I21664d8d92b27c26c64789fc08d0ec7b8988456a
Reviewed-on: http://codereview.qt-project.org/5941
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-04 06:01:38 +02:00
Jo Asplin
fe90725ced Added bug ref in insignificant_test comment
Task-number: QTBUG-21814

Change-Id: I56907f2a1fb5555d338b6f1f695b741e1590e5d2
Reviewed-on: http://codereview.qt-project.org/5936
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-10-03 19:16:02 +02:00
Andreas Aardal Hanssen
e4207a79d1 Fix bug in QGraphicsItem::isVisibleTo().
Task-number: QTBUG-21612
Reviewed-by: James Perrett
Reviewed-by: Magne Pettersen Zachrisen

Change-Id: I570c673a817c3c01593fcd7fa46d545f34e2c38d
Merge-request: 1396
Reviewed-by: Jan-Arve Saether <jan-arve.saether@nokia.com>
Reviewed-on: http://codereview.qt-project.org/5927
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-03 15:31:42 +02:00
Frederik Gladhorn
5ea2eab00d Simplify QAccessibleAbstractScrollArea and Calendar.
Change-Id: Iea1df37fd9fd486295458ec7627f5b6908053cdf
Reviewed-on: http://codereview.qt-project.org/5727
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-03 15:31:42 +02:00
Samuel Rødal
677cf76340 Prevent QPixmapCache potentially growing indefinitely.
QPixmapCache has until now refused to throw out shared pixmaps, i.e.
ones that still have shallow copies lying around. This leads to problems
when someone inserts two shallow copies using different keys, causing
the cache itself containing multiple shallow copies and thus forever
refusing to throw out those entries.

It's rather easy for this to accidentally happen in a user application
since QPixmap::load() or QPixmap(const QString &fileName, ...)
automatically cache the pixmap in the QPixmapCache, thus if the user
then calls QPixmapCache::insert() on the same pixmap or a shallow copy
it is locked in the QPixmapCache forever.

The only reason for not throwing out a pixmap that's shared would be to
prevent re-loading a pixmap from file when a user has a direct reference
to it in his application, but in that case the user is unlikely to
re-load the pixmap from file in any case. Therefore it seems the best
fix is to get rid of this limitation.

Task-number: QTBUG-21359
Reviewed-by: John Brooks
Reviewed-by: Olivier Goffart
(cherry picked from commit 7ab0bed3a56d46c386e65abc381264c57137cb43)

Change-Id: I46dce19227e19a25e0287cf7372177430da15a66
Reviewed-on: http://codereview.qt-project.org/4563
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-10-03 11:55:32 +02:00
Frederik Gladhorn
91ba742329 Rename description to localizedDescription in Action interface.
Change-Id: I9e15dabd47bb7dc27cb3748f6763789d8ccc7b42
Reviewed-on: http://codereview.qt-project.org/5622
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-03 09:59:27 +02:00
Thiago Macieira
5bfeab8749 Make all uses of QBasicAtomicInt and Pointer use load() and store()
Most of these changes are search-and-replace of d->ref ==, d->ref !=
and d->ref =.

The QBasicAtomicPointer in QObjectPrivate::Connection didn't need to
be basic, so I made it QAtomicPointer.

Change-Id: Ie3271abd1728af599f9ab17c6f4868e475f17bb6
Reviewed-on: http://codereview.qt-project.org/5030
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-10-03 07:57:41 +02:00
Friedemann Kleint
f18b690cca Tests: Fix compilation on Windows.
Replace Q_WS_... by Q_OS_... in corelib tests.

Change-Id: I14c41dca1ec490b3c49ba2c24e60def14c6de9da
Reviewed-on: http://codereview.qt-project.org/5778
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-03 07:57:41 +02:00
Sergio Ahumada
c3d9d36986 test: Re-enabled `tst_moc' test that is now passing on Linux
This test was fixed by 1cc70b92c8

Change-Id: If6fa3724f7c31e952ebff1dd27fea1a1e4635a85
Reviewed-on: http://codereview.qt-project.org/5783
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-10-03 05:59:54 +02:00
Sergio Ahumada
7440f0ea75 test: Re-enabled `tst_qtranslator' test that is now passing on Linux
This test was fixed by db3418c10b

Task-number: QTBUG-21125
Change-Id: I1bc549353f16c0df2b6c33533298b302fcc4d4ed
Reviewed-on: http://codereview.qt-project.org/5877
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-10-03 05:58:25 +02:00
Jason McDonald
0cf6baa2d6 Avoid using QSKIP in lieu of compile-time checks
QSKIP is intended to be used to skip test functions that are found at
run-time to be inapplicable or unsafe.  If a test function can be
determined to be inapplicable at compile-time, the entire test function
should be omitted instead of replacing the body of the test function
with a QSKIP, which only serves to slow down test runs and to inflate
test run-rates with empty, inapplicable tests.

Task-number: QTQAINFRA-278
Change-Id: I31e069f5476f8adf9851e94b33c6afac4394b88e
Reviewed-on: http://codereview.qt-project.org/5824
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-03 03:34:57 +02:00
David Faure
b863df7de9 Rename Qt::escape to QString::toHtmlEscaped, add compat method
Merge-request: 56
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>

Change-Id: I46bbb2df10968e88b5eb5ef8dae182a651b622b8
Reviewed-on: http://codereview.qt-project.org/5793
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-09-29 15:22:07 +02:00
Jan-Arve Saether
87ae97c11a Refactor accessibility for Qt5
* Moved most stuff to gui\accessible
* Moved widget-specific stuff to widgets\accessible
* Moved platform-specific code to either the bridge plugin (this was already the case)
  or to the platform plugin.
* Added several classes and functions. These have not yet gone through an API
  review. The plan is to do that in a later commit.
  Classes:
   - QPlatformAccessibility
   - QWindowsAccessibility
  Functions:
   - QWindow *QAccessibleInterface::window();
   - QPlatformAccessibility *QPlatformIntegration::accessibility()

* The bridge code can now either be a plugin or integrated into the platform plugin
* Mac accessibility is left out for now. Unix "should still work" (tm). These platforms
  should be fixed soon.

Change-Id: Ib49ffa73b647ee0af90864544c2769440157f562
Reviewed-on: http://codereview.qt-project.org/5330
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-29 13:32:59 +02:00
Frederik Gladhorn
8ebd7d84fc Remove obsolete function isHeaderVisible.
This function was deprecated in Qt4 and has
been replaced by isNavigationBarVisible.
Same for the setter.

Change-Id: Ifdcbaa2db0d4d8d475d959a6409347fa19d443a9
Reviewed-on: http://codereview.qt-project.org/5788
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2011-09-29 13:28:46 +02:00
Lars Knoll
1cc70b92c8 Fix moc autotest
QWidget is not in QtGui anymore, this broke the
test. Simply use QWindow instead.

Change-Id: Ic0176410f08b10771b663aa3ecd70295c124b662
Reviewed-on: http://codereview.qt-project.org/5757
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-09-29 08:55:10 +02:00
Jason McDonald
95cebd34eb Remove Symbian-specific code from tests.
Symbian is not a supported platform for Qt5, so this code is no longer
required.

Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa
Reviewed-on: http://codereview.qt-project.org/5657
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-29 06:41:42 +02:00
Matthew Cattell
ab061e3e43 reimplemented doUpdateMicroFocus to work without calling the base implementation
Change-Id: Ic96ab2bb93248e6d3ba1c8b789ed3c21f8ad39bd
Reviewed-on: http://codereview.qt-project.org/5716
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
2011-09-28 19:40:34 +02:00
David Faure
e316deffef QTemporaryFile: Test what happens if current dir isn't writable.
No surprises, QTemporaryFile("tempXXXXXX") fails. But that is
consistent with QFile::open, and it's documented, so ok.

Change-Id: I04c805a242aeda8327d25be238da6120b3c90f5a
Merge-request: 57
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-on: http://codereview.qt-project.org/5714
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-09-28 14:02:08 +02:00
David Faure
c7a0fd0950 QTemporaryFile: use QCoreApplication::applicationName() as base filename
Merge-request: 57
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>

Change-Id: I2a29b2ba925ea92a5299272b80164658775e9c0e
Reviewed-on: http://codereview.qt-project.org/5713
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-09-28 14:02:08 +02:00
Pekka Vuorela
3d71266fea Remove support for QWidget specific input contexts
QInputContext is migrated to QInputPanel, which allows only one
instance.

Change-Id: I4912164790d5a6bdff41e11cbe4bc4e2f9f111ec
Reviewed-on: http://codereview.qt-project.org/5641
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-28 14:02:08 +02:00
Kent Hansen
dea76f3496 Make qtbase build with Qt-in-namespace again
Change-Id: I5faa8690a05d6ec352fc69c0b69848539f2ed216
Reviewed-on: http://codereview.qt-project.org/5460
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-28 12:18:37 +02:00
Jason McDonald
cb57d36f45 Make QTest::qWarn() use __FILE__ and __LINE__.
This change makes QTest::qWarn() consistent with similar testlib
functions, which take __FILE__ and __LINE__.

Change-Id: I12977cb30672899ab38877b4a656f0cc0c7ea02c
Reviewed-on: http://codereview.qt-project.org/3559
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-28 12:17:45 +02:00
Frederik Gladhorn
e918598e2d Simplify QAccessibleTextEdit.
Before the text edit tried to represent each line of text as a child
of itself. With the editable text interface this is no longer needed.

Change-Id: If9927e522f955e863e91fd0a529a1ce6fafaddc3
Reviewed-on: http://codereview.qt-project.org/5624
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-28 03:17:28 +02:00
Frederik Gladhorn
34f0f0bf7d Remove dead code from QAccessibleTabBar.
Change-Id: I084259184228beea4374e8c5370f9a21064cae26
Reviewed-on: http://codereview.qt-project.org/5526
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-28 03:17:22 +02:00
Holger Ihrig
867e6d208c Mark QtConcurrentFilter Autotest as insignificant, because it fails rarely
Task-number: QTBUG-20688

Change-Id: I17b0016c66d3a6ada873f698a97bfcdaf60838f3
Reviewed-on: http://codereview.qt-project.org/5593
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-09-28 03:16:46 +02:00
Jo Asplin
22a83f364e Re-enabled test and made it pass on Linux
Task-number: QTBUG-20753, QTBUG-21424
Change-Id: Icc4abf82c243b31b43d167df921e0585a5e89a1e
Reviewed-on: http://codereview.qt-project.org/5553
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-28 01:15:38 +02:00
Frederik Gladhorn
eddd87826e Simplify QAccessibleDial and make it inherit QAccessibleAbstractSlider.
This adds the value interface and removes the children of the dial.

Change-Id: I47eac77c01dce36db077f553054ef37353242f77
Reviewed-on: http://codereview.qt-project.org/4821
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-09-27 05:15:23 +02:00
Jo Asplin
d13afe497a Re-enabled tests that are now passing on Linux
Task-number: QTBUG-21424

Change-Id: I093d90a2713a7e7ddace31a27a08d47e3c2da588
Reviewed-on: http://codereview.qt-project.org/5546
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-26 18:47:24 +02:00
Jason McDonald
412e6b754f Tidy and sort the list of selftests
Change-Id: I123a775e2d56fc0c64d43e98a1d2e3ab68394076
Reviewed-on: http://codereview.qt-project.org/5492
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-26 07:50:20 +02:00
Jason McDonald
9f883c7571 Use placeholder for Qt version in expected output
The selftests already used the @INSERT_QT_VERSION_HERE@ placeholder
in place of the real Qt and QTestlib versions in the expected test
output of the subtests.  For unknown reasons, the same was not true for
the expected plain text output.  In the past, this has caused Release
Managers to waste time incrementing the version numbers in these files.

Change-Id: I52f7870486fce128c04d53ff06978afa947474fd
Reviewed-on: http://codereview.qt-project.org/5375
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-26 07:50:20 +02:00
Holger Ihrig
f57f01e201 Re-enabled test that was marked insignificant and passes
Added comment why QVariant Autotest is marked insignificant

Task-number: QTBUG-21424

Change-Id: I5b911bd36e376ad529342055180ff9c5de19de67
Reviewed-on: http://codereview.qt-project.org/5399
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-26 07:50:20 +02:00
Jason McDonald
ce258242b8 Remove obsolete exclusion from selftest checking
There is no test with a datatag "float", so this code is never executed.

Change-Id: I9dd234e6575eb1c33075705edf77eb1d977061c9
Reviewed-on: http://codereview.qt-project.org/5362
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-26 03:03:09 +02:00
Jason McDonald
b211dd93a7 Don't XFAIL on the contents of assert messages.
Q_ASSERT uses __FILE__, which has undefined contents, and thus the
selftest cannot always match Q_ASSERT messages in actual output with
those in expected output.  The test was calling QEXPECT_FAIL() in this
case, but doing so implies that (a) it's a failure and (b) we intend to
fix it one day.  Neither of these is true, so instead we should simply
tolerate this difference in actual and expected outputs, in the same way
that we do in a couple of other similar cases.

Change-Id: I8b8609a400e9b798936875f6eb1ca18a83660efc
Reviewed-on: http://codereview.qt-project.org/5358
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-26 03:02:46 +02:00
Holger Ihrig
56b7ee1dae Re-enabling tests that were marked insignificant but not failing
Task-number: QTBUG-21402

Change-Id: Ibcc2cff81aff669c02b1b7b2c0cb599646b0dd61
Reviewed-on: http://codereview.qt-project.org/5455
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-09-23 13:51:59 +02:00
Bradley T. Hughes
a219b8f382 Fix QString and QByteArray reserve() and squeeze()
These functions should not take care not to unconditionally set the
capacityReserved private member, since the d may be referencing the
const shared_null or shared_empty which live in read-only memory.

The squeeze() methods check for ref > 1 instead of ref != 1 to prevent
detaching from the shared_null/shared_empty unnecessarily; the
shared_null/shared_empty ref count is -1, meaning squeeze() will never
detach from it.

Change-Id: Id3f1725a6f08b3a462343640a47bbe78f08ca7e7
Rubberstamped-by: Lars Knoll
Reviewed-on: http://codereview.qt-project.org/5454
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-23 13:42:22 +02:00
Samuel Rødal
0bc19b4997 Implemented QWidget's move() vs setGeometry() distinction in QWindow.
QWidget's move() sets the position of the window including the window
frame, unlike setGeometry(). There was no equivalent for this in
QWindow, so several QWidget auto-tests were failing. Now we add
setFramePos() to achieve the same purpose in QWindow.

This fixes tst_QWidget::windowState(), which uses move().

Change-Id: I9a3e558bd615a8f0234cc3dd94fbb2bf5ecbc148
Reviewed-on: http://codereview.qt-project.org/5405
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-23 11:31:21 +02:00
Samuel Rødal
294df24621 Patch toward fixing tst_QWidget::windowState().
In QWidget::setWindowState() there was some code to emulate window
states when they're not supported by the backend, by hiding the window
on minimize or using the screen geometry and the frameless window hint
to manually try to make a window fullscreen.

However, some of this code was being run even when the backend does
support setting window states, specifically calling setParent(0) to
force a re-creation of the platform window and calling show(). These led
to the window getting the wrong position after being minimized or
fullscreen and going back to the normal state.

Apart from storing the normal geometry of a widget when going away from
the normal state we shouldn't do any magic when the call to
QPlatformWindow::setWindowState() succeeds.

tst_QWidget::windowState() still fails due to calling move() to set the
position of the widget including the frame, when QWindow currently only
supports setting the position of the widget excluding the frame.

Change-Id: I1c1a337d3c15f14c1c842bd1e347f94e6b67d7eb
Reviewed-on: http://codereview.qt-project.org/5367
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-23 11:31:12 +02:00
Frederik Gladhorn
d8784cd393 Accessible ComboBox: remove virt children, add actions.
Simplify the combobox implementation by removing child logic.
Instead have an option to open the combobox.

Change-Id: I1bb517d0d064aefa28594b8fa957b8b2c9d48e88
Reviewed-on: http://codereview.qt-project.org/5032
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-23 11:15:36 +02:00
Joona Petrell
3f311a5b3a Add autotest for QInputPanel
Change-Id: I8ac28d93f610cd3eb69087d2c961a5aab6c47e1e
Reviewed-on: http://codereview.qt-project.org/5394
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-23 11:09:19 +02:00
Jo Asplin
cfc39289ba Re-enabled test and made it pass on Linux
Task-number: QTBUG-21424

Change-Id: Ie63380f22d299708b2085652389869cac841e249
Reviewed-on: http://codereview.qt-project.org/5388
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-23 10:58:35 +02:00
Jo Asplin
8950d3acaf Re-enabled test and made it pass on Linux
Task-number: QTBUG-21402

Change-Id: I54226c0aa63c70f9bb8ed8be3784918dd70e5592
Reviewed-on: http://codereview.qt-project.org/5382
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-23 10:49:27 +02:00
Jiang Jiang
8b4e40f535 Support adding application fonts with QFontconfigDatabase
QFontDatabaseQPA should be able to reinitialize database and
reregister all the fonts when an application font is added, because
it will trigger db->invalidate().

Add cloneWithSize support to QFontEngineBox so that even no usable
font is found in QFontDatabase, QRawFont::setPixelSize can still
work (without making the result rawfont invalid).

Register application fonts with QFontconfigDatabase, the code is
adapted from QFontDatabaseX11.

Reenable QRawFont tests for QPA, these usages are now supported in
QPA.

Fix QStaticText tests, raster in QPA does support transformations.
Translate the text before ZAxix rotation so that it will be visible
in canvas.

Add back fixedPitch support to QPA, and fix QFontDatabase tests.

Fix QGlyphRun tests, ignore non-existence glyphs in alphaMap
locking.

Fix QFontMetrics tests.

Task-number: QTBUG-21415, QTBUG-20754, QTBUG-20977,
             QTBUG-20976, QTBUG-20760, QTBUG-20759
Change-Id: I24aea7d6ec6b2ac6342134d1f2591327c23a692b
Reviewed-on: http://codereview.qt-project.org/5384
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-09-23 10:48:37 +02:00
Jo Asplin
629295fcf7 Cast back to QWindow *
Tests for widgets should select the
QWidget * version of overloaded QTestLib
functions rather than the QWindow * version.

Change-Id: I8b540b630758c0e7ba7ed88aba45d624c83ff378
Reviewed-on: http://codereview.qt-project.org/4977
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-23 00:34:26 +02:00
Jason McDonald
51589e834e Allow tests to log to multiple destinations
Each destination and the format of output to write there is specified by
adding "-o filename,format" to the command-line.  The special filename
"-" indicates that the log output is written to the standard output
stream, though standard output can be used as a destination at most
once.

The old-style testlib output options are still supported, but can only
be used to specify one logging destination, as before.

If no logging options are given on the command-line, a plain text log
will go to the console, as before.

To log to the console in plain text and to the file "test_output" in
xunit format, one would invoke a test in the following way:

    tst_foo -o test_output,xunitxml -o -,txt

This commit also enhances the selftests to test with multiple loggers,
but negative tests (e.g. bad combinations of command-line options) are
left for future task QTBUG-21567.

Task-number: QTBUG-20615
Change-Id: If91e752bc7001657e15e427aba9d25ab0a29a0b0
Reviewed-on: http://codereview.qt-project.org/4125
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-23 00:34:23 +02:00
Jason McDonald
157fc88f90 Enable testlib self-testing with multiple loggers
Modify the selftest to be able to run each subtest with a list of one or
more test loggers.  The addition of tests that use this capability will
be part of a subsequent commit.

Task-number: QTBUG-20615
Change-Id: Iac3efe8220e8245aa7e5589348d2c86b8034dd28
Reviewed-on: http://codereview.qt-project.org/5292
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-23 00:34:19 +02:00
Frederik Gladhorn
1782bcefb6 Accessible Slider: Remove virtual children.
Change-Id: I58eca7d807b046b312117f9dbec6e2e36b5332cf
Reviewed-on: http://codereview.qt-project.org/4820
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-21 15:40:34 +02:00
Frederik Gladhorn
4f1e2aa27a Accessible Scrollbar: Remove virtual children, value interface
Change-Id: I3a8e74130eb79d289143cb7ac7b8c47cdd3db90c
Reviewed-on: http://codereview.qt-project.org/4819
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-21 12:07:19 +02:00
Jason McDonald
a097825b21 Don't run multiexec test with file logging
The multiexec test runs the same test object five times.  If the -o
option is given, the output file is overwritten by each run of the test
object, meaning that tst_selftest only sees 1/5 of the test output in a
file compared with what it sees on the console.  This makes it
impossible to use the expected output file to verify the test for both
console and file output.  This issue is noted in QTBUG-21561.

Change-Id: I00031a2ea43a7ef78e8317473a089306ec062d8e
Reviewed-on: http://codereview.qt-project.org/5270
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-21 03:59:17 +02:00
Jason McDonald
1fcc6ba3d9 Remove printf calls from warnings selftest
The warnings selftest verifies that qtestlib correctly handles output
sent via qDebug() and friends.  The test had a number of printf calls
that were used to tell the user what output they should expect to see
next, but by bypassing testlib's logging, these made the testlog differ
depending on whether the test log was directed to the console or a file.

The printf calls are no longer needed, as any regressions in qDebug will
be detected by tst_selftests, which compares the output of the warnings
test with a reference copy of the expected output.

Change-Id: I8c3a3237463141fa494c50ca02062760cb583090
Reviewed-on: http://codereview.qt-project.org/5200
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-21 03:59:09 +02:00
Lars Knoll
1363d5b9eb This passes just fine
Task-number: QTBUG-21424
Change-Id: Ied95373b2cf3882ec4f352ccbc285b578c66f83d
Reviewed-on: http://codereview.qt-project.org/5003
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-09-20 21:57:18 +02:00
Lars Knoll
13d5d4886f This test passes fine.
Task-number: QTBUG-21402
Change-Id: Ied00dd2302b08d75e44c102f6025123b41657ca6
Reviewed-on: http://codereview.qt-project.org/5001
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-09-20 19:18:19 +02:00
Kent Hansen
fc1cde4eb4 Fix last few autotest gui/widgets dependencies
This is in preparation of removing testlib's
dependency on QtGui and QtWidgets.

Autotests that need QtWidgets api must
explicitly include it (since the types are no
longer provided by the QtGui master header).

Change-Id: Ifd15f72e2c553fba0c399c921957c4e955bb590d
Reviewed-on: http://codereview.qt-project.org/5191
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-20 19:18:19 +02:00
Jason McDonald
57368c7037 Improve globaldata testlib selftest.
Make the test use qDebug instead of printf, so that the reference test
output is the same regardless of whether the log goes to the console or
a file.

Also rename the test class, as it was evidently cut-n-pasted from the
subtest selftest without being renamed.

Change-Id: I8df1f0989f2e8c33c1f829ba8110fd740ff70f63
Reviewed-on: http://codereview.qt-project.org/5184
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-20 08:46:27 +02:00
Jason McDonald
01ece201ab Split subtest selftest
This test was attempting to verify two completely unrelated things, so
this commit splits it into two tests.

Also, printf calls are replaced by qDebug so that the test does not
bypass the testlib loggers.

Change-Id: I1a202af38ce2c69690a32d93405ba604ec6cabee
Reviewed-on: http://codereview.qt-project.org/5178
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-20 08:46:18 +02:00
Jason McDonald
d60007744b Remove waitwithoutgui testlib selftest
This test is not useful for finding bugs in qtestlib's logging code,
because it bypasses the qtestlib loggers and doesn't play nice with
tst_selftest.  Neither is this test very useful for finding bugs in
QTest::qWait(), as the test only proves the qWait() terminates, not that
it waits accurately, or even that it waits at all.

Change-Id: Ia5dd7cbaf3a6fbb4e94e54ed155263580e495694
Reviewed-on: http://codereview.qt-project.org/5173
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-20 08:46:07 +02:00
Kai Koehne
9a096d9eb0 Move handling of -qmljsdebugger argument to QCoreApplication
Move handling of -qmljsdebugger= argument from QApplication
to QCoreApplication. It makes sense to allow debugging also
for applications based on QCoreApplication (which we intend
to support in QtDeclarative).

Change-Id: I5a03a4510fc166cea5aad146da673ee0e7cd5d36
Reviewed-on: http://codereview.qt-project.org/5121
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-09-19 16:37:51 +02:00
Holger Ihrig
86ad092dff Removing XFail from one test, since QCursor::setPos now works for qpa
Task-number: QTBUG-20753

Change-Id: I0e381f22f6d94c5991ac3425f75e682708857aa2
Reviewed-on: http://codereview.qt-project.org/5139
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-09-19 14:18:35 +02:00
Frederik Gladhorn
76d0d19264 Add parent and child functions to QAccessibleInterface.
Stop the mis-use of navigate to find the parent.
In order to make navigation straight forward
parent and child functions are now part of
QAccessibleInterface.
This allows navigating the hierarchy of
accessible objects without the 1-based indexes in the
navigate function which lead to confusion.

Eventually the support for Ancestor in navigate can be completely removed
and forwarded in the windows bridge if needed.

In addition default parameters for virtual children.
This will make the transition smooth since it allows to remove the integer
already.

Change-Id: I278287ce17161f9fa46797ac244676778c859576
Reviewed-on: http://codereview.qt-project.org/5024
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-19 12:06:13 +02:00
Kent Hansen
b8d656d878 Fix autotest gui/widgets dependencies
This is in preparation of removing testlib's
dependency on QtGui and QtWidgets.

Autotests that need QtWidgets api must
explicitly include it (since the types are no
longer provided by the QtGui master header).

Autotests that don't need QtGui or QtWidgets
api shouldn't link against those libraries.

Change-Id: I2808289068514fcac582808828ad4634e2631733
Reviewed-on: http://codereview.qt-project.org/5093
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-19 10:24:25 +02:00
Holger Ihrig
39a6ff81bc Removed insignificant_test from tst_v8
Problem was fixed by Change Ie172e935: Revert accidental v8 submodule version downgrade

Change-Id: Ie0467170df70e9fcc10837150103d48ddd48734b
Reviewed-on: http://codereview.qt-project.org/5006
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-19 10:24:25 +02:00
Lars Knoll
98baa289cc Fix the test case
If the MKSPEC we get is an absolute path, we should
pass that one on to qmake. Otherwise it'll try to
find the mkspec in the install location. This fails
as 'make check' is being run before installation.

Task-number: QTBUG-21402
Change-Id: Ie872546f2ee7c5d737e50a1779637e393538ccc2
Reviewed-on: http://codereview.qt-project.org/4999
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-09-17 07:36:26 +02:00
Jason McDonald
a021f26148 Simplify selftest
Don't store separate strings for the logger name and the associated file
suffix -- just use the same string everywhere.

Change-Id: Ie7d1af6bf906b5ac09fbd5fcc5754b68036fb370
Reviewed-on: http://codereview.qt-project.org/5060
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-17 03:22:48 +02:00
Jason McDonald
8a12d5fbf0 Improve cleanup of selftests
The selftest was only attempting to delete the output file at the end of
the entire test run.  This file should actually be deleted after each
subtest to ensure that it does not cause confusing errors if the next
subtest fails to overwrite the output file.

Change-Id: Ia3827926f71a697c6108de3f2b08c969f761d978
Reviewed-on: http://codereview.qt-project.org/5051
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-17 03:22:18 +02:00
Jason McDonald
89c7db5159 Remove obsolete QEXPECT_FAIL calls
The removed calls related to tests that were removed when redundant
logging functionality was removed.

Change-Id: Iaebbc109eaaddb440ae78e1f4a1b4e874a8b2960
Reviewed-on: http://codereview.qt-project.org/5050
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-17 03:22:10 +02:00
Jason McDonald
218f0ca3b0 Improve compliance with Qt coding guidelines
* Use C++ comment delimiters consistently
* Use a space after control flow keywords
* Don't nest "else if" blocks unnecessarily
* Follow indenting rules
* Added comments describing some internal functions

Change-Id: I72fd1eaf5c5f3130945fbd2b64fa59e19ad2913d
Reviewed-on: http://codereview.qt-project.org/5049
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-17 03:21:59 +02:00
Jason McDonald
0676e51793 Fix XFAIL in testlib selftest
Commit 949be8cbdd modified the assert test
case but failed to update the line number of the assert in the expected
test output files.

Change-Id: I0d4f55c0b8bc1de8487dd8c6267aa459000cda26
Reviewed-on: http://codereview.qt-project.org/5048
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-17 03:21:44 +02:00
João Abecasis
0d4834c171 Wrap calls to Sequence::push_back
In C++11 push_back is overloaded to support rvalue-references,

   void std::vector<T>::push_back(const T &);
   void std::vector<T>::push_back(T &&);

so attempting to get the address for push_back is ambiguous.

Instead of hardcoding the function signature, the better and more
general solution is to allow the compiler to do the required overload
resolution itself, also allowing for implicit conversions to take place.

Task-number: QTBUG-18996
Done-with: Liang Qi
Reviewed-by: Olivier Goffart
(cherry picked from commit ca34cc75294e0d2a8bc491a2c679fe8a69cd0408)

Change-Id: Id271118e489f888905e491dd4cfc3d2db7697552
Reviewed-on: http://codereview.qt-project.org/4642
Reviewed-by: Liang Qi <liang.qi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-09-17 03:21:15 +02:00
Holger Ihrig
fb59d866c2 Fixed Test for QStyleSheetStyle after refactor merge
Task-number: QTBUG-21468

Change-Id: I869ae07c834f6d76180d2e29871b8dc9ccb3f523
Reviewed-on: http://codereview.qt-project.org/4963
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-16 08:54:47 +02:00
Frederik Gladhorn
79b19fd859 Accessibility: TabWidget - remove virt children, add action interface.
Remove virtual children by creating accessible objects for
tab buttons. Add action interface to activate tabs.

Change-Id: Ifc5e8ae6ec2708df97bbb9a94ddc1421d431ff87
Reviewed-on: http://codereview.qt-project.org/4793
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-16 08:54:47 +02:00
Frederik Gladhorn
b62adb5dda For complex widgets try to return accessible interfaces.
Some of the complex' widgets children can return
QAccessibleInterfaces.
Ideally all complex widgets should be removed, this eases the transition.

Change-Id: If3d7f28f97dac8cf5018a2c4c4b33709a3d4595c
Reviewed-on: http://codereview.qt-project.org/4788
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-16 08:54:47 +02:00
Kent Hansen
8e67ef4794 Boost performance of QChar::isSpace
Make it inline; add fast checks for typical spaces;
add fallback function that uses the fastcall calling
convention.

On ia32, this change makes isSpace ~340x faster for
ascii spaces, ~170x faster for non-space ascii
characters, and ~1.3x faster for non-ascii characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the behavior
is the same.

Change-Id: I9438d0ad3c9ba2e80560c4bee7eed05115265798
Reviewed-on: http://codereview.qt-project.org/4905
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Kent Hansen
08d1ca1053 Boost performance of QChar::isLetterOrNumber
Make it inline; add fast checks for ascii letters
and digits; add fallback function that uses the
fastcall calling convention.

On ia32, this change makes isLetterOrNumber ~120x
faster for ascii letters and digits, ~150x faster
for non-letter/digit ascii characters, and ~1.3x
faster for non-ascii characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.

Change-Id: Ia4e13692f4dd79f6aa0b96da29449e0487971b0e
Reviewed-on: http://codereview.qt-project.org/4904
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Kent Hansen
a48e9af146 Boost performance of QChar::isLetter
Make it inline; add fast checks for ascii letters;
add fallback function that uses the fastcall calling
convention.

On ia32, this change makes isLetter ~370x faster for
ascii letters, ~250x faster for non-letter ascii
characters, and ~1.5x faster for non-ascii characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.

Change-Id: I06f8d3d43114537cee5567e670898cef6494c20a
Reviewed-on: http://codereview.qt-project.org/4903
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Kent Hansen
5639423ea7 Boost performance of QChar::isDigit
Make it inline; add fast checks for ascii digits;
add fallback function that uses the fastcall calling
convention.

On ia32, this change makes isDigit ~370x faster for
ascii digit characters, ~250x faster for non-digit
ascii characters, and ~1.5x faster for non-ascii
characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.

Change-Id: I718fadecda3f591d6f4c22374d8e476f4724fd83
Reviewed-on: http://codereview.qt-project.org/4902
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Kent Hansen
6e55715581 Add benchmark for QChar
The benchmark isn't exhaustive, but tests the functions
that are heavily used by QtDeclarative.

For performance reasons, QtDeclarative has its own
implementation of various QChar functions (in
qdeclarativeutils_p.h). But we want to make the actual
QChar functions as fast, so that QtDeclarative can also
use them.

Change-Id: Ic25f30651224c39f2824380d679b8500739f38c3
Reviewed-on: http://codereview.qt-project.org/4900
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Frederik Gladhorn
4b3a551e05 Fix include path.
Reviewed-by: Gabi

Change-Id: I99b08f8b41f483c92ae175630b812e4b299069b6
Reviewed-on: http://codereview.qt-project.org/4916
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2011-09-15 20:39:28 +02:00
Frederik Gladhorn
9d3417d2a8 The Q_WS_X11 define exists no longer. Use Q_OS_UNIX.
Change-Id: I1c4b5d4187e1593aa52bc9162d9692959b55e077
Reviewed-on: http://codereview.qt-project.org/4786
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-09-15 20:39:28 +02:00
Samuel Rødal
5bb0c7c5ca Fixed crash in tst_QPathClipper.
QPathClipper uses QPainter which requires QGuiApplication.

Task-number: QTBUG-21402
Change-Id: If08b0ddee97cad347450fa06878f787e94292854
Reviewed-on: http://codereview.qt-project.org/4777
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 09:11:35 +02:00
Samuel Rødal
b6389bb6d4 Fixed tst_QIcon::task184901_badCache().
QIcon has not been moved to QtGui after all, re-introduce
QtWidgets-dependent code path.

Task-number: QTBUG-21402
Change-Id: I61c37babaeceadf7d53c10736bcc847758adaf1b
Reviewed-on: http://codereview.qt-project.org/4775
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 09:11:35 +02:00
Samuel Rødal
d6f971c854 Fixed tst_qpixmap::grabWidget().
prepareToRender() might call adjustSize() resulting in the widget's size
changing, so we should make sure to call adjustSize() _before_ we decide
on the required pixmap dimensions.

Task-number: QTBUG-21402
Change-Id: Ie72b46bc8e8e22f848769f78187f47ae9f4e37d3
Reviewed-on: http://codereview.qt-project.org/4772
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 09:11:35 +02:00
Rohan McGovern
da18a81266 tests: removed semi-obsolete `maketestselftest'
This test attempts to enforce various conventions onto Qt's autotests.
Many of the things enforced by this test became obsolete from Qt4 ->
Qt5 (because Qt5 CI is much less "magic" than Qt4 CI).
The merge of `refactor' branch obsoletes even more.

The remaining valuable part of this test should be moved into the `qtqa'
module as a shared test, because it applies to all modules, not just
qtbase.

Change-Id: I2402bca32e43c597f14b8ff6ca729563ff8efbfe
Reviewed-on: http://codereview.qt-project.org/4926
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2011-09-15 07:26:12 +02:00
Lars Knoll
b3e13c3910 Adjust test to the new location
The test got moved one level down in the directory tree,
but tries to find the top level directory. Fix paths
to make it work again.

Change-Id: I7b80a1c6891e7f1aa013a89203f651aa3ea932e8
2011-09-14 14:17:11 +02:00
Lars Knoll
8cf8ac3cde disable autotests temporarily on Mac
Reviewed-By: Morten

Change-Id: Iaf404deb3dd226212200a8716f8e7d1b70e5f40a
2011-09-14 13:55:41 +02:00
Jo Asplin
90e9b73ee1 Removed obsolete QEXPECT_FAIL
This QEXPECT_FAIL is obsoleted by Commit 2cca7e0884

Change-Id: I97bf9d8f0db50435b785bb1d2e1d60369d67aad2
Reviewed-on: http://codereview.qt-project.org/4764
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-14 05:06:28 +02:00
Jo Asplin
19c383c7bc Temporarily disabled tests
Necessary to avoid CI blocking.
The tests should be enabled again as soon as possible.

Task-number: QTBUG-21424
Change-Id: Ib25da5b9a1fdb23e00a5c503db90d306deb90f06
Reviewed-on: http://codereview.qt-project.org/4768
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
2011-09-14 05:06:25 +02:00
Holger Ihrig
5842e7e97e Temporarily disabled tests
Necessary to avoid CI blocking.
The tests should be enabled again as soon as possible.

Task-number: QTBUG-21424
Change-Id: Ibc54723855579095be0dea3bd3e071dd22a1fccf
Reviewed-on: http://codereview.qt-project.org/4825
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-14 05:06:23 +02:00
Lars Knoll
f9748f8cce Remove uilib and QtUiTools from QtBase
The code gets moved into the qttools repository,
where it belongs naturally.

Change-Id: Ia50bfe212ead3365d5c3bcb24d2c5e92e2e9de8e
2011-09-13 20:11:40 +02:00
Gunnar Sletta
e3990c358a Merge branch 'master' of codereview.qt-project.org:qt/qtbase 2011-09-13 10:20:08 +02:00
Gunnar Sletta
b62bd0584a Merge branch 'refactor'
Conflicts:
	mkspecs/qws/linux-lsb-g++/qmake.conf
	src/gui/image/qpixmap_mac.cpp
	src/gui/painting/qpaintengine_x11.cpp
	src/gui/painting/qtessellator.cpp
	src/gui/text/qfontengine_qws.cpp
	src/gui/text/qfontengine_x11.cpp
	src/gui/widgets/qlinecontrol.cpp
	src/opengl/qgl.h
	src/opengl/qgl_x11egl.cpp
	src/plugins/plugins.pro

Change-Id: If52dcd55cd55f2983a756c2f843967702b60a310
2011-09-13 08:54:45 +02:00
Gunnar Sletta
97baad65f6 make a toplevel compile work
Change-Id: I91f35e0f8a8c66fc60cad4470704f31f5b2812ab
Reviewed-on: http://codereview.qt-project.org/4725
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
2011-09-13 08:44:52 +02:00
Jo Asplin
831a160e00 Disabled tests for refactor->master integration
This change disables failing tests to increase the
likelihood that 'make check' terminates with a zero
exit status. This is done to prevent the CI system
from blocking further commits once qtbase#refactor
is merged into qtbase#master.

Failing tests are marked as insignificant (by putting
'CONFIG += insignificant_test' in the .pro file).

Note: This is a temporary measure that needs to be cleaned up
once the refactor->master integration is complete.
Ideally all disabled tests need to be enabled and passing.
All changes will be marked by the string QTBUG-21402 in a comment
for easy location.

Task-number: QTBUG-21402
Change-Id: Ic4400671671f6d9b75b106a6aa4755b20e74378d
Reviewed-on: http://codereview.qt-project.org/4678
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-09-13 08:25:05 +02:00
Jason McDonald
e52574c884 Fix outdated license header
Change-Id: I5115d47b15eeba59dcc9bc5f7bf943dc9989a1a8
Reviewed-on: http://codereview.qt-project.org/4516
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-13 07:47:57 +02:00
Jason McDonald
5e10745dca Fix missing/broken license headers
Change-Id: I54f3ca5979b78f9eec8115cc580c32321859acf6
Reviewed-on: http://codereview.qt-project.org/4514
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-13 03:55:26 +02:00
Samuel Rødal
fa42faaee5 Implemented texture cache for GL paint engine in QtGui.
This is simpler than the existing texture cache in QtOpenGL, as it only
serves the GL paint engine. There's one per context group, to simplify
the design and to prevent performance degradations.

Change-Id: I61e3c9a444d8e246a8b38da019a56f2c0a533c0c
Reviewed-on: http://codereview.qt-project.org/4674
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2011-09-12 17:44:41 +02:00
Ritt Konstantin
9f865df5d1 optimize QList::removeAll()
a) don't detach until an occurrence found
b) don't memmove every time an occurrence found
c) truncate quickly )

well, numbers are better than words:
before:
RESULT : tst_QList::removeAll_primitive():
     2,617,902 CPU ticks per iteration (total: 261,790,171, iterations: 100)
RESULT : tst_QList::removeAll_movable():
     2,547,540 CPU ticks per iteration (total: 254,753,960, iterations: 100)
RESULT : tst_QList::removeAll_complex():
     16,852,099 CPU ticks per iteration (total: 1,685,209,906, iterations: 100)

after:
RESULT : tst_QList::removeAll_primitive():
     73,520 CPU ticks per iteration (total: 73,520,442, iterations: 1000)
RESULT : tst_QList::removeAll_movable():
     90,422 CPU ticks per iteration (total: 90,422,464, iterations: 1000)
RESULT : tst_QList::removeAll_complex():
     9,667,073 CPU ticks per iteration (total: 9,667,072,670, iterations: 1000)

Merge-request: 1285
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>

(cherry picked from commit b209fe3b1a51f64541067917e96de99f14ad65f3)

Change-Id: Ia26036ed741cefcf4b5868b7b2fc5eae8130d3dc
Reviewed-on: http://codereview.qt-project.org/4577
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-09-12 16:03:47 +02:00
Samuel Rødal
2d5fbd05bb Added new QOpenGLPaintDevice test case in tst_QOpenGL.
Change-Id: Ic56e4c236f52fbd5c570bb647d5d1f4e5f9e7924
Reviewed-on: http://codereview.qt-project.org/4662
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-09-12 14:11:18 +02:00
Samuel Rødal
17511e199f Fixed auto-test failure in tst_QOpenGL.
QOpenGLFramebufferObject::height() was returning the width...

Change-Id: I521c2df02e00015998dc31a74481113af26e1ba6
Reviewed-on: http://codereview.qt-project.org/4663
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-09-12 13:09:19 +02:00
Konstantin Ritt
549b2fa246 don't crash when destroying the shortcuts
as shortcutDestroyed(..) modifies the shortcuts list.
disconnect from shortcutDestroyed() first, or operate on a detach()-ed list

this was uncovered by QList::removaAll() optimization patch.

(cherry picked from commit e95de30977291a251660f72baa84b5ff244711fb)

Change-Id: Ie0b371c54458ce85f4d36430de8080a5e78d8b7f
Reviewed-on: http://codereview.qt-project.org/4585
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-09-12 12:55:27 +02:00
Jo Asplin
26e2d9109f Disambiguated access to QTestLib API
Commit 2cca7e0884 overloads
QTestLib so that QWindow * can be passed directly to
certain functions.

This fix disambiguates access to the new API by selecting
the QWindow * versions. This assumes that the QWidget *
versions are kept mostly for backwards compatibility.

Change-Id: I075196d86d8d1d38f7192dace3c3892d315bf671
Reviewed-on: http://codereview.qt-project.org/4655
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-12 12:14:35 +02:00
Jo Asplin
d4923df10e Disambiguated access to QTestLib API
Commit 2cca7e0884 overloads
QTestLib so that QWindow * can be passed directly to
certain functions.

This fix disambiguates access to the new API by selecting
the QWindow * versions. This assumes that the QWidget *
versions are kept mostly for backwards compatibility.

Change-Id: I8755c86d5ebeb275dfa9162b0168d9179a61982d
Reviewed-on: http://codereview.qt-project.org/4640
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-12 10:20:32 +02:00
Jo Asplin
97e6d6c5d4 Add other.pro back to auto.pro
The other/ subdirectory should still be built via other.pro.

This was overlooked by Commit 0a208dd413

Task-number: QTBUG-21327
Change-Id: Ie8ebd7dfc5b1dd56ca1b629aa011d160cb563ddd
Reviewed-on: http://codereview.qt-project.org/4526
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-12 10:11:34 +02:00
Jo Asplin
4c43b60323 Moved autotests in category 'tools' into new directory structure
Task-number: QTBUG-21355

Change-Id: I315d4b1f55d42391524c0e8625952dee1b96fca3
Reviewed-on: http://codereview.qt-project.org/4449
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-12 10:08:29 +02:00
Jo Asplin
87ee382419 Moved autotests in category 'testlib' into new directory structure
Task-number: QTBUG-21353

Change-Id: I2e2ad4b7570f80b3e6500821f769e967f0a75027
Reviewed-on: http://codereview.qt-project.org/4438
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-12 08:36:15 +02:00
Gunnar Sletta
a9ac6da893 Merge branch 'master' into refactor
Conflicts:
	src/3rdparty/v8
	src/gui/text/qfont_qpa.cpp
	src/gui/widgets/qlinecontrol.cpp
	src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp
	tests/auto/gui.pro
	tests/auto/network.pro
	tests/auto/qstring/tst_qstring.cpp

Change-Id: Id118c172645303ccf06a207050d5bf1462ff57fe
2011-09-12 07:49:03 +02:00
Jo Asplin
8eb5ba3b9c Fixed build error in tst_qopengl
QOpenGLFramebufferObject must be wrapped in a QOpenGLPaintDevice
before being passed to QPainter::begin().

Change-Id: Ic82f8f17b2ea18a3790de7e75f0dd6c9092528ed
Reviewed-on: http://codereview.qt-project.org/4541
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-09-09 14:59:44 +02:00
Jo Asplin
0bfa24106d Moved autotests in category 'opengl' into new directory structure
Task-number: QTBUG-21356

Change-Id: I496680aa670af3409e50e1c254ef2c557b414d33
Reviewed-on: http://codereview.qt-project.org/4452
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-09 10:32:38 +02:00
Jo Asplin
0a208dd413 Moved autotests in category 'other' into new directory structure
Task-number: QTBUG-21327

Change-Id: I296063b665809e0411a7546fc9b41a287317ecb7
Reviewed-on: http://codereview.qt-project.org/4326
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-09 09:36:41 +02:00
Jo Asplin
c59f9ad776 Moved network autotests into new directory structure
Task-number: QTBUG-21223

Change-Id: I55dbf5c42a1c5d938b9e0c9bf7d90457a6c26bbc
Reviewed-on: http://codereview.qt-project.org/4259
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-09 09:32:17 +02:00
Rohan McGovern
e815b93d12 tests: use contains(QT_CONFIG,private_tests) consistently
These tests used requires(contains(QT_CONFIG,private_tests)) in their
.pro file, but did not subtract themselves from their parent project
SUBDIRS when private_tests weren't enabled.

In the best case, this wastes a little time as qmake iterates over these
projects which won't be built.  In some worse esoteric cases, this may
break compilation or packaging.

Change-Id: I189c108ee9943b15114becf9d6b04f78dbabbe31
Reviewed-on: http://codereview.qt-project.org/4389
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2011-09-09 05:46:54 +02:00
Thiago Macieira
83ba0d56f8 Add an SSE4.2 even simpler version of toLatin1
Use the new PCMPESTRM instruction (Parallel CoMPare Explicit-length
STRings with result in a Mask) which is added in SSE4.2 for
facilitating string operations. The "compare ranges" mode allows us to
search for characters outside the Latin 1 range and then use the
SSE4.1 PBLENDVB instruction to replace those with question marks.

Unlike previous SSE compare instructions, the PCMPxSTRx family allows
us to operate on unsigned 16-bit values. This saves us another
parallel add.

Reviewed-By: Samuel Rødal
(cherry picked from commit 45d2d36c9dbcbce403c78838ea52acd1ab111b68)

Change-Id: I0f9d864f9d19c0f0da43ccb6918dc28295074496
Reviewed-on: http://codereview.qt-project.org/4468
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-09-08 17:32:00 +02:00
Jo Asplin
9360ee1605 Disambiguated access to touch event API in QTestLib
Commit 079ec157f8 overloads
the touch event API in QTestLib so that QWindow * can be
passed directly to certain functions.

This fix disambiguates access to the new API by selecting
the QWindow * versions. This assumes that the QWidget *
versions are kept mostly for backwards compatibility.

Change-Id: Ib6b33edc64d81f300d4109d59fd29f25ccd605db
Reviewed-on: http://codereview.qt-project.org/4443
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-09-08 16:00:30 +02:00
Samuel Rødal
68974d8e64 Added equivalent to tst_QGL::destroyFBOAfterContext() in tst_QOpenGL.
The more the merrier.

Change-Id: I401ed97600a890c38cb4d5dbe0578d6bcf68e909
Reviewed-on: http://codereview.qt-project.org/4322
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-09-08 10:48:48 +02:00
Jason McDonald
ac75fd5f87 Add missing license header.
Change-Id: Icbbb450d759b732ab28896365bb5126cf4723a62
Reviewed-on: http://codereview.qt-project.org/4308
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-09-08 02:54:22 +02:00
Corentin Chary
a2b95242be tests: fix QNetworkProxyFactory test
QNetworkProxy takes an hostname, not an url.

Change-Id: I7504fbc02a817d6c75ee55dc8bbdd66ec1e6cd01
Reviewed-on: http://codereview.qt-project.org/4373
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-09-07 19:03:13 +02:00
Caroline Chao
e77032c4e6 Change in tst_qstylesheetstyle.cpp to work around a bug in testcocoon parser.
Change-Id: I1361e4c02e0c8a0424957c531e22a7b2236f725d
Reviewed-on: http://codereview.qt.nokia.com/4360
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-09-07 15:53:35 +02:00
Caroline Chao
ebfcb7eb78 Fix missing curly brackets in tst_global.cpp.
Those are required when exception handling is disabled.

Change-Id: I9ac862758bd961f4593a66d3e28005d766959478
Reviewed-on: http://codereview.qt.nokia.com/4359
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-09-07 15:52:20 +02:00
Samuel Rødal
6119d12d7d Fixed tst_QGL::partialGLWidgetUpdates.
Change-Id: Ie37051e28b199b5d159f5be05be41efbd17fdf08
Reviewed-on: http://codereview.qt.nokia.com/4273
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-09-07 08:36:21 +02:00
Samuel Rødal
3883b4f5b1 Fixed tst_graphicseffect auto-test failures.
Some of these trigger pre-refactor as well by adding a QTest::qWait()
after QTest::qWaitForWindowShown().

Change-Id: I48863fd31fc0c3b51463ed922782e86c21f05bff
Reviewed-on: http://codereview.qt.nokia.com/4272
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-09-07 08:35:48 +02:00
Aaron Kennedy
bc2eac1ef3 Update V8
This fixes a few bugs in QML mode name resolution and simplifies
our V8 patchset a little by folding some patches together.

Change-Id: Ia528a43ac8ccad95ac81bcdff5d05aaeab4b48b2
Reviewed-on: http://codereview.qt.nokia.com/4294
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-09-07 04:50:45 +02:00
Paul Olav Tvete
a446ff945f Merge "Merge remote branch 'gerrit/master' into HEAD" into refactor 2011-09-06 11:08:48 +02:00
Samuel Rødal
a6b6e760ac Merge remote branch 'gerrit/master' into HEAD
Conflicts:
	configure.exe
	src/corelib/global/qglobal.h
	src/gui/kernel/qplatformnativeinterface_qpa.h
	src/gui/widgets/qlinecontrol.cpp
	src/gui/widgets/qmenu_mac.mm
	src/gui/widgets/qmenu_p.h
	src/gui/widgets/qmenubar.cpp
	src/gui/widgets/qmenubar_p.h
	src/gui/widgets/widgets.pri
	src/plugins/platforms/wayland/qwaylandnativeinterface.cpp
	src/plugins/platforms/wayland/qwaylandnativeinterface.h
	src/src.pro
	tests/auto/qdir/tst_qdir.cpp
	tests/auto/qfileinfo/tst_qfileinfo.cpp
	tests/auto/qsslsocket/tst_qsslsocket.cpp
	tests/auto/qstring/tst_qstring.cpp

Change-Id: I64cf2cefa532ba87a92f632e3595ce6914183e9b
2011-09-06 10:55:40 +02:00
Jo Asplin
665e4ec0ec Moved xml autotests into new directory structure
Task-number: QTBUG-21260

Change-Id: I7bc30227d4e71e8783f274dbfa758399dca546d4
Reviewed-on: http://codereview.qt.nokia.com/4146
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-09-06 10:31:40 +02:00
Jo Asplin
0a2282f97a Moved sql autotests into new directory structure
Task-number: QTBUG-21253

Change-Id: Id20605e1247b080e775968b56ea5f56462ca4c71
Reviewed-on: http://codereview.qt.nokia.com/4127
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-09-06 09:32:15 +02:00
Jo Asplin
a4e6b04419 Mark test as insignificant
This change was missed out from a90f50942e

Task-number: QTBUG-21133
Change-Id: I7365562c79515eb52221bff8bb4fbb9987c7425c
Reviewed-on: http://codereview.qt.nokia.com/4123
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-09-05 14:14:58 +02:00
Sergio Ahumada
5638da4de2 tests: mark `qstatictext' as using private API
This autotest is using private symbols, available only when Qt is
configured with -developer-build.

Change-Id: I9bf221040b8225ed173761c7ee23e69efd85c3cb
Reviewed-on: http://codereview.qt.nokia.com/4148
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-09-05 10:24:04 +02:00
Andrew den Exter
06e2ce51d1 Fix delayed password masking mid-string.
Unmask the last character typed, not the last character in the string.

Change-Id: I9c70d2347bf878c18ab0a7f4ea76f755ca19a85c
Task-number: QTBUG-17003
Reviewed-by: Alan Alpert
(cherry picked from commit b98e9e69dd8ba33d5f01b9518d95b63b86c4b443)
Reviewed-on: http://codereview.qt.nokia.com/4165
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2011-09-05 04:07:49 +02:00
Shane Kearns
c8baa5602a Restore Qt4.7 behaviour of QFileInfo::absolute(File)Path
Many applications relied on the undefined behaviour that the
filesystem engines returned clean paths (despite the documentation
stating that they may not), and consequently suffered regressions with
Qt 4.8.

Unix paths are once again cleaned if necessary.
Windows/Symbian paths were already cleaned, but now use the utility
function to check if a path is dirty, to avoid duplicated code.

Task-number: QTBUG-19995
Change-Id: If8c18469f149291c9d079ae3da23bc2087bbd49a
Reviewed-on: http://codereview.qt.nokia.com/4154
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2011-09-02 20:48:06 +02:00
Shane Kearns
a4227c8400 Fix compile error on MSVC2008
Change-Id: I4f6192b9db601076688b52bfd794ea80a7346729
Reviewed-on: http://codereview.qt.nokia.com/4153
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2011-09-02 20:44:30 +02:00
Bradley T. Hughes
7493ee1c44 Remove the build-key from the plugin verification data
The build-key is an old mechanism to work around binary
incompatibilities in GCC 3.x versions. Modern GCC has not broken binary
compatibility since 3.4, making this mechanism obsolete.

The cache value stored now only includes Qt version, the debug/release
boolean, and the last modified time for the plugin. Old 4-value keys
will be replaced with new keys as the plugins are reloaded the first
time.

This also removes QLibraryInfo::buildKey(), which is a source-incompatible
change.

The UNIX and Windows configure tools have been updated to stop
outputting the QT_BUILD_KEY preprocessor directive.

See also:
http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-August/000892.html

Change-Id: I7d06969a370d3d2c6de413c1230d9d6789cbf195
Reviewed-on: http://codereview.qt.nokia.com/3977
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-09-02 14:11:41 +02:00
Shane Kearns
e8192883b2 Fix comparison of absolute, unclean paths in QDir
QDir::operator== was creating a clean absolute path for comparison
purposes if the original path was relative.
However original absolute paths were trusted, even though they could
be unclean. Now they are checked for cleanliness first.

Task-Number: QTBUG-19995
Task-Number: QTBUG-20495
Change-Id: I047a1a40ae5151e4604085e4ac87f30a4e4979c4
Reviewed-on: http://codereview.qt.nokia.com/4099
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2011-09-02 10:01:20 +02:00
Corentin Chary
254d7189d8 qssl: add auto test to QSsl::Opaque QSslKeys
Also export two symbols for auto tests since opaque keys
need EVP_PKEY * created by openssl.

Change-Id: Ib7801ddfceb259de7291bfaa5940df87f68af97d
Merge-request: 48
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/4011
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-09-02 09:44:32 +02:00
Rohan McGovern
592d53a17c test: removed bogus CONFIG+=debug in qdiriterator benchmark
This doesn't make sense, none of the other benchmarks do it, and it
breaks compilation for a release-only mac build.

Change-Id: I3bc73f670688d413afcae7fa88bab19f7b3dac33
Reviewed-on: http://codereview.qt.nokia.com/4017
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-09-01 23:55:44 +02:00
Rohan McGovern
fad997b4ee test: removed bogus CONFIG+=debug for badxml selftest
This appears to serve no purpose.
It was probably copy-pasted from assert.pro.

Change-Id: Ie3d9605b969ee11f2d64c1ac3e480e9efb862a3c
Reviewed-on: http://codereview.qt.nokia.com/4016
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-09-01 23:55:41 +02:00
Rohan McGovern
949be8cbdd test: fixed `assert' selftest for release-only mac builds
This test intentionally crashes itself by using Q_ASSERT.

Since Q_ASSERT is a no-op in release builds, the .pro file was
attempting to always force debug mode for this project.

However, on platforms where debug vs release affect linkage (e.g. mac
and windows), this is invalid.  On these platforms, debug mode can't be
enabled unless debug versions of the Qt libraries are available, which
they are not if Qt is configured with `-no-debug-and-release -release'.

Use a different method to ensure that Q_ASSERT really asserts, for both
debug and release builds.

Change-Id: I13eea2c72c77a0a981850dbcaa77f65f147c8490
Reviewed-on: http://codereview.qt.nokia.com/4015
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-09-01 23:55:39 +02:00
aavit
74cadacdd5 Add option to compare to different platform in lancelot autotest
(cherry picked from commit b6b160d9ba1e0a5f1fbd67112f8c78ba48e7cad7)

Conflicts:

	tests/baselineserver/src/baselineserver.cpp

Change-Id: Ie8bdff26b8394bb6a5b6b48225b20833dbee0637
Reviewed-on: http://codereview.qt.nokia.com/4082
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-09-01 16:14:18 +02:00
Holger Ihrig
cf5e669a06 Moving relevant tests to corelib/xml
Task-number: QTBUG-21066

Change-Id: I2fb68c35c7abc830ba426b0aab892332b0ca00fb
Reviewed-on: http://codereview.qt.nokia.com/3734
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-09-01 13:08:32 +02:00
Holger Ihrig
5c27f0a2fb Moving relevant tests to corelib/tools
Task-number: QTBUG-21066

Change-Id: I650f8f7826b9feea7c1484f06e03e10c68ec2b65
Reviewed-on: http://codereview.qt.nokia.com/3712
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-09-01 13:07:23 +02:00
Holger Ihrig
82e715b277 Moving relevant tests to corelib/thread
Task-number: QTBUG-21066

Change-Id: Ia16fa8961f1a73f4da6709197b5dd9929c16583f
Reviewed-on: http://codereview.qt.nokia.com/3663
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-09-01 12:54:58 +02:00
Holger Ihrig
c9a5ccb268 Moving relevant tests to corelib/statemachine
Task-number: QTBUG-21066

Change-Id: I6dfff1c3b3ad2119a588dc52eb5a2e67255284c1
Reviewed-on: http://codereview.qt.nokia.com/3658
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-09-01 12:54:42 +02:00
Holger Ihrig
2efc6f787c Moving relevant tests to corelib/plugin
Task-number: QTBUG-21066

Change-Id: I918f6ef6fb825d7cf94d6b42322b2c2eb5c52aaa
Reviewed-on: http://codereview.qt.nokia.com/3604
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-09-01 12:42:51 +02:00
Holger Ihrig
3a7e6157d1 Moving relevant tests to corelib/kernel
Added Test for qmetaproperty

Marked QSocketNotifier Autotest as insignificant. See QTBUG-21204

Marked qtranslator Autotest as insignificant. See QTBUG-21125

Marked corelib/io/qfile/largefile as insignificant. See QTBUG-21175

Task-number: QTBUG-21066
Change-Id: I2a7f6587845c355091bb07c8dd3d1557d16db0be
Reviewed-on: http://codereview.qt.nokia.com/3598
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-09-01 12:42:14 +02:00
Jo Asplin
a90f50942e Moved gui autotests into new directory structure
Task-number: QTBUG-21133

Change-Id: I83b8f652935cf92151265ca2530a3cf81c31fdef
Reviewed-on: http://codereview.qt.nokia.com/3996
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-09-01 10:59:49 +02:00
Jo Asplin
daf24b1b64 Moved dbus autotests into new directory structure
Task-number: QTBUG-21108

Change-Id: I8cdd4af59db3716921e7392379584f349ed29136
Reviewed-on: http://codereview.qt.nokia.com/3602
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-01 09:37:08 +02:00
Samuel Rødal
a3b0264754 Clean up shared resources immediately as the last context is destroyed.
By not waiting until deleteLater() kicks in it's easier to auto-test. We
can now add a test case for what happens when a shared resource is still
valid while the last context is destroyed.

Change-Id: I72963928e6a921e49ed59a79e2579b497ba37ccf
Reviewed-on: http://codereview.qt.nokia.com/3732
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-09-01 07:44:01 +02:00
Jason McDonald
b17e9b3d94 Simplify qtestlib logging code, part 1
Both the old and new XML loggers produce the Complete and Light XML log
formats, while only the new logger produces Xunit XML logs.  The
disadvantage of the new logger is that it is more complex and doesn't
produce a partial log if the test fails to terminate gracefully.  This
behaviour arises because Xunit format output cannot be written correctly
until all tests have been executed.

This commit removes the Complete and Light XML formats from the new
logger, using the old logger to produce those formats and the new logger
to produce only Xunit XML.  Prior to this commit, the qtestlib selftests
demonstrate that the old and new loggers produce identical output for
Complete and Light XML.

This commit also removes the undocumented -flush command-line option,
which was used rather obscurely to select between the old and new
loggers.

The newer logger will be renamed to QXunitTestLogger in a subsequent
commit.

Change-Id: Id304f5b411bdd520409ee233f6bc34e8917942ab
Reviewed-on: http://codereview.qt.nokia.com/3923
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-01 03:10:39 +02:00
Friedemann Kleint
50eb9120ce Fix further test builds on Windows.
Change-Id: I9846d19c5975f4d17bed46c59272a0fa428fd0d1
Reviewed-on: http://codereview.qt.nokia.com/3980
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-31 15:22:35 +02:00
Friedemann Kleint
547deef149 Fix compile on Windows.
Change-Id: I72b1c35c3f92e1198a8c888f9d732b202d84047c
Reviewed-on: http://codereview.qt.nokia.com/3953
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-31 13:34:59 +02:00
Friedemann Kleint
c5ea7fd39a Fix autotests to build on Windows.
Basically breakage by <windows.h> being included from the OpenGL
parts of <QtGui/QtGui> included from <QtTest/QtTest>.

Change-Id: Id285fb89c64bf77e2408faac5688acd085579351
Reviewed-on: http://codereview.qt.nokia.com/3952
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-31 13:26:27 +02:00
Jason McDonald
f0d7e705ee Remove XFAIL from selftests for some platforms
The selftest for assert messages calls QEXPECT_FAIL if the assert
message doesn't exactly match the expected output.  This is because
Q_ASSERT uses __FILE__, which is compiler-dependant.

The expected output for this test contains various hard-coded unix
paths meaning that the test never passes on any platform.  This commit
removes those paths from the test data so that the test passes for
compilers that don't put path information in __FILE__.  This commit also
makes the XFAIL message more accurate -- absolute paths in assert
messages don't come from QTestLib, they come from Q_ASSERT's use of
__FILE__.

Change-Id: I9aae212379b43a29ae83715717cc978b4b619420
Reviewed-on: http://codereview.qt.nokia.com/3908
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-08-31 13:12:43 +02:00
Lars Knoll
3526560d60 Add QLocale::toUpper/Lower
The toUpper/Lower() methods in QString should not
be locale dependent, as this can lead to rather
hard to find bugs in at least a turkish locale.

Rather have explicit, locale dependend case conversions
available in QLocale.

Reviewed-by: Denis Dzyubenko
(cherry picked from commit da0e1e101bb4c44c25b6523357fa81ad1b2d6539)

Change-Id: I1cc3f341bef17ad573a736dc94c9c5d514ace54e
Reviewed-on: http://codereview.qt.nokia.com/3259
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-08-31 13:12:43 +02:00
Peter Hartmann
dd91701a50 QSslCertificate: regenerate blacklisted certificates, they were expired
regenerating blacklisted certificates with same serial number and
common name, but longer validity: Now they are valid for 10 years.
(cherry picked from commit a3d22777028b102b7f65cf2db9719f5d57308b04)

Change-Id: I7884484c2f61b3a55f671faa38967e62fc8954f0
Reviewed-on: http://codereview.qt.nokia.com/3894
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-08-31 10:47:08 +02:00
Holger Ihrig
012ba8c0e5 Moving relevant tests to corelib/io
Marked Test for qdiriterator as insignificant. See QTBUG-21160

Marked Test for qresourceengine as insignificant. See QTBUG-21159

Task-number: QTBUG-21066

Change-Id: I72848a651ff3e7aff1d6105dd49124e4ed070a44
Reviewed-on: http://codereview.qt.nokia.com/3577
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-08-31 10:08:38 +02:00
Gunnar Sletta
df0ff8fd4e Merge branch 'master' into refactor 2011-08-31 08:14:48 +02:00
Jason McDonald
21776e9260 Fix errors in lightxml test logger
The newer test logger did not produce the same light XML output as the
logger that it replaced.  In particular, it did not output the <DataTag>
tag and it incorrectly nested a <Message> tag inside the <Incident> tag
when a fatal error occured in a test.

Unfortunately, it appears that the expected lightxml output for the
selftests was produced by running tests using the newer logger, while
the selftests did not use the older lightxml logger.  Thus the errors
were not detected by the selftests.

This commit adds the older lightxml logger to the selftests, updates the
expected test data accordingly, and modifies the newer lightxml logger
to behave correctly.  This last item is achieved by making the lightxml
streamer copy most of the code from the xml streamer -- lightxml output
is supposed to be same as xml, except for the omission of the root and
<TestCase> tags.

Change-Id: Ie6e1f69dd6000df2b9d0c5c8e2109fe7bbff3956
Reviewed-on: http://codereview.qt.nokia.com/3902
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-08-31 07:40:06 +02:00
Jason McDonald
b94eba6899 Make lightxml and xml log formatting consistent
For XML logs, an Incident tag with no sub-tags has a space before the
closing slash.  For Light XML logs, this space was missing unless the
-flush command line option was supplied.

Change-Id: I6de2e140f9309f333b5b97ed7f8116e4e727a149
Reviewed-on: http://codereview.qt.nokia.com/3871
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-08-31 07:39:54 +02:00
Kent Hansen
9be3851eb9 Make sure tests/auto/v8.pro doesn't clobber auto.pro
The omission of spaces is crucial in order for the
regular expressions in configure to be able to detect
that v8.pro isn't a "main project" file.

Task-number: QTBUG-21168
Change-Id: I2e94736ee3195bed7fd528759b1bc1812f1ae54c
Reviewed-on: http://codereview.qt.nokia.com/3878
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-08-31 01:17:39 +02:00
Peter Hartmann
68b322270c QSslCertificate: blacklist fraudulent *.google.com
blacklist the leaf certificate for now. There might well be more fake
certificates in the wild, for that either the Diginotar.nl root cert
needs to be disabled on the system or OCSP would need to be enabled
(not supported by Qt yet).

Reviewed-by: Richard J. Moore <rich@kde.org>
(cherry picked from commit 70f6a1b91b242174682c30be976c2aa36c450cc7)

Change-Id: I7cd3fdc4c6e85202914764f983a60d301e54aa35
Reviewed-on: http://codereview.qt.nokia.com/3893
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-08-30 18:48:35 +02:00
Holger Ihrig
dc44b86a6e Moving relevant tests to corelib/global
Task-number: QTBUG-21066

Change-Id: I011e601f599e11365c76598631a443b82ab9fb30
Reviewed-on: http://codereview.qt.nokia.com/3487
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-08-30 13:17:21 +02:00
Holger Ihrig
0547598a28 Moving relevant tests to corelib/concurrent
Adding tests for QFutureSynchronizer and QtConcurrentResultStore

Added minor things in QFutureSynchronizer and QtConcurrentResultStore and removed tests for destruction

Task-number: QTBUG-21066

Change-Id: I9f088b89463340f339c914bcb37fb2f9d3b62057
Reviewed-on: http://codereview.qt.nokia.com/3477
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-08-30 13:17:07 +02:00
Samuel Rødal
42f2da5e6b Merge remote branch 'gerrit/master' into refactor
Conflicts:
	src/src.pro

Change-Id: Ic04fb170b82e86dc3cef6fe979f8fb709db10daf
2011-08-30 11:51:20 +02:00
Friedemann Kleint
e39f50154f Tests: Add widgets module to profile.
Ensure the right test macro is run.

Change-Id: I84d58038f25b000c05fd52e8bda92e4484d53a6e
Reviewed-on: http://codereview.qt.nokia.com/3805
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-29 15:35:18 +02:00
Friedemann Kleint
cf9a304e6e Build on Windows/clean build on Linux.
Change-Id: I26552e85a8e8c63002db93b7d9b645981620f0af
Reviewed-on: http://codereview.qt.nokia.com/3738
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-08-29 14:39:07 +02:00
Samuel Rødal
81c84b8649 Added qopengl auto-test.
For testing the gui/opengl functionality.

Change-Id: Ied0e977ad537c0be301bb08091adaf9cf779306b
Reviewed-on: http://codereview.qt.nokia.com/3729
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-08-29 12:32:41 +02:00
Samuel Rødal
d0c48efbae Merge remote branch 'gerrit/master' into refactor
Conflicts:
	src/gui/accessible/qaccessible.h
	src/gui/kernel/qapplication.cpp
	src/gui/kernel/qapplication.h
	src/gui/kernel/qapplication_mac.mm
	src/gui/kernel/qapplication_qws.cpp
	src/gui/kernel/qapplication_s60.cpp
	src/gui/kernel/qapplication_win.cpp
	src/gui/kernel/qapplication_x11.cpp
	src/gui/kernel/qdnd_x11.cpp
	src/gui/kernel/qwidget.cpp
	src/gui/widgets/qlabel.cpp

Change-Id: Ief9c75724d2cff89ed45f009bdee2ffc5e4395ba
2011-08-29 12:11:53 +02:00
Kent Hansen
9830cb8e59 Add QtV8 library to QtBase
This adds Aaron's copy of V8 to src/3rdparty/v8 (as a
git submodule), and builds it as a "normal" Qt library
(without any dependencies on Qt itself).

The library can be added to a project with

QT += v8-private

V8 API headers are available as private includes, e.g.

 #include <private/v8.h>

The API is private because we're exposing a third-party
API directly, and we don't want to (and cannot) make
source or binary compatibility guarantees for it.

Since we want the V8 public API headers to be private
headers in Qt, syncqt and sync.profile were extended to
understand a new configuration option, the
@allmoduleheadersprivate array, that tells syncqt whether
all the library headers should be treated as private even
though they don't follow the _p.h Qt convention.

The V8 project files, patches and autotests are copied
from the QtDeclarative repository. The next step after
this commit is to remove QtDeclarative's copy of V8 and
link with QtV8 instead.

Task-number: QTBUG-20963
Change-Id: Ib8820362cdbc8fa662a5e97db841656cf38d1b62
Reviewed-on: http://codereview.qt.nokia.com/3092
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-08-29 10:16:01 +02:00
Kim Motoyoshi Kalland
13b3545e83 Optimized QMatrix4x4 by improving how 'flagBits' are used.
Change-Id: Ic417336489d334e25b547c719d457faf65307cac
Reviewed-on: http://codereview.qt.nokia.com/3670
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-08-29 10:16:01 +02:00
Rohan McGovern
c7013eea59 test: removed obsolete tst_maketestselftest::tests_auto_pro
This test attempted to ensure that tests/auto/auto.pro would only refer
to other .pro files, attempting to guarantee that the set of all tests
could be cleanly broken up.  The purpose of this was to enable CI
optimizations (e.g. running the autotests for different modules on
different machines in parallel).

This test is invalidated by pending commits which rearrange the
autotests, and we never made use of this property for optimization
anyway, so drop this part of the test.

Change-Id: I23e712fb8ec1dbe7ac65fe66015e1f060f3dcd41
Reviewed-on: http://codereview.qt.nokia.com/3681
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-08-29 09:29:43 +02:00
Gunnar Sletta
a001bde5bf QWindow::mapToGlobal/mapFromGlobal and move()
Change-Id: If1909b9ce468a8708cb25d5a2fbe8ebd90bd958a
Reviewed-on: http://codereview.qt.nokia.com/3702
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-08-29 08:30:00 +02:00
Holger Ihrig
7b686abdd5 Moving relevant tests to corelib/codecs
Task-number: QTBUG-21066

Change-Id: If33bda9622bbfdac2b72ec2bf8489b0f62bae6e2
Reviewed-on: http://codereview.qt.nokia.com/3469
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-08-26 08:49:59 +02:00
Rohan McGovern
37fc7b5fe6 test: marked tst_qfiledialog as insignificant for qpa, xcb
This autotest sometimes passes and sometimes fails.

Task-number: QTBUG-21109
Change-Id: I160b43a1abd0de7350029f2eb758f177e880d38d
Reviewed-on: http://codereview.qt.nokia.com/3575
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-08-25 15:00:31 +02:00
Rohan McGovern
8525cb69b1 test: marked tst_qmenu as insignificant (for qpa, xcb)
This autotest sometimes fails and sometimes passes.

Task-number: QTBUG-21100
Change-Id: I5b3a1cb9713cc12ead130b4c64a876397d61fe17
Reviewed-on: http://codereview.qt.nokia.com/3549
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-08-25 15:00:31 +02:00
Rohan McGovern
56746e3dfa test: marked tst_qlistwidget as insignificant
This test sometimes passes and sometimes fails.

Task-number: QTBUG-21098
Change-Id: Ic56e93d12a7b3fa2e9c135e25610bf1119fa636e
Reviewed-on: http://codereview.qt.nokia.com/3548
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2011-08-25 15:00:31 +02:00
Eskil Abrahamsen Blomfeldt
64bd1737ad Mark QNetworkReply test as unstable
QTBUG-21102 is currently blocking integration of several commits.
Marking the test as unstable until the bug has been fixed.

Change-Id: I9b630767fd1aa4369564f5e90c63e850808385e1
Reviewed-on: http://codereview.qt.nokia.com/3584
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-08-25 15:00:31 +02:00
Gunnar Sletta
04d0a9626c Merge branch 'master' into refactor
Conflicts:
	src/gui/kernel/qapplication_qpa.cpp
	src/gui/kernel/qcursor_qpa.cpp
	src/gui/kernel/qwindowsysteminterface_qpa.cpp
	src/gui/kernel/qwindowsysteminterface_qpa.h
	src/gui/kernel/qwindowsysteminterface_qpa_p.h
	src/gui/text/qtextcontrol.cpp
	src/plugins/platforms/wayland/wayland.pro
	src/widgets/accessible/qaccessible2.h
	src/widgets/widgets/qwidgetlinecontrol_p.h

Change-Id: I5e6f4eb184159dccc67e8f13673edb884d179c74
2011-08-25 12:48:52 +02:00
David Faure
7347a5f99d Make the DBus timeout configurable in QDBusAbstractInterface.
Merge-request: 1253
Reviewed-by: Thiago
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
(cherry picked from commit e58a402fbee2fc8af8cd651acafdc28525ed1314)

Change-Id: I4246047b149193e510f2984a0b1a1fae655b9a51
Reviewed-on: http://codereview.qt.nokia.com/3580
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-08-25 11:36:52 +02:00
Sergio Ahumada
17f3451daa tests: Remove `qtessellator' autotests
This autotest is not needed anymore since qtessellator was
removed by 78169e6b06

Change-Id: I438e5bf2fd44da73461bb6fc311a6dce5573e467
Reviewed-on: http://codereview.qt.nokia.com/3496
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-08-24 15:41:55 +02:00
Sergio Ahumada
b48e8b2103 test: fix `tst_qpainter' compilation
Change-Id: Iea6fa5e1592e6227e10ea3768fe99aa14704dc48
Reviewed-on: http://codereview.qt.nokia.com/3505
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
2011-08-24 15:14:46 +02:00
Sergio Ahumada
6eee9f4dc2 test: fix tst_qabstractprintdialog compilation
Change-Id: I0068ea79bbfd56fdd67e7841d6fcf873ec3ed28a
Reviewed-on: http://codereview.qt.nokia.com/3475
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-08-24 13:53:13 +02:00
Holger Ihrig
a0d09cc3cd Moving Tests to new Autotest Structure
Bring new Structure for Autotests Corelib into place

Moving Corelib/Animation Tests

Added new Autotests to corelib/animation

Task-number: QTBUG-21066
Change-Id: I754bbcc2b0a512e6df4c0d768ae6ff9c261ff210
Reviewed-on: http://codereview.qt.nokia.com/3404
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-08-24 10:09:19 +02:00
Antonis Tsiapaliokas
41e5be3773 Add operator== and operator!= to qsqlerror class
Merge-request: 44
Task-number: QTBUG-20543

Change-Id: I7b88985fe095ffd2e48ac05c82dc3f3a92dbb091
Reviewed-on: http://codereview.qt.nokia.com/3425
Reviewed-by: Charles Yin <charles.yin@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-08-24 06:51:17 +02:00
José Millán Soto
983941da65 Check validator when changing text using accessibility functions.
Reviewed-by: Frederik Gladhorn
(cherry picked from commit 731d843b52b0a0bc387c50c2af37a71f87804f4d)

Change-Id: Ieef71cea5b44f288f2f95a0765ec0b3f6d47c042
Reviewed-on: http://codereview.qt.nokia.com/3037
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-08-23 16:12:33 +02:00
Frederik Gladhorn
b8cd3fe7b6 Implemented QAccessibleTextEdit::attributes()
Handling font properties and colors
Created test: tst_QAccessibility::textAttributes

Merge-request: 2626
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
(cherry picked from commit f1a6766432f66220275aa7902e4c2414a3069cd1)

Change-Id: I388bc660af20149934110d7894840eccecf81f2a
Reviewed-on: http://codereview.qt.nokia.com/3036
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-08-23 16:12:29 +02:00
Rohan McGovern
a2cbaf9137 test: really marked tst_qtcpsocket autotest as unstable
15575fb280 edited the wrong .pro file :(

Task-number: QTBUG-21043
Change-Id: I7b52fb7ea8669856b359523b278142c763bfb978
Reviewed-on: http://codereview.qt.nokia.com/3341
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Keith Isdale <keith.isdale@nokia.com>
2011-08-23 04:57:58 +02:00
Frederik Gladhorn
1b7b337797 Add IAccessible2 table2 implementation.
Implement the IAccessible table2 interface for itemviews.
This is simpler than what we have in complexwidgets.
For now it is only used on Linux.

The new table2 interface is ifdef'ed to only be used on X11.
Improve handling of accessible events and clean up.

There are two xfails for the Table and Tree where sibling
navigation is not implemented yet.

Reviewed-by: Gabi
(cherry picked from commit e797ba558dddd45522b5a317316e497e9efc44a8)
(cherry picked from commit eff5ecc5d8f65fa25d6cfd6ed96a9d2a00d0c663)
(cherry picked from commit d29876008fad400bca8d6b37e5d5f61dd1bcb39d)
(cherry picked from commit 2a326fdc8f8bf2bd2c5764394616100906d9db2d)
(cherry picked from commit 9b72e79e20d0d3560e0b064b8b0d75e35feb720e)
(cherry picked from commit 075b0f744363842ed4179c644d933d461389544f)

Change-Id: I654f74991830ae1fc7df7cc91d930390fb88b2a4
Reviewed-on: http://codereview.qt.nokia.com/3274
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-08-22 15:24:32 +02:00
Rohan McGovern
15575fb280 test: marked tst_qtcpsocket autotest as unstable
Task-number: QTBUG-21043
Change-Id: Idefb79bf64eb746e82ebf2980c628f2e37dcf6c3
Reviewed-on: http://codereview.qt.nokia.com/3279
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Keith Isdale <keith.isdale@nokia.com>
2011-08-22 06:07:31 +02:00
Sergio Ahumada
f98525e9a4 test: Fix `tst_qfiledialog' in a namespaced build
Reviewed-by: Pierre Rossi

(cherry picked from commit 3be7f871f07041477b5bca0182623b36afd2b3e6)

Change-Id: Ib24d837ef8f47435cc0a505233e77f1104537cae
Reviewed-on: http://codereview.qt.nokia.com/3263
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-08-19 19:54:49 +02:00
Lars Knoll
f4f1b53b96 Move printing into it's own library
Create a libQtPrintSupport library that contains our current
printing infrastructure. Long term this will get replaced
with a libQtPrint, as the current architecture is not
really maintainable.

Change-Id: I7362fff6786b58c5b4e9213c23eda36d15048aa2
Reviewed-on: http://codereview.qt.nokia.com/3209
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-08-19 09:16:42 +02:00
Frederik Gladhorn
b5dbd1373b Implement text interface for QLineEdit.
Add boundary helper functions to the QAccessibleTextInterface.
Move LineEdit over to use QTextBoundaryFinder.

Reviewed-by: Jan-Arve
(cherry picked from commit c1ec1a95806cda54d5b4e9f8ed159a611bd75964)

Change-Id: Ib93599c49110aab50debe1e3fb0073dd34071c87
Reviewed-on: http://codereview.qt.nokia.com/3025
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-08-18 20:12:15 +02:00
Frederik Gladhorn
3cea6b22a6 Add DBus VirtualObject to handle multiple paths.
When a virtual object is registered with the SubPath option
it will handle all dbus calls to itself and all child paths.
It needs to reimplement handleMessage for that purpose.

Introspection needs to be implemented manually in the introspect function.

Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
(cherry picked from commit b07919b3de8cff3e44b7271062372b14bcda5b83)
(cherry picked from commit 997c2dfed7a04da2fac577f1c29b89bda4939e2d)
(cherry picked from commit c676b7095d826dc2d006f52a4b234546af5e2137)

Change-Id: I003007604b286af8000959756ce9d25c17306f5b
Reviewed-on: http://codereview.qt.nokia.com/3051
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-08-18 17:59:18 +02:00
Rohan McGovern
8d16fcb912 test: marked tst_qfocusevent as insignificant on all platforms
This was known to be unstable on mac, but appears to be unstable on
Linux also.

Task-number: QTBUG-20987
Change-Id: I760533c32cf13d24f8428f120813eb590b202182
Reviewed-on: http://codereview.qt.nokia.com/3131
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2011-08-18 08:05:38 +02:00
Rohan McGovern
06bfd1feda test: fixed failure of tst_qstylesheetstyle on qpa
Wait for window shown on _all_ platforms, not just X11.

QEXPECT_FAIL a test which relies on QCursor::setPos, which is currently
unimplemented for qpa (QTBUG-20753).

Change-Id: I72412476afc7e52ccb6cab4306ff791b7e7d8d93
Reviewed-on: http://codereview.qt.nokia.com/3118
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2011-08-18 08:05:38 +02:00
Rohan McGovern
06657ea84b test: fixed tst_qeventloop and removed CONFIG+=insignificant_test
Throwing C++ exceptions through the event loop doesn't work if the Glib
event loop is used, so conditionally skip that part of the test.

Change-Id: Ic27ebf4eb75bd1cf7c7e35f371f29bcfc0e1844a
Reviewed-on: http://codereview.qt.nokia.com/2471
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-08-18 08:05:38 +02:00
Rohan McGovern
66fbd24849 test: skipped unstable portion of tst_qcssparser on qpa
This test unstably fails because font lookup is somewhat broken for qpa.

Task-number: QTBUG-20986
Change-Id: Id4ebd35e979d8837d32b58e5ed9c1df3ac15827a
Reviewed-on: http://codereview.qt.nokia.com/3130
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2011-08-18 08:05:38 +02:00
Rohan McGovern
0c9bd28298 test: mark tst_qrawfont as expected failure on qpa
The necessary font handling code for qrawfont currently seems to be
unimplemented for all qpa backends.

Task-number: QTBUG-20976
Change-Id: I2b5c511936892e2754c0ee809b7a558f44d1d132
Reviewed-on: http://codereview.qt.nokia.com/3116
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2011-08-18 08:05:38 +02:00
Rohan McGovern
3817a82ebd test: fixed XPASS from tst_qstatictext on qpa
These tests were written to compare two different methods of drawing
text, to ensure the result was the same.  However, if _both_ methods
turned out to be complete no-ops, the test would unexpectedly pass, as
it never verified that anything was painted.  Add additional
verification steps and QEXPECT_FAIL them on qpa for now.

Task-number: QTBUG-20977

Change-Id: I1ce1b7c2bcd683fc9eeaeb8d1483268e56f5cf08
Reviewed-on: http://codereview.qt.nokia.com/3117
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2011-08-18 08:05:38 +02:00
Rohan McGovern
1ed19b09ce test: mark tst_qsystemtrayicon as expected failure for qpa
QSystemTrayIcon is unimplemented for qpa.

Task-number: QTBUG-20978
Change-Id: I63703b96e3d4572bae722120774de1565d475414
Reviewed-on: http://codereview.qt.nokia.com/3119
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2011-08-18 08:05:38 +02:00
Rohan McGovern
7789b872da test: mark tst_qtextlayout as insignificant for qpa, xcb
This autotest segfaults in this configuration.

Task-number: QTBUG-20979
Change-Id: I7f038416d9333b690695f48e4ad01d52767f45cd
Reviewed-on: http://codereview.qt.nokia.com/3120
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2011-08-18 08:05:38 +02:00