qt:qt.git
11 years agoFixed license header.
Rohan McGovern [Fri, 13 May 2011 04:10:29 +0000 (14:10 +1000)]
Fixed license header.

11 years agoEnsure that recursive QMAKE_EXTRA_TARGETS use the correct makefile
Rohan McGovern [Thu, 12 May 2011 07:45:55 +0000 (17:45 +1000)]
Ensure that recursive QMAKE_EXTRA_TARGETS use the correct makefile

Recursive QMAKE_EXTRA_TARGETS were omitting the `-f' option to make.
This would break in the case where the correct makefile was not named
`Makefile'.  The included autotest demonstrates the problem.

Note that this was fixed for normal targets back in 2005
by faac7bd178654fd67a6f3f9cf4f6f2605071448d (p4 202370), but was not
fixed for extra targets.

Reviewed-by: ossi
11 years agoRemove Q_ASSERT's from qsharedmemory autotest
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
11 years agoRemove Q_ASSERT's from QNetworkReply autotest
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
11 years agoRemove Q_ASSERT's from qabstractxmlnodemodel test
Jason McDonald [Tue, 10 May 2011 03:30:56 +0000 (13:30 +1000)]
Remove Q_ASSERT's from qabstractxmlnodemodel test

Report fatal errors rather than ignoring the errors in non-debug builds.

Change-Id: I5d2f20113cbca11e272cf8fc2591e38b94d6853b
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT from QXmlStream autotest
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
11 years agoRemove Q_ASSERT from qxmlquery autotest
Jason McDonald [Mon, 9 May 2011 07:40:30 +0000 (17:40 +1000)]
Remove Q_ASSERT from qxmlquery autotest

Report fatal error in all builds not just debug builds.

Change-Id: I6c64435d0382a160ac3602e5243fad9d9585f057
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from QXmlStream autotest
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
11 years agoRemove Q_ASSERT from QItemModel autotest
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
11 years agoRemove Q_ASSERT's from qxmlquery autotest
Jason McDonald [Mon, 9 May 2011 07:45:52 +0000 (17:45 +1000)]
Remove Q_ASSERT's from qxmlquery autotest

Make url validity check part of the regular test logic rather than
aborting in debug builds and ignoring the error in release builds.

Change-Id: Ic00610c04ee596f519b9d461748b401719cf41c0
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT from qxmlquery autotest
Jason McDonald [Mon, 9 May 2011 08:21:18 +0000 (18:21 +1000)]
Remove Q_ASSERT from qxmlquery autotest

Make stream validity check part of the regular test logic rather than
aborting in debug builds and ignoring the error in release builds.

Change-Id: I07dcba079eecd88bf16672c6019a8d6f5a829fee
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from QXmlStream autotest
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
11 years agoRemove Q_ASSERT from qabstractxmlnodemodel test
Jason McDonald [Fri, 6 May 2011 04:16:48 +0000 (14:16 +1000)]
Remove Q_ASSERT from qabstractxmlnodemodel test

If new "axis" enum values are added in the future, the test should
report a meaningful warning in the test output rather than aborting with
a meaningless message in debug builds and failing silently in release
builds.

Change-Id: Ifdc7a9492c3ee196d7f0e6958eec34693efd244f
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT from qscriptvaluegenerated test
Jason McDonald [Mon, 9 May 2011 05:13:15 +0000 (15:13 +1000)]
Remove Q_ASSERT from qscriptvaluegenerated test

Report a fatal error if an unknown type of comparison is requested
rather than failing silently in non-debug builds.  Also fixes the
misspelled parameter name.

Change-Id: I84bd018aa99e99a98d97c43343032b38ca9cbccb
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT from QVariant autotest
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
11 years agoRemove Q_ASSERT's from QTreeView autotest
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
11 years agoRemove Q_ASSERT from qtesselator autotest
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
11 years agoRemove unused function from qtessellator autotest
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
11 years agoRemove Q_ASSERT from qscriptvaluegenerated test
Jason McDonald [Mon, 9 May 2011 05:38:42 +0000 (15:38 +1000)]
Remove Q_ASSERT from qscriptvaluegenerated test

Report a fatal error if an empty test is generated rather than failing
silently in non-debug builds.

Change-Id: I79aa7a9eb09e387cef1960816a4bcce7b1af282d
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from qscriptvaluegenerated test
Jason McDonald [Mon, 9 May 2011 05:36:04 +0000 (15:36 +1000)]
Remove Q_ASSERT's from qscriptvaluegenerated test

Report a fatal error if there are problems reading from the input data
stream rather than failing silently in non-debug builds.

Change-Id: I7a913bf47dccb37bab09e1cd79e5022b04e42c27
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from V8 autotest
Jason McDonald [Mon, 9 May 2011 05:02:54 +0000 (15:02 +1000)]
Remove Q_ASSERT's from V8 autotest

Report a fatal error when the realFail() function is missing or
misbehaving rather than silently ignoring the failure in non-debug
builds.

Change-Id: I8b27aeb1c9dab5752a5dbedafc4d420bb4121d2b
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT from qscriptengine autotest
Jason McDonald [Mon, 9 May 2011 04:52:46 +0000 (14:52 +1000)]
Remove Q_ASSERT from qscriptengine autotest

Rather than aborting in debug builds and failing silently in release
builds, output a meaningful warning message and return a null
QScriptValue which will cause the "isQObject" check in the testfunction
to fail.

Change-Id: I69fd9c15a69924d0abfde6710ea6ae4bf7e013fa
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from qreadwritelock autotest
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
11 years agoRemove Q_ASSERT's from QObject autotest
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
11 years agoRemove Q_ASSERT's from QObject autotest
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
11 years agoRemove Q_ASSERT's from QNetworkReply autotest
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
11 years agoRemove Q_ASSERT from qitemmodel autotest
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
11 years agoRemove Q_ASSERT's from QMutex autotest
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
11 years agoRemove Q_ASSERT from QMetaType autotest
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
11 years agoRemove Q_ASSERT's in qitemview autotest
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
11 years agoRemove Q_ASSERT from qitemmodel autotest
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
11 years agoRemove Q_ASSERT from algorithms autotest
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
11 years agoRemove Q_ASSERT from qabstractxmlnodemodel test
Jason McDonald [Fri, 6 May 2011 04:08:10 +0000 (14:08 +1000)]
Remove Q_ASSERT from qabstractxmlnodemodel test

Instead of aborting in debug builds and failing silently in release
builds, print a meaningful warning message into the test output and
return a null QVariant.

Change-Id: Idcd70f5cb01528b522d84e391f6f8692a189f420
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT from qabstractxmlnodemodel test
Jason McDonald [Fri, 6 May 2011 04:00:00 +0000 (14:00 +1000)]
Remove Q_ASSERT from qabstractxmlnodemodel test

Rather than aborting in a debug build and failing silently in a release
build, report a warning and return a null model index if the first
(root) node of the model is not a document.  The null return value will
cause initTestCase() to fail gracefully.

Change-Id: I15e9456929bbb3f0bd50d30333c49143b6f0aad7
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT from qabstractxmlnodemodel test
Jason McDonald [Fri, 6 May 2011 03:51:20 +0000 (13:51 +1000)]
Remove Q_ASSERT from qabstractxmlnodemodel test

Instead of aborting in a debug build and failing silently in a release
build when the internal state of the model is incorrect, report a
meaningful fatal error in all builds.

Change-Id: I64ca4dde070cb7fbe69684a36092d53e5b84d80a
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT from qabstractxmlnodemodel test
Jason McDonald [Fri, 6 May 2011 03:35:14 +0000 (13:35 +1000)]
Remove Q_ASSERT from qabstractxmlnodemodel test

Constructing a model index from a null pointer will cause the test to
crash later.  Instead of crashing this way in a release build and
aborting in a debug build, report the fatal error in all builds.

Change-Id: I43ce4c8fa48caa05aaf09ac3c1453d35a2de65bf
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from qabstractfileengine test
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
11 years agoRemove Q_ASSERT's from modeltest
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
11 years agoRemove Q_ASSERT from modeltest
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
11 years agoRemove Q_ASSERT from qabstractxmlnodemodel test
Jason McDonald [Thu, 5 May 2011 07:36:59 +0000 (17:36 +1000)]
Remove Q_ASSERT from qabstractxmlnodemodel test

When no content can be loaded to create the model, return a null model
(which will make the test fail gracefully) rather than aborting in a
debug build and failing silently in a release build.

Change-Id: I28f0bb92c617c8dafd1089d0b3dafcfef0c0da53
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from modeltest
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
11 years agoRemove Q_ASSERT's from QAbstractFileEngine autotest
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
11 years agoFix compiler warnings in qabstractxmlnodemodel test
Jason McDonald [Thu, 5 May 2011 08:42:32 +0000 (18:42 +1000)]
Fix compiler warnings in qabstractxmlnodemodel test

The first parameter to qWarning() should be a format string to avoid
problems caused by the data string containing format specifiers.

Change-Id: Ib40c0dcd766203fc41182a50680733fff9035045
Reviewed-by: Rohan McGovern
11 years agoFix compile error.
Jason McDonald [Thu, 5 May 2011 05:15:03 +0000 (15:15 +1000)]
Fix compile error.

The previous change to tst_qscriptv8testsuite.cpp introduced a compile
error due to insufficient parameters to QTest::qVerify().

Change-Id: I9ea9462d830b9d796676947a3598e3c066b29180
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from QTextEdit autotest
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
11 years agoRemove Q_ASSERT's from large file autotest.
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
11 years agoRemove Q_ASSERT from QMutex autotest
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
11 years agoRemove Q_ASSERT from qtesselator autotest
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
11 years agoRemove Q_ASSERT's from exceptionsafety_objects test
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
11 years agoRemove Q_ASSERT in gestures autotest
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
11 years agoRemove Q_ASSERT's from QTreeView autotest
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
11 years agoRemove Q_ASSERT from qtesselator autotest
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
11 years agoRemove Q_ASSERT's from QScriptable autotest
Jason McDonald [Tue, 3 May 2011 02:06:09 +0000 (12:06 +1000)]
Remove Q_ASSERT's from QScriptable autotest

The helper class expects a valid script engine to be available and
attempted to verify this with Q_ASSERT (which does nothing in release
mode) and QVERIFY (which should only be used directly in test
functions).  This commit makes the helper class avoid using an invalid
engine and catches the problem later by verifying that the last script
engine used by the scriptable class was valid.

Change-Id: I849df32b141b7801b9b5a92f44ff325397e32f2d
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove mention of Q_ASSERT in QTableView test.
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
11 years agoRemove Q_ASSERT's from QXmlStream autotest.
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
11 years agoRemove Q_ASSERT from qdeclarativexmllistmodel test
Jason McDonald [Wed, 4 May 2011 02:54:10 +0000 (12:54 +1000)]
Remove Q_ASSERT from qdeclarativexmllistmodel test

Report a meaningful warning in all builds rather than aborting in debug
builds and doing nothing in release builds.

Change-Id: I14aa7bc8699f5307e1ec34b18006b9fbbd8aca8e
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from ecmascript test.
Jason McDonald [Wed, 4 May 2011 02:26:59 +0000 (12:26 +1000)]
Remove Q_ASSERT's from ecmascript test.

These Q_ASSERT's were redundant as the test functions that call these
functions already verify that "value == 0".

Change-Id: Ic23e539c5814153d67fea8156ade0783f91d7b83
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from xmlpatterns autotest
Jason McDonald [Wed, 4 May 2011 01:17:49 +0000 (11:17 +1000)]
Remove Q_ASSERT's from xmlpatterns autotest

Verify initial state in initTestCase() rather than asserting in the
test class's constructor.

Change-Id: Ic7612a5368e35b2abda96828d2a95690baeaf6a9
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from qtestlib selftests
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
11 years agoRemove unused code from QXmlStream autotest
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
11 years agoRemove Q_ASSERT from qxmlsimplereader autotest
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
11 years agoRemove Q_ASSERT from QXmlInputSource autotest
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
11 years agoRemove Q_ASSERT from QLibrary autotest
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
11 years agoRemove Q_ASSERT from QSharedPointer autotest
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
11 years agoRemove Q_ASSERT from QThread autotest
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
11 years agoRemove Q_ASSERT's from QWizard autotest
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
11 years agoRemove mention of Q_ASSERT in comments
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
11 years agoRemove Q_ASSERT's from QVariant autotest.
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
11 years agoRemove Q_ASSERT from QTextOdfWriter autotest
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
11 years agoRemove Q_ASSERT from qtesselator autotest
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
11 years agoRemove Q_ASSERT from qsslsocket autotest.
Jason McDonald [Tue, 3 May 2011 04:45:59 +0000 (14:45 +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
11 years agoRemove Q_ASSERT's from qsharedpointer autotest
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
11 years agoRemove Q_ASSERT from V8 autotest
Jason McDonald [Tue, 3 May 2011 02:51:47 +0000 (12:51 +1000)]
Remove Q_ASSERT from V8 autotest

Replace Q_ASSERT with QTest::qVerify, in line with the rest of this test
function.

Change-Id: Ia39e62efb9945f72a6a93fddddf36488cd456965
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from qscriptclass autotest
Jason McDonald [Tue, 3 May 2011 02:43:15 +0000 (12:43 +1000)]
Remove Q_ASSERT's from qscriptclass autotest

Allow the extension() function to return a null QVariant, which will
cause the test to fail gracefully.

Change-Id: Ide9ef69c48f4bdd5a000f525fe9f395c27854da9
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERT's from QObject autotest.
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
11 years agoRemove Q_ASSERT's from QMetaType autotest.
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
11 years agoRemove Q_ASSERT from QMetaObject autotest.
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
11 years agoChange Q_ASSERT to QVERIFY in QMenu test.
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
11 years agoRemove Q_ASSERT from qitemview autotest
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

11 years agoRemove Q_ASSERT from qitemmodel autotest
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
11 years agoRemove mention of Q_ASSERT from qheaderview autotest
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
11 years agoRemove dead code from qgraphicsgridlayout autotest
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
11 years agoRemove Q_ASSERT from qgraphicsanchorlayout test
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
11 years agoRemove dead code from qscriptenginedebugger test
Jason McDonald [Wed, 27 Apr 2011 06:41:16 +0000 (16:41 +1000)]
Remove dead code from qscriptenginedebugger test

Remove code made obsolete by 2d1839e850ac632a13ff0ac3096d8419bff5082d.

Change-Id: Ic889c81f0507eb91028fa6b6c4cbf6ae71a728b0
Reviewed-by: Rohan McGovern
11 years agoRemove Q_ASSERTs from qgraphicsanchorlayout1 test
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
11 years agoOnly ignore warning when it can actually be produced.
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
11 years agoUse meaningful variable names
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
11 years agoFix logic error in large file autotest
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
11 years agoRemove Q_ASSERT from QDom autotest
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
11 years agoRemove Q_ASSERT from datetimeedit autotest
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
11 years agoRemove Q_ASSERT from qcopchannel autotest
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
11 years agoRemove Q_ASSERT from QCompleter autotest
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
11 years agoOnly ignore warning when it can actually be produced.
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
11 years agoRemove Q_ASSERT from qcompleter autotest.
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
11 years agoRemove Q_ASSERT from qatomicint/pointer autotests
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
11 years agoFix remaining warnings in accessibility autotest
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
11 years agoIgnore expected warning in accessibility autotest
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
11 years agoIf accessibility isn't built, don't try to test it
Jason McDonald [Tue, 19 Apr 2011 05:31:09 +0000 (15:31 +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
11 years agoRemove unused function.
Jason McDonald [Tue, 19 Apr 2011 04:09:44 +0000 (14:09 +1000)]
Remove unused function.

Change-Id: I197ca88e04a68dca0ea819d6e335a02607e597aa
Reviewed-by: Trust Me
11 years agoRemove Q_ASSERT from accessibility autotest
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