Olivier Goffart [Fri, 6 May 2011 11:13:42 +0000 (13:13 +0200)]
QT_USE_QSTRINGBUILDER to fix source compatibility
In 4.8 we added support for using StringBuilder with QByteArray.
But this is breaking source compatibility for people that used
QT_USE_FAST_OPERATOR_PLUS in Qt 4.7. So we introduce a new macro
Notice that QT_USE_FAST_CONCATENATION was not working without
QT_USE_FAST_OPERATOR_PLUS, so we remove the checking of that macro.
Reviewed-by: joao
(cherry picked from commit
8447f5616be731d78081f326bb9cb3f5aa9087a4)
Eskil Abrahamsen Blomfeldt [Wed, 18 May 2011 10:16:33 +0000 (12:16 +0200)]
Fix broken drawing with large fonts using QStaticText and FreeType
In FreeType, there's a fall back to QFontEngine::alphaMapForGlyph()
when the fonts are very large. Since this uses a QPainterPath containing
an unhinted glyph, the use of hinted metrics would sometimes lead to
the glyphs being clipped because they would be positioned slightly
outside the image they were painted into. When outline drawing is on,
it makes sense to return unhinted metrics, since the glyphs we will
actually use are unhinted.
Task-number: QTBUG-19067
Reviewed-by: Jiang Jiang
Jason McDonald [Wed, 18 May 2011 02:04:14 +0000 (12:04 +1000)]
Remove Q_ASSERT's from qdbustype autotest
Change-Id: I276750d8acda3744ee8a9c424b2da0a08e8c7461
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
Jason McDonald [Tue, 17 May 2011 03:43:30 +0000 (13:43 +1000)]
Remove autotest code for Qt3Support library.
This commit deals with the simple cases -- mostly just removing blocks
of code enclosed in #ifdef QT3_SUPPORT. Later commits will deal with
the trickier cases.
Change-Id: I280dea25b3754be175efe62fc7e5e4e7c304e658
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
Qt Continuous Integration System [Wed, 18 May 2011 01:39:26 +0000 (11:39 +1000)]
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Make QDataStream test compile and re-enable it
Jason McDonald [Tue, 17 May 2011 08:09:34 +0000 (18:09 +1000)]
Make QDataStream test compile and re-enable it
This test can't use svg files as QtSvg is a separate module, on which
qtbase does not depend. This commit changes the test to use a pixmap
that was already present in the test.
Change-Id: Iab4ce70aa376a7d2985b69816bd251ce4f5d46cf
Task-number: QTBUG-19244
Reviewed-by: Rohan McGovern
Qt Continuous Integration System [Wed, 18 May 2011 01:03:00 +0000 (11:03 +1000)]
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging: (84 commits)
Reduce usage of Q_ASSERT in autotests.
Fixed license header.
Remove Q_ASSERT's from qsharedmemory autotest
Remove Q_ASSERT's from QNetworkReply autotest
Remove Q_ASSERT from QXmlStream autotest
Remove Q_ASSERT's from QXmlStream autotest
Remove Q_ASSERT from QItemModel autotest
Remove Q_ASSERT's from QXmlStream autotest
Remove Q_ASSERT from QVariant autotest
Remove Q_ASSERT's from QTreeView autotest
Remove Q_ASSERT from qtesselator autotest
Remove unused function from qtessellator autotest
Remove Q_ASSERT's from qreadwritelock autotest
Remove Q_ASSERT's from QObject autotest
Remove Q_ASSERT's from QObject autotest
Remove Q_ASSERT's from QNetworkReply autotest
Remove Q_ASSERT from qitemmodel autotest
Remove Q_ASSERT's from QMutex autotest
Remove Q_ASSERT from QMetaType autotest
Remove Q_ASSERT's in qitemview autotest
...
Rohan McGovern [Wed, 18 May 2011 00:44:47 +0000 (10:44 +1000)]
Reduce usage of Q_ASSERT in autotests.
Using Q_ASSERT does nothing in release-mode builds, and in debug builds
it causes tests to terminate prematurely. It is much better to use
QVERIFY or QCOMPARE.
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
3475168550c1a804f04f2a4edfeb30c04cd36551)
Change-Id: Ic39972b685ca35a9a71d9c8d03e8dae31481fb19
Rohan McGovern [Fri, 13 May 2011 04:10:29 +0000 (14:10 +1000)]
Fixed license header.
(cherry picked from commit
2caea6081fc46217636f0ab70d09891efd2d2864)
Change-Id: I086c8cb2d0ccc691d8af68804132f048bee7fa4b
Jason McDonald [Wed, 11 May 2011 02:00:40 +0000 (12:00 +1000)]
Remove Q_ASSERT's from qsharedmemory autotest
Report a fatal error rather than ignoring the error in non-debug builds.
Change-Id: Ib6ef993e6e0c65bd9adea994ea7b454cc147f3d4
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
637456edef085d1825f15429cd921f2f0d4bd6a2)
Jason McDonald [Mon, 9 May 2011 02:18:50 +0000 (12:18 +1000)]
Remove Q_ASSERT's from QNetworkReply autotest
Rather than aborting in debug builds and failing mysteriously in release
builds, report fatal errors in all builds.
Change-Id: I020b06e19b7ffc8ae4413e1756259f4ca608f253
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
bbfefe1b764cd41b7e677f26621fb6e76a67f9d7)
Jason McDonald [Tue, 10 May 2011 03:19:25 +0000 (13:19 +1000)]
Remove Q_ASSERT from QXmlStream autotest
Report a meaningful fatal error if an unknown token type is encountered
rather than ignoring the error in non-debug builds and reporting an
uninformative message in debug builds.
Change-Id: Id219f3c7cbd4ba3e9875cb81f833720d5d153132
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
1c85fc559ee456a165527d23cb1b7dc237f5504b)
Jason McDonald [Tue, 10 May 2011 01:43:08 +0000 (11:43 +1000)]
Remove Q_ASSERT's from QXmlStream autotest
Report fatal errors rather than ignoring them in non-debug builds.
Change-Id: I62dd177e2f391e64c12314bf224f8952ed6f3144
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
4793c3bd1dfddcc98eae12e5caf29ff6aabd31b2)
Jason McDonald [Tue, 10 May 2011 01:48:36 +0000 (11:48 +1000)]
Remove Q_ASSERT from QItemModel autotest
If populateTestData() would return an invalid model index, report a
meaningful fatal error rather than failing silently in a release build
and aborting with an uninformative error message in a debug build.
Change-Id: I96820429a25ce5c4eb375d50e7e1f672851e26e6
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
984a72a8bbf853059f0eb7e1054538b48d5f3bc8)
Jason McDonald [Tue, 10 May 2011 01:33:37 +0000 (11:33 +1000)]
Remove Q_ASSERT's from QXmlStream autotest
Report fatal errors rather than ignoring them in non-debug builds.
Change-Id: Ieafc58f3603fa953f4a963394039e613dcd442fb
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
6e3fcd6ff50e6435fd90629ed695196d25312ffc)
Jason McDonald [Mon, 9 May 2011 07:34:45 +0000 (17:34 +1000)]
Remove Q_ASSERT from QVariant autotest
I missed one Q_ASSERT in the previous commit. Also changing to use
Q_FUNC_INFO instead of hard-coded function names in the warning
messages.
Change-Id: I0ff5b2b2cda02597836beb5d2811fa8dd2a344ab
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
74a4aad171b39018d596b99684286b9426a091a5)
Jason McDonald [Mon, 9 May 2011 07:14:39 +0000 (17:14 +1000)]
Remove Q_ASSERT's from QTreeView autotest
Report fatal errors instead of failing silently in non-debug builds.
Change-Id: Ieaff30b71dba2a385a5fffc93d2a8c0f5864aa18
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
e12b912de89088a307c3519a01198a5314b8dd1a)
Jason McDonald [Mon, 9 May 2011 05:53:13 +0000 (15:53 +1000)]
Remove Q_ASSERT from qtesselator autotest
Report a fatal error rather than failing silently in non-debug builds.
Change-Id: I625c5aa6f86a5764cd8f078baa074d6475a67736
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
c0c7e04c9248ce38278aceefeb527f29149cfb4e)
Jason McDonald [Mon, 9 May 2011 05:47:20 +0000 (15:47 +1000)]
Remove unused function from qtessellator autotest
Change-Id: I24c1db8392370d19970421a014f7bb6c4bc7c6e8
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
224050aae75fd5b1d6c57909d894a3eba7ac43fc)
Jason McDonald [Mon, 9 May 2011 03:46:32 +0000 (13:46 +1000)]
Remove Q_ASSERT's from qreadwritelock autotest
The tryWriteLock testfunction didn't do anything useful in non-debug
builds, due to the thread having the important code inside Q_ASSERT's,
which are no-ops in non-debug builds. This commit removes the
Q_ASSERT's, counts the number of failures in the thread and fails the
test if there are any failures recorded.
Change-Id: I4750f66eeba22ab51ba348ebc06704052421f1ae
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
00f724c943b83f10f9ca9475570708536947538e)
Jason McDonald [Mon, 9 May 2011 03:16:39 +0000 (13:16 +1000)]
Remove Q_ASSERT's from QObject autotest
Rather than aborting in debug builds and failing silently in release
builds, report a fatal error in all builds if the helper class
methods are called more than once.
Change-Id: Id1fda8dc7caf008bbc8f6ae6384abee1aa8f50eb
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
0c157af3e5aa7c56c53b9eabe1510cc639610969)
Jason McDonald [Mon, 9 May 2011 03:01:40 +0000 (13:01 +1000)]
Remove Q_ASSERT's from QObject autotest
Rather than aborting in debug builds and failing silently in release
builds, report a meaningful fatal error in all builds.
Change-Id: I3b874f187d482e9785a839cab1a3855b631404c3
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
844906474dd6905d36003143a03a2fbccf0ad0dd)
Jason McDonald [Mon, 9 May 2011 01:50:23 +0000 (11:50 +1000)]
Remove Q_ASSERT's from QNetworkReply autotest
Rather than aborting in debug builds and ignoring the failure in release
builds, report a fatal error in all builds.
Change-Id: I1fb8e692c65cf23cf5d2453173db742260ddca48
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
136f39bbb63706819eb18d000f305edbe1cc6a81)
Jason McDonald [Fri, 6 May 2011 05:12:03 +0000 (15:12 +1000)]
Remove Q_ASSERT from qitemmodel autotest
Don't perform actions needed for the test inside Q_ASSERT, because these
actions won't happen in a non-debug build.
Change-Id: I0758e9f29f38c1a83a1501357286877f05beb6c8
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
b7d421da6d5e945b74ffbc3a7aa635a6ce63ebda)
Jason McDonald [Fri, 6 May 2011 06:55:31 +0000 (16:55 +1000)]
Remove Q_ASSERT's from QMutex autotest
Don't perform actions needed for the test inside Q_ASSERT, because these
actions won't happen in a non-debug build. Instead count the number of
failures and verify that the count is zero at the end of the test.
Change-Id: Ibe0d194111e5247118d59a7760f0946d2c44faf9
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
8d2127d44e6c8af6b041688376de0e5747a1810a)
Jason McDonald [Fri, 6 May 2011 06:34:15 +0000 (16:34 +1000)]
Remove Q_ASSERT from QMetaType autotest
Replace Q_ASSERT in helper class with code to count failures and report
meaningful warnings. The test function then fails the test if any
failures were recorded.
Change-Id: I0d6650e6036c8e45729c16d1dbb7543b4fb42553
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
8512dc16553ecf511c40a2ba7a815f777d7d5c59)
Jason McDonald [Fri, 6 May 2011 06:22:25 +0000 (16:22 +1000)]
Remove Q_ASSERT's in qitemview autotest
Rather than aborting in debug builds and failing silently in release
builds, report a meaningful warning message and return an appropriate
value to indicate the error.
Change-Id: I0ceb0a0bfaef34cc6127d768cc75ecfc5a24e3c9
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
7cb0a3baeb361c9909e8ab2caf436e8e44b6a3b6)
Jason McDonald [Fri, 6 May 2011 05:22:07 +0000 (15:22 +1000)]
Remove Q_ASSERT from qitemmodel autotest
If populateTestData() is passed an unknown type of model, report a
meaningful fatal error rather than failing silently in a release build
and aborting with an uninformative error message in a debug build.
Change-Id: I7ee8d1262bbced304f9f24c2ec9b40a38704d982
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
6b2e89843a573cd7c143bca17cec8e69209d2fbd)
Jason McDonald [Fri, 6 May 2011 04:43:03 +0000 (14:43 +1000)]
Remove Q_ASSERT from algorithms autotest
Report a meaningful warning message rather than aborting in a debug
build and failing silently in a release build.
Change-Id: Ic77589143ff0d22c95c7b10f2e511f68b3da4d86
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
75767c69fbba3149a4505287ed441886188a9fd3)
Jason McDonald [Fri, 6 May 2011 03:12:10 +0000 (13:12 +1000)]
Remove Q_ASSERT's from qabstractfileengine test
Rather than aborting in debug builds and failing silently in release
builds, report a meaningful warning message and skip setting the
filename, which should cause a subsequent test failure.
Change-Id: I3ae4f4de7b02bf2194019047fa87d8ae06d95634
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
e6f7509f18ae88069373d59073cbdcda88fd19c8)
Jason McDonald [Thu, 5 May 2011 01:58:24 +0000 (11:58 +1000)]
Remove Q_ASSERT's from modeltest
Rather than aborting in debug builds and ignoring the failures in
release builds, report specific warnings on each failure, count the
failures, and fail the test if the failure counts are non-zero at the
end of the test.
The same change is also made for a QCOMPARE that appeared
inappropriately inside a helper class. QCOMPARE may only appear
directly in a test function.
Change-Id: I81f0ce80512fa72c67f5aa72c0511a4b650d5d20
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
11254ff409395b67cb28453b3c069860bc28c14d)
Jason McDonald [Thu, 5 May 2011 04:04:16 +0000 (14:04 +1000)]
Remove Q_ASSERT from modeltest
Report an informative fatal error if passed a null model, rather than
aborting in a debug build and giving a bunch of signal connection errors
in a release build.
Change-Id: Ia240e741b9d6ec03fd5ed3a14cf4fa44b55af911
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
841cc610df61a266ebcca2bfef2542a7d4fea68d)
Jason McDonald [Thu, 5 May 2011 01:20:56 +0000 (11:20 +1000)]
Remove Q_ASSERT's from modeltest
Report a fatal error in all builds, not just in debug builds.
Change-Id: Ia9e265b2082b55fbac18ca046e586de863ac0623
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
22e99d92a71645d643ebd54c6209bced80f7c5b8)
Jason McDonald [Thu, 5 May 2011 04:40:40 +0000 (14:40 +1000)]
Remove Q_ASSERT's from QAbstractFileEngine autotest
Rather than aborting in debug builds and ignoring failures in release
builds, report meaningful warnings into the test output and return
sentinel values that will cause QVERIFY/QCOMPARE of the returned values
to fail the test.
Change-Id: I2c5a820637337d0762c71db10a4f270d36b31662
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
524bd6b7120f70a178b03bc6d337e08abd327076)
Jason McDonald [Tue, 3 May 2011 05:32:28 +0000 (15:32 +1000)]
Remove Q_ASSERT's from QTextEdit autotest
Convert Q_ASSERT to QCOMPARE and remove mention of Q_ASSERT in comments
to make it easier to check for unwanted Q_ASSERT's in the future.
Change-Id: I7ae250428d4d5682806e724a7207523e65cd9851
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
3290dd0d3563310f6bdbabf74105367bd8c611d3)
Jason McDonald [Tue, 3 May 2011 00:21:32 +0000 (10:21 +1000)]
Remove Q_ASSERT's from large file autotest.
These assertions were made obsolete by the previous change to this test.
Change-Id: I3156b273a727f753a6c093c8fc7453b694c777ee
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
57f6ed6664f55ccee62b81750a2b3520249503fd)
Jason McDonald [Tue, 3 May 2011 01:53:57 +0000 (11:53 +1000)]
Remove Q_ASSERT from QMutex autotest
Rather than aborting in debug mode and doing nothing in release mode
when the invariant is violated, count the failures and fail the test
gracefully.
Change-Id: Ie193460c478ddde540b6b15aafdce32f471b4b2b
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
f18e0e01468899731bc3777649d69fd6d0041012)
Jason McDonald [Tue, 3 May 2011 05:30:33 +0000 (15:30 +1000)]
Remove Q_ASSERT from qtesselator autotest
If the test data is incorrect, print a meaningful warning into the test
output.
Change-Id: Ibfe64ef41a0ff3eb47c2385d1c31191334a675a8
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
28ccfa472991c0480e67b5f204a567c4023ba6d4)
Jason McDonald [Wed, 4 May 2011 06:25:14 +0000 (16:25 +1000)]
Remove Q_ASSERT's from exceptionsafety_objects test
Report a fatal error in all builds, not just in debug builds.
Change-Id: Iad990e2d3b29a55e995254d466e967a4a722bb23
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
a212b402da4b4af9d453fa96dbfa2d32271e857d)
Jason McDonald [Wed, 4 May 2011 06:53:16 +0000 (16:53 +1000)]
Remove Q_ASSERT in gestures autotest
Rather than aborting on a bad gesture event in debug builds and ignoring
the error in release builds, record a count of bad events and fail the
test if the count is non-zero at the end of the test function.
Change-Id: I6ddd46a5a656185c13eae4bbbb496b986a0c92f6
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
5953d930bc07fa6734a11d053d26a3f80e9c1e89)
Jason McDonald [Tue, 3 May 2011 05:55:30 +0000 (15:55 +1000)]
Remove Q_ASSERT's from QTreeView autotest
Issue a meaningful fatal error in preference to aborting in debug mode
builds and crashing in release mode builds.
Change-Id: I7bb04e1e222fd6167be19b5d88caac27b43d88df
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
cb126ff7ad08e9801e2911511aa9aeb728faa8f3)
Jason McDonald [Tue, 3 May 2011 05:03:35 +0000 (15:03 +1000)]
Remove Q_ASSERT from qtesselator autotest
If the test data is incorrect, print a meaningful error message into the
test output.
Change-Id: I505a86b4411619d3c3be9541c96c082f92589ff7
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
8e12d9e322ec7d8f7eece09b6f15cba640615f9e)
Jason McDonald [Tue, 3 May 2011 04:52:57 +0000 (14:52 +1000)]
Remove mention of Q_ASSERT in QTableView test.
Change-Id: If27cb7031cdde222d1dd988188569dca4b1fb6d9
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
324b9db856f00a82d7fd3426d9b698211290efaa)
Jason McDonald [Tue, 3 May 2011 07:37:05 +0000 (17:37 +1000)]
Remove Q_ASSERT's from QXmlStream autotest.
Report a fatal error in all builds rather than only in debug mode
builds.
Change-Id: I6b3a999dd3ccf00ae66a86b43c125d7082cf0ae5
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
c183540c6c244f327ebd834167799072dcc3b72d)
Jason McDonald [Wed, 4 May 2011 00:56:50 +0000 (10:56 +1000)]
Remove Q_ASSERT's from qtestlib selftests
Report a fatal error in all builds rather than just in debug mode
builds.
Change-Id: Ie54e55ea2dd13bbb12e4265278db832ac1297c28
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
8a1279b0ae180fae94d3da1a4eeb20df5a748d33)
Jason McDonald [Tue, 3 May 2011 07:30:43 +0000 (17:30 +1000)]
Remove unused code from QXmlStream autotest
Change-Id: I719e502ef14848a22d41de71245fe6b6758c8d6b
Reviewed-by: Rohan McGovern
(cherry picked from commit
614474fb3d440eabd3ba7e381d246064ce39f4fa)
Jason McDonald [Tue, 3 May 2011 07:16:52 +0000 (17:16 +1000)]
Remove Q_ASSERT from qxmlsimplereader autotest
Verify the success of setting the document content in the test function
rather than using Q_ASSERT.
Change-Id: I25e017e7f92803867a998b4f09ad9f717212a9bc
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
d7453aef14b80a5972909ed99f1b4c765b7436a5)
Jason McDonald [Tue, 3 May 2011 06:39:50 +0000 (16:39 +1000)]
Remove Q_ASSERT from QXmlInputSource autotest
Report a fatal error in all builds rather than aborting in debug mode
builds only.
Change-Id: I53b348f077c6533433e32bbebd159066a2bc2c37
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
4f818b8bcf51cf9c654edbf319d90f6c77a09b3e)
Jason McDonald [Tue, 3 May 2011 06:17:43 +0000 (16:17 +1000)]
Remove Q_ASSERT from QLibrary autotest
Report a regular test failure rather than aborting when an unknown
operation is requested.
Change-Id: I3678f42f9e9f895d8d0d49a768d4c8b575d1863f
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
22aa68ecec96da4d14a4c9fe2f6e4a337b13b4a3)
Jason McDonald [Tue, 3 May 2011 06:14:03 +0000 (16:14 +1000)]
Remove Q_ASSERT from QSharedPointer autotest
Report a meaningful fatal error instead of aborting in debug mode builds
and failing silently in release mode builds.
Change-Id: I0f939dc40810f072a3e24aeba085191793c49ef3
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
b988b2f9f04ac0ebce7a779cd9bd5d394bfa1c95)
Jason McDonald [Tue, 3 May 2011 06:12:05 +0000 (16:12 +1000)]
Remove Q_ASSERT from QThread autotest
Report a meaningful fatal error instead of aborting in debug mode builds
and failing silently in release mode builds.
Change-Id: If9a6c0655e021b3bb6b7d894aefd9bbcc58e4605
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
fed42f25e129af1f4f2c03a075530ad7111d2fdd)
Jason McDonald [Tue, 3 May 2011 06:08:25 +0000 (16:08 +1000)]
Remove Q_ASSERT's from QWizard autotest
Combine the two checking functions (check and checkInvariant) and have
the resulting check function return a bool instead of asserting so that
the test function can QVERIFY and fail gracefully.
Change-Id: Ib069b5424483ba6ffb9caf75036c4f325e9dba51
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
a54900d2227bfb2021c5d1255817824aff11cf32)
Jason McDonald [Tue, 3 May 2011 06:04:31 +0000 (16:04 +1000)]
Remove mention of Q_ASSERT in comments
This will make it easier to check for stray Q_ASSERT's in the future.
Change-Id: I5ddafe1bf26819566460920deae8ff448008c93f
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
b2db13f245f09f1d14af64d2199284c78cbb5b6e)
Jason McDonald [Tue, 3 May 2011 05:58:24 +0000 (15:58 +1000)]
Remove Q_ASSERT's from QVariant autotest.
Print a meaningful warning message instead of aborting in debug
mode builds and failing silently in release mode builds.
Change-Id: I44143c5fbe6b6af87bdf5bd231cfaf9a3c9c33f8
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
a8dc321b6669dd263a25a0cb5766e5b7150c6e20)
Jason McDonald [Tue, 3 May 2011 05:47:55 +0000 (15:47 +1000)]
Remove Q_ASSERT from QTextOdfWriter autotest
If the <dummy> tag can't be found in the data, return an empty string
rather than asserting, so that the test fails gracefully.
Change-Id: I536f08c9c3e942817680849d96d035999d4994db
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
a88dd1c5f62b5ded8ea0d76d185127ef28549c72)
Jason McDonald [Tue, 3 May 2011 04:56:05 +0000 (14:56 +1000)]
Remove Q_ASSERT from qtesselator autotest
If the test data is incorrect, print a meaningful warning into the test
output instead of deferencing an iterator beyond the last element in
the list.
Change-Id: I7be4f282639453de6d8240a2f17253025b415337
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
f01e2a5024db69913aed016e2854b2589ca85080)
Rohan McGovern [Wed, 18 May 2011 00:26:00 +0000 (10:26 +1000)]
Remove Q_ASSERT from qsslsocket autotest.
Make the server thread exit early if the socket is invalid. This will
make the test fail gracefully instead of crashing.
Change-Id: Ia9564c94dd32d65e6e9bdb4a2410f1512409546c
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
b9b3ced2eafe13e491d5af5ad7432733941bfd8d)
Conflicts:
tests/auto/qsslsocket/tst_qsslsocket.cpp
Jason McDonald [Tue, 3 May 2011 02:56:16 +0000 (12:56 +1000)]
Remove Q_ASSERT's from qsharedpointer autotest
Report a meaningful warning message into the test output rather than
aborting in debug mode and doing nothing in release mode.
Change-Id: I6883fccbce0139c763f36f6839bb3452d8f69c1c
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
5b86c4abc676b36d60e6625e89535e7f4907d2b3)
Jason McDonald [Tue, 3 May 2011 01:59:05 +0000 (11:59 +1000)]
Remove Q_ASSERT's from QObject autotest.
The Receiver class has two slots that aren't meant to get called during
the test (they're there to catch broken parsing of slot names). Rather
than asserting when one of them gets called, which does nothing in a
release mode build, this commit makes the slots record the number of
times they were called (as for the other slots in the test) and fails
the test gracefully if either of those slots was called.
Change-Id: Ia0393026cb96ffdc6190b5e7bd951f75d231b11e
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
7bd6ca895e5fa4de197d9d7bf2e7b578c01c3c2a)
Jason McDonald [Tue, 3 May 2011 01:48:40 +0000 (11:48 +1000)]
Remove Q_ASSERT's from QMetaType autotest.
Instead of asserting in debug mode and doing nothing in release mode,
put specific warnings in the test output and fail the test gracefully.
Change-Id: I453a0ab7ddef5b2acf55f77f71a59a940d93ae54
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
a3b2fa3f1beffa7709c11522d4e2db9ec8f952e0)
Jason McDonald [Tue, 3 May 2011 01:44:16 +0000 (11:44 +1000)]
Remove Q_ASSERT from QMetaObject autotest.
Issue a helpful warning rather than ignoring the error in release mode
builds.
Change-Id: Iea7bf4d63f8227abaf7dcf1700c5fef62763afad
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
6f082a3fdd368cd7a969b7f324354583d081da82)
Jason McDonald [Tue, 3 May 2011 01:35:25 +0000 (11:35 +1000)]
Change Q_ASSERT to QVERIFY in QMenu test.
Change-Id: Ifc08d4eabd8565cfd242ec2e70cf597e92f28fe3
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
291f04a4a7be4a975c6b8eaeeed4e0c196e23128)
Jason McDonald [Tue, 3 May 2011 01:25:17 +0000 (11:25 +1000)]
Remove Q_ASSERT from qitemview autotest
Allow createView() to return a null view on failure (which it already
did in release mode builds), but fail the test gracefully instead of
crashing when a null view is returned. Also reordered the code slightly
to put all the QFETCH's together.
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
Change-Id: I3a41c738cb0e4e860db2342b30817a804b20f30d
(cherry picked from commit
51b1d8dc20a2557d2002550b03e5b9f37f425fb4)
Jason McDonald [Tue, 3 May 2011 00:52:52 +0000 (10:52 +1000)]
Remove Q_ASSERT from qitemmodel autotest
Allow createModel() to return a null model on failure (which it already
did in release mode builds), but fail the test gracefully instead of
crashing when a null model is returned.
Change-Id: Iaa0ec31183e0c90fcea512223d01e07ed188a380
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
0d773d839e39f4f4bfd0bf9d652e4f2650adfcb0)
Jason McDonald [Tue, 3 May 2011 00:48:14 +0000 (10:48 +1000)]
Remove mention of Q_ASSERT from qheaderview autotest
Change-Id: I3a97411c0b53345bffbadb60a3e7caabfb0441d2
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
a388e104febb131cd35438bbb1397eeab41d3ab8)
Jason McDonald [Tue, 3 May 2011 00:44:51 +0000 (10:44 +1000)]
Remove dead code from qgraphicsgridlayout autotest
Change-Id: I230d1ec9dfd5df2a0fac161a03090308b7f07a1e
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
012b2d8198b8cfe39a66025334ed9ae2a045a68c)
Jason McDonald [Tue, 3 May 2011 00:38:03 +0000 (10:38 +1000)]
Remove Q_ASSERT from qgraphicsanchorlayout test
Q_ASSERT will only catch a violation of the precondition of the
checkReverseDirection function in a debug build. This commit replaces
the Q_ASSERT with QVERIFY'ing the precondition (that the widget has a
layout) before calling the function.
Change-Id: Ibaa2b52b7d67fa20784e0df022e8c8169da0e50e
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
d1011fc9328fa335bc69a065b29e77ce60608c55)
Jason McDonald [Thu, 21 Apr 2011 05:33:01 +0000 (15:33 +1000)]
Remove Q_ASSERTs from qgraphicsanchorlayout1 test
Sanity-check the test data when using it rather than when creating it.
Change-Id: Ie5d5e1ff3fc439d196096f17cb6f97680927a90c
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
2c64404e2edd3b792b8a1d04c773860d40c04c4c)
Jason McDonald [Thu, 21 Apr 2011 04:49:41 +0000 (14:49 +1000)]
Only ignore warning when it can actually be produced.
Fix regression introduced in
3ca51d87296bcb3098d7de14294fef9294fd5ed4.
The warning is only generated in builds where QT_NO_DEBUG is not
defined *and* the target is not Mac OS X.
Change-Id: I7245f2eab8ea47ab7495fef874b2f8a29186b659
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
60e5ed805af1e11aaec426b823df209b4c895c29)
Jason McDonald [Thu, 21 Apr 2011 03:00:06 +0000 (13:00 +1000)]
Use meaningful variable names
Make the meaning of the code more obvious and avoid a compiler
warning about the variable "w" being overridden.
Change-Id: Ib76d3aa1cae46e263b2ab61b675d9ef74032aacc
Reviewed-by: Rohan McGovern
(cherry picked from commit
59634e825f1efa6f32befc8767cafedfeb9b7d59)
Jason McDonald [Thu, 21 Apr 2011 01:15:35 +0000 (11:15 +1000)]
Fix logic error in large file autotest
The function generating data blocks was filling the block to 16 bytes
short of the blockSize, then appending three 8 byte values, causing the
block to grow 8 bytes beyond blockSize and then truncating it back to
blockSize.
This commit makes the code fill the block to 24 bytes short of the
blockSize, so that the block will always end up at the correct size and
truncation is not needed.
Change-Id: I9fe6e6d6cf7bc445513b53e0a910d205c4c8002f
Reviewed-by: Rohan McGovern
(cherry picked from commit
b1eb564830ff1b754de14919ce5c1547e9758f7c)
Jason McDonald [Wed, 20 Apr 2011 06:27:07 +0000 (16:27 +1000)]
Remove Q_ASSERT from QDom autotest
The Q_ASSERT here should really be a QVERIFY. Expanded the trivial
helper function to make it more obvious what the test does.
Change-Id: Ia6017fe820a83b4d6101e5edcfcb68993eef233a
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
6181805f9ea66b37ee164bd67bdac2ac9d53fb65)
Jason McDonald [Wed, 20 Apr 2011 06:03:42 +0000 (16:03 +1000)]
Remove Q_ASSERT from datetimeedit autotest
The assert and the last four parameters of makeList() are not needed.
The function is always used to make lists of three integers and the data
are all >= 0.
Change-Id: I93ae5a5f541cde2ff61bd9dd21164ed4a9b57403
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
e754832eff8e1a35fc2681ae69b6e3b1ad666ddb)
Jason McDonald [Wed, 20 Apr 2011 05:11:23 +0000 (15:11 +1000)]
Remove Q_ASSERT from qcopchannel autotest
This code would assert in a debug build and potentially crash in a
release build. (The behaviour of QStringList::at() with an out-of-bounds
index is undefined.) This commit makes the program exit with a useful
error message in all builds.
Change-Id: Ia57a2e5693eb25d3eb0b9ba701ed485dfbc1e846
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
5a530f6171a9569d1a35cd8cd1015ec796b048cc)
Jason McDonald [Wed, 20 Apr 2011 02:16:58 +0000 (12:16 +1000)]
Remove Q_ASSERT from QCompleter autotest
If a combobox had no completer, this test would assert in a debug build
and crash in a release build. This commit makes the test report a test
failure and avoid terminating in all builds.
Change-Id: Ib2924412e3d55f10875675cb65079259cd4ef552
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
a5bd4abed834ce3670b2f28d4f932d612a033b36)
Jason McDonald [Wed, 20 Apr 2011 01:39:14 +0000 (11:39 +1000)]
Only ignore warning when it can actually be produced.
Fix regression introduced in
3ca51d87296bcb3098d7de14294fef9294fd5ed4.
The warning is only generated in builds where QT_NO_DEBUG is not
defined.
Change-Id: I9aa3db369094f4046062b5dc1dc694342208ee45
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
67bc4990f7541cca089882a8c3be1b2b8d98cd4c)
Jason McDonald [Wed, 20 Apr 2011 01:05:55 +0000 (11:05 +1000)]
Remove Q_ASSERT from qcompleter autotest.
Replace obscure failure on bad test data in debug builds with an
informative warning in all builds.
Change-Id: I9001820f34de2f78bf296a2f0e095ce73d9ac4bd
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
34c077faae538adc12d4aa28113640570dfc8728)
Jason McDonald [Tue, 19 Apr 2011 08:02:33 +0000 (18:02 +1000)]
Remove Q_ASSERT from qatomicint/pointer autotests
Some code in these tests is not intended to be executed, but rather to
detect compiler warnings. Instead of having an obscure fatal error if
this code is run in a debug build, it now has a clear fatal error if run
in any build.
Change-Id: I1c9d27bb14ebf3313865b68e3e57668ba1d14e25
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
70f42ced8e01ddf0098b143e5804c22d55ebf16f)
Jason McDonald [Tue, 19 Apr 2011 07:15:24 +0000 (17:15 +1000)]
Fix remaining warnings in accessibility autotest
Prevent warnings about unhandled accessibility events by managing object
lifetimes appropriately.
Change-Id: If72a2a6a76527ff746b99634c2d0895354570724
Reviewed-by: Rohan McGovern
(cherry picked from commit
bf1d860143ff40330c6e8f3e2872f2ae812adaa7)
Jason McDonald [Tue, 19 Apr 2011 06:15:57 +0000 (16:15 +1000)]
Ignore expected warning in accessibility autotest
Change-Id: I4b614766d2451dde51ab1207267301a2fe7dd0f6
Reviewed-by: Rohan McGovern
(cherry picked from commit
3ca51d87296bcb3098d7de14294fef9294fd5ed4)
Rohan McGovern [Tue, 17 May 2011 23:58:16 +0000 (09:58 +1000)]
If accessibility isn't built, don't try to test it
Only build the autotest when the feature to be tested is in the Qt
build. This is better than building and running an empty test.
Change-Id: I67721f5f48296afcca64f761d12325f8e040f2d8
Reviewed-by: Rohan McGovern
(cherry picked from commit
cf911bc0d297ed30e615fd115b0d3ae574cb2412)
Conflicts:
tests/auto/qaccessibility/tst_qaccessibility.cpp
Jason McDonald [Tue, 19 Apr 2011 04:09:44 +0000 (14:09 +1000)]
Remove unused function.
Change-Id: I197ca88e04a68dca0ea819d6e335a02607e597aa
Reviewed-by: Trust Me
(cherry picked from commit
1a98c473fbcbb6a9edf1b7e42babbad7d901edb4)
Jason McDonald [Tue, 19 Apr 2011 03:55:05 +0000 (13:55 +1000)]
Remove Q_ASSERT from accessibility autotest
Instead of crashing when we can't get a QAccessibleInterface for a
widget, output a useful warning and return a value that makes the test
fail gracefully.
Change-Id: I0b292cdd8f5a59e26bdc9b0b67cea2b58591df7d
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
d8dc5bfdff25d72e8276c6e80080d72315abe7e0)
Jason McDonald [Tue, 19 Apr 2011 03:39:35 +0000 (13:39 +1000)]
Remove unused functions.
Change-Id: I8cae0550c58238bd99bc759c21b022c54fe2de8b
Reviewed-by: Trust Me
(cherry picked from commit
1191dc0c278ddd22556d6c8e5ea5a898fa7b35f6)
Jason McDonald [Tue, 19 Apr 2011 02:05:59 +0000 (12:05 +1000)]
Remove Q_ASSERT calls from gestures autotest
Make the test report a useful warning, rather than terminating with an
unintelligible assertion failure, if the GestureState enum is ever
extended.
Change-Id: Ib876a5f2986cbea4e181678a83a72e0d1444f1ee
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit
ed5dd84582881bc30a5ce85902b37aae9c243978)
Jason McDonald [Mon, 18 Apr 2011 08:21:03 +0000 (18:21 +1000)]
Cosmetic changes to exceptionsafety_objects test
Sort test data alphabetically and remove excess whitespace.
Change-Id: I0e244efca9e9adbe747a375a28a63f70992ef4f8
Reviewed-by: Trust Me
(cherry picked from commit
10f3f270c8a319205590ae13bdeab063d5216441)
Jason McDonald [Mon, 18 Apr 2011 07:21:03 +0000 (17:21 +1000)]
Don't try to run exceptionsafety_objects test by default on windows.
This test relies on some API specific to MSVC's debug runtime, which is
not always guaranteed to be available.
Change-Id: Ib0ae4694ad51f59198dadfce802f0dfdf0522002
Reviewed-by: Rohan McGovern
(cherry picked from commit
01dfb9ca25bfaec5784f404dcd4bf41bbc2b6fcb)
Jason McDonald [Mon, 18 Apr 2011 05:38:38 +0000 (15:38 +1000)]
Partially re-enable exception safety test
Re-enabling for object types that don't crash the test.
Change-Id: I8c2f0d02171c973bf1ede227d4139b52cac5939f
Reviewed-by: Rohan McGovern
(cherry picked from commit
3788a90338e9328710b9d3335a63fb85ab7d97fc)
Jason McDonald [Mon, 18 Apr 2011 04:27:44 +0000 (14:27 +1000)]
Make test compile in namespaced build.
Change-Id: I824864b8db755a8dc731e3c9de39e3dd7b16224a
Reviewed-by: Rohan McGovern
(cherry picked from commit
ced0a98b5274be6a62ae7e4a0f9fc3161d0e40cb)
Jason McDonald [Mon, 18 Apr 2011 01:11:47 +0000 (11:11 +1000)]
Rename test class.
Fixes warning from tst_maketestselftest about test class name not
matching TARGET.
Change-Id: I7a81d87bb64d2902e842d097248e33eacb388746
Reviewed-by: Rohan McGovern
(cherry picked from commit
069e4441f2e14a82b4ae39601734acb71c909bd9)
Jason McDonald [Fri, 15 Apr 2011 07:35:13 +0000 (17:35 +1000)]
Make tst_exceptionsafety_objects part of the test set.
Re-enable this test, with the two test functions that fail on Linux
disabled until the failures can be diagnosed.
Change-Id: I915e1a0d675cb71a80086e89f9799a4f9f6b600c
Reviewed-by: Rohan McGovern
(cherry picked from commit
ee55dec1efe9c67518bf3e27f81b0696075f7153)
Qt Continuous Integration System [Mon, 16 May 2011 15:15:50 +0000 (01:15 +1000)]
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Compile auto tests.
Bjørn Erik Nilsen [Mon, 16 May 2011 14:59:05 +0000 (16:59 +0200)]
Compile auto tests.
Reviewed-by: mstormo
Qt Continuous Integration System [Mon, 16 May 2011 08:33:46 +0000 (18:33 +1000)]
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
Update configure to enable QtConcurrent for Symbian
Liang Qi [Tue, 19 Apr 2011 05:27:50 +0000 (07:27 +0200)]
Update configure to enable QtConcurrent for Symbian
(cherry picked from commit
5fc99e9f8e3b24c712d1673d3b55afa8c8090cb4)
Qt Continuous Integration System [Mon, 16 May 2011 03:16:12 +0000 (13:16 +1000)]
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
tests: clean up usage of QT_CONFIG to fix circular dependencies
Rohan McGovern [Mon, 16 May 2011 00:43:14 +0000 (10:43 +1000)]
tests: clean up usage of QT_CONFIG to fix circular dependencies
With modularized Qt, using QT_CONFIG is dangerous, because the behavior
changes depending on the order in which modules are qmake'd.
For example, an autotest doing:
contains(QT_CONFIG,svg):QT += svg
...will depend on libQtSvg if (and only if) the autotest is qmake'd
_after_ qtsvg is qmake'd.
This makes the tested functionality unpredictable.
Also, if the above example occurs within qtbase, it causes the test to
sometimes have a circular dependency: if qtsvg is qmake'd before the
test is qmake'd, the test in qtbase depends on qtsvg which depends on
qtbase.
Tests must avoid functionality tests via QT_CONFIG except where all the
tested modules are dependencies of the current module.
Usage of QT_CONFIG with qt3support was entirely removed since Qt5
will not retain qt3support.
Reviewed-by: Jason McDonald
Change-Id: I5a5013b3ec7e1f38fb78864763c9e7586c15e70b
Qt Continuous Integration System [Fri, 13 May 2011 15:53:05 +0000 (01:53 +1000)]
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Removed duplicate setting of QT dependencies
Eckhart Koppen [Fri, 13 May 2011 15:36:12 +0000 (18:36 +0300)]
Removed duplicate setting of QT dependencies
Reviewed-by: TrustMe
Qt Continuous Integration System [Fri, 13 May 2011 14:34:32 +0000 (00:34 +1000)]
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Temporarily changed autotest behaviour to ignore Qt version
Updated version references in autotests
Updated default Qt version to 5.0.0
Removed deprecated functions in QList
Updated Qt and QtBase module version number to 5.0.0
Updated data stream version for Qt 4.9 and 5.0