Commit Graph

305 Commits

Author SHA1 Message Date
Jason McDonald
65feb28928 Don't use Qt3Support in arthur test suite.
Change-Id: I5acc05aeb7db5aedbbe35594f46d614319a299b2
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
2011-05-19 14:34:08 +10:00
Jason McDonald
cbb5d693c8 Remove Qt3Support code from QMenuBar autotest
Change-Id: I63677bfe56ec92c1c96e2df5619ee434bdc91fdb
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
2011-05-19 14:03:52 +10:00
Jason McDonald
b68511b6ea Remove Qt3Support code from QSplitter autotest
Note that the functions suffixed with a 3 were actually the Qt4
versions, which is why this patch looks strange.

Change-Id: Iec874153248f57b8696a289cb13eb60fecc5699c
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
2011-05-19 14:02:32 +10:00
Jason McDonald
cb1be7a4f6 Remove Qt3Support code from QSharedPointer autotest
Change-Id: I1bb3752e3a5101e4a2990d0cac01406e6023ee2e
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
2011-05-19 14:01:23 +10:00
Jason McDonald
f075a7afec Remove Qt3Support code from QComboBox autotest
This commit removes the second-last column of test data
(labeled testQt3Support) of the insertItem test function.

Change-Id: I2158bdb5a77c9eaf1424998f51fb03a8df934490
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
2011-05-19 14:00:16 +10:00
Jason McDonald
4a52cc3ac0 Remove Qt3Support test code from accessibility autotest
Change-Id: Id31836ea52da71b40c0bcbb67d9beffc70b90400
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
2011-05-19 13:59:04 +10:00
Qt Continuous Integration System
6772f8802d Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Remove Qt3Support code from QDataStream autotest.
2011-05-19 13:42:59 +10:00
Jason McDonald
c2eb7bb080 Remove Qt3Support code from QDataStream autotest.
QWMatrix and QColorGroup were Qt 3 classes and QPalette is substantially
different in Qt 3 and Qt 4.

Change-Id: Iee176fcf237c3f9ac2ffd7f1fd9e4963dc4df39c
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
2011-05-19 13:34:10 +10:00
Qt Continuous Integration System
4299467335 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: fixed compilation of tst_qtextstream
  QUiLoader, QAbstractFormBuilder: Introduce errorString().
  Enable configuration for Xcb
  Fall back to using paths for large fonts in drawStaticText()
  Add ability to work around non-standard GLES implementations
  Fix broken drawing with large fonts using QStaticText and FreeType
  Remove Q_ASSERT's from qdbustype autotest
  Remove autotest code for Qt3Support library.
2011-05-19 10:07:06 +10:00
Rohan McGovern
9a6a58a95a tests: fixed compilation of tst_qtextstream
Compilation of this autotest was broken by a strange qmake bug,
QTBUG-19393.  Work around it by putting a space between two string
literals.

Change-Id: I494c486dd11858eeaf98d7a04021c74fcf3cbba7
2011-05-19 10:00:47 +10:00
Olivier Goffart
b57a7e6994 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)
2011-05-18 15:17:17 +02:00
Jason McDonald
871e8fe8dc Remove Q_ASSERT's from qdbustype autotest
Change-Id: I276750d8acda3744ee8a9c424b2da0a08e8c7461
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
2011-05-18 16:11:33 +10:00
Jason McDonald
49babe02f0 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
2011-05-18 16:09:29 +10:00
Jason McDonald
0cd93933d8 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
2011-05-18 11:25:17 +10:00
Rohan McGovern
6e50394c4e 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
2011-05-18 10:57:56 +10:00
Rohan McGovern
b8af05d3e2 Fixed license header.
(cherry picked from commit 2caea6081fc46217636f0ab70d09891efd2d2864)

Change-Id: I086c8cb2d0ccc691d8af68804132f048bee7fa4b
2011-05-18 10:57:51 +10:00
Jason McDonald
1661205dd7 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)
2011-05-18 10:46:48 +10:00
Jason McDonald
719ba0ea3a 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)
2011-05-18 10:46:48 +10:00
Jason McDonald
5f88d1fd08 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)
2011-05-18 10:46:48 +10:00
Jason McDonald
d35fcd3053 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)
2011-05-18 10:46:47 +10:00
Jason McDonald
fa42ba9b62 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)
2011-05-18 10:46:47 +10:00
Jason McDonald
65833e7d9e 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)
2011-05-18 10:46:47 +10:00
Jason McDonald
c04abc3fb4 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)
2011-05-18 10:46:47 +10:00
Jason McDonald
77ff187b92 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)
2011-05-18 10:46:47 +10:00
Jason McDonald
17bf9b17e7 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)
2011-05-18 10:46:47 +10:00
Jason McDonald
e540e41130 Remove unused function from qtessellator autotest
Change-Id: I24c1db8392370d19970421a014f7bb6c4bc7c6e8
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 224050aae75fd5b1d6c57909d894a3eba7ac43fc)
2011-05-18 10:46:47 +10:00
Jason McDonald
8094e93e08 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)
2011-05-18 10:46:47 +10:00
Jason McDonald
1799546675 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)
2011-05-18 10:46:47 +10:00
Jason McDonald
9e31e99a13 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)
2011-05-18 10:46:46 +10:00
Jason McDonald
f6cbfff326 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)
2011-05-18 10:46:46 +10:00
Jason McDonald
eeebb27650 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)
2011-05-18 10:46:46 +10:00
Jason McDonald
f872c1a065 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)
2011-05-18 10:46:46 +10:00
Jason McDonald
e3ee32848d 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)
2011-05-18 10:46:46 +10:00
Jason McDonald
175bb0eac6 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)
2011-05-18 10:46:46 +10:00
Jason McDonald
6354d890f3 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)
2011-05-18 10:46:46 +10:00
Jason McDonald
72fb879764 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)
2011-05-18 10:46:46 +10:00
Jason McDonald
51b23f75df 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)
2011-05-18 10:46:46 +10:00
Jason McDonald
97e0db61c7 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)
2011-05-18 10:46:46 +10:00
Jason McDonald
16c866533b 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)
2011-05-18 10:46:45 +10:00
Jason McDonald
3fee47be4c 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)
2011-05-18 10:46:45 +10:00
Jason McDonald
8e9644a67e 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)
2011-05-18 10:46:45 +10:00
Jason McDonald
6aca191e10 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)
2011-05-18 10:46:45 +10:00
Jason McDonald
7bd778117c 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)
2011-05-18 10:46:45 +10:00
Jason McDonald
3aa7455eab 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)
2011-05-18 10:46:45 +10:00
Jason McDonald
83fcb8023a 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)
2011-05-18 10:46:45 +10:00
Jason McDonald
9329ee1c27 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)
2011-05-18 10:46:45 +10:00
Jason McDonald
d9d1e72d76 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)
2011-05-18 10:46:45 +10:00
Jason McDonald
80384827e0 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)
2011-05-18 10:46:44 +10:00
Jason McDonald
aa004ff76d 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)
2011-05-18 10:46:44 +10:00
Jason McDonald
c631c05819 Remove mention of Q_ASSERT in QTableView test.
Change-Id: If27cb7031cdde222d1dd988188569dca4b1fb6d9
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 324b9db856f00a82d7fd3426d9b698211290efaa)
2011-05-18 10:46:44 +10:00
Jason McDonald
6fe7053d53 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)
2011-05-18 10:46:44 +10:00
Jason McDonald
b1b8d03054 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)
2011-05-18 10:46:44 +10:00
Jason McDonald
48ab5a8d25 Remove unused code from QXmlStream autotest
Change-Id: I719e502ef14848a22d41de71245fe6b6758c8d6b
Reviewed-by: Rohan McGovern
(cherry picked from commit 614474fb3d440eabd3ba7e381d246064ce39f4fa)
2011-05-18 10:46:44 +10:00
Jason McDonald
8c191084a8 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)
2011-05-18 10:46:44 +10:00
Jason McDonald
803f6117ca 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)
2011-05-18 10:46:44 +10:00
Jason McDonald
f5662adb03 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)
2011-05-18 10:46:44 +10:00
Jason McDonald
42d6820c7c 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)
2011-05-18 10:46:43 +10:00
Jason McDonald
ab6c90367d 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)
2011-05-18 10:46:43 +10:00
Jason McDonald
affdd6283c 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)
2011-05-18 10:46:43 +10:00
Jason McDonald
079dde144f 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)
2011-05-18 10:46:43 +10:00
Jason McDonald
dffae678dd 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)
2011-05-18 10:46:43 +10:00
Jason McDonald
fd714ec5aa 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)
2011-05-18 10:46:43 +10:00
Jason McDonald
c0372871f8 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)
2011-05-18 10:46:43 +10:00
Rohan McGovern
d7e10b2a71 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
2011-05-18 10:46:43 +10:00
Jason McDonald
44bb3c62cb 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)
2011-05-18 10:46:43 +10:00
Jason McDonald
982405f2d0 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)
2011-05-18 10:46:42 +10:00
Jason McDonald
d0d393d86f 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)
2011-05-18 10:46:42 +10:00
Jason McDonald
4bf7ac3968 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)
2011-05-18 10:46:42 +10:00
Jason McDonald
e415182a14 Change Q_ASSERT to QVERIFY in QMenu test.
Change-Id: Ifc08d4eabd8565cfd242ec2e70cf597e92f28fe3
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 291f04a4a7be4a975c6b8eaeeed4e0c196e23128)
2011-05-18 10:46:42 +10:00
Jason McDonald
b0da433436 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)
2011-05-18 10:46:42 +10:00
Jason McDonald
7c8c84d92b 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)
2011-05-18 10:46:42 +10:00
Jason McDonald
35b01c1733 Remove mention of Q_ASSERT from qheaderview autotest
Change-Id: I3a97411c0b53345bffbadb60a3e7caabfb0441d2
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit a388e104febb131cd35438bbb1397eeab41d3ab8)
2011-05-18 10:46:42 +10:00
Jason McDonald
98f9513b6b Remove dead code from qgraphicsgridlayout autotest
Change-Id: I230d1ec9dfd5df2a0fac161a03090308b7f07a1e
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 012b2d8198b8cfe39a66025334ed9ae2a045a68c)
2011-05-18 10:46:42 +10:00
Jason McDonald
319197880e 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)
2011-05-18 10:46:42 +10:00
Jason McDonald
5bdf574941 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)
2011-05-18 10:46:41 +10:00
Jason McDonald
46412f7128 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)
2011-05-18 10:46:41 +10:00
Jason McDonald
0ea9ffef43 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)
2011-05-18 10:46:41 +10:00
Jason McDonald
9e0049f656 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)
2011-05-18 10:46:41 +10:00
Jason McDonald
2d471a2bef 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)
2011-05-18 10:46:41 +10:00
Jason McDonald
20d16d3f8b 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)
2011-05-18 10:46:41 +10:00
Jason McDonald
847ee01953 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)
2011-05-18 10:46:41 +10:00
Jason McDonald
e1f2211188 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)
2011-05-18 10:46:41 +10:00
Jason McDonald
50fd0092db 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)
2011-05-18 10:46:41 +10:00
Jason McDonald
8ccb06a718 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)
2011-05-18 10:46:41 +10:00
Jason McDonald
94a7d439f2 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)
2011-05-18 10:46:40 +10:00
Jason McDonald
3ac241a1d5 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)
2011-05-18 10:46:40 +10:00
Jason McDonald
782cd3241d Ignore expected warning in accessibility autotest
Change-Id: I4b614766d2451dde51ab1207267301a2fe7dd0f6
Reviewed-by: Rohan McGovern
(cherry picked from commit 3ca51d87296bcb3098d7de14294fef9294fd5ed4)
2011-05-18 10:46:40 +10:00
Rohan McGovern
089ad37751 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
2011-05-18 10:46:40 +10:00
Jason McDonald
7ef434c3a0 Remove unused function.
Change-Id: I197ca88e04a68dca0ea819d6e335a02607e597aa
Reviewed-by: Trust Me
(cherry picked from commit 1a98c473fbcbb6a9edf1b7e42babbad7d901edb4)
2011-05-18 10:46:40 +10:00
Jason McDonald
6bc4d8b58f 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)
2011-05-18 10:46:40 +10:00
Jason McDonald
29851474c7 Remove unused functions.
Change-Id: I8cae0550c58238bd99bc759c21b022c54fe2de8b
Reviewed-by: Trust Me
(cherry picked from commit 1191dc0c278ddd22556d6c8e5ea5a898fa7b35f6)
2011-05-18 10:46:40 +10:00
Jason McDonald
4044d3c8f5 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)
2011-05-18 10:46:40 +10:00
Jason McDonald
084b7ababd 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)
2011-05-18 10:46:40 +10:00
Jason McDonald
22d6cd5cdd 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)
2011-05-18 10:46:40 +10:00
Jason McDonald
667a40fe36 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)
2011-05-18 10:46:39 +10:00
Jason McDonald
3b98db1606 Make test compile in namespaced build.
Change-Id: I824864b8db755a8dc731e3c9de39e3dd7b16224a
Reviewed-by: Rohan McGovern
(cherry picked from commit ced0a98b5274be6a62ae7e4a0f9fc3161d0e40cb)
2011-05-18 10:46:39 +10:00
Jason McDonald
11b8382d41 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)
2011-05-18 10:46:39 +10:00
Jason McDonald
fc52cbbc13 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)
2011-05-18 10:46:39 +10:00
Bjørn Erik Nilsen
862a819762 Compile auto tests.
Reviewed-by: mstormo
2011-05-16 16:59:05 +02:00
Rohan McGovern
173099696f 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
2011-05-16 13:10:00 +10:00
Eckhart Koppen
bf6534bad5 Temporarily changed autotest behaviour to ignore Qt version
Version past 5.0.0 was checked, but the test failed to compile in that
configuration.
2011-05-13 17:28:20 +03:00
Eckhart Koppen
890d08add4 Merge branch 'master' of scm.dev.nokia.troll.no:qt/qtbase-staging 2011-05-13 15:52:30 +03:00
Eckhart Koppen
f3341fd555 Updated version references in autotests
Tests now refer to version 5.0.0
2011-05-13 15:38:50 +03:00
Olivier Goffart
bcc7ddff9f tst_moc: remove QtSvg dependency
The test for no keyword of every header should be done by the
tst_CompilerWarnings test
2011-05-13 11:11:55 +02:00
Rohan McGovern
bef27c48ef tests: add bug numbers to a few FIXMEs
Change-Id: Idd01ce127859516dbab10644b97b281cb5218720
2011-05-13 09:14:09 +10:00
Rohan McGovern
152a10012c 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
(cherry picked from commit 96a3bf7a8bbc1e5361e16cbeeceb4be674b88c30)
2011-05-13 08:59:43 +10:00
Jan-Arve Sæther
1625b25a9f Revert "Fix double painting when adding an item into a linear layout"
(It did not really fix the issue.)

This reverts commit 33f525e636ef8fa64a15d3e66c56adaea0075bda.

Conflicts:

	src/gui/graphicsview/qgraphicslinearlayout.cpp
	tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
(cherry picked from commit fee052e3e37b3335fe563cb8a1881bf59f9e25d0)
2011-05-12 15:51:02 +02:00
Jan-Arve Sæther
f76acd935d Improve invalidate() testcase.
Test number of:
* events
* setGeometry() calls
* invalidate() calls
(cherry picked from commit b8b4e6fe141d99c4639d492a546226cdc3fc06c5)
2011-05-12 15:48:00 +02:00
Jan-Arve Sæther
913ff73200 Avoid flicker when invalidate is propagated in a widget/layout hierarchy
* Do not call invalidate from activateRecursive().
  This resulted in that a layout was invalidated as many times as there
  were items in the layout.

* Several improvements. Do not call resize(size()) too often.
  Calling resize() from the widgetEvent() is not very nice though...

* Remove commented out code

* make sure layout is activated even if the widget does not change size

* activate the layout if the resize is same as size()

* In order to not break existing apps, make this an opt-in feature
  with QGraphicsLayout::setInstantInvalidatePropagation(true);

Reviewed-by: Frederik Gladhorn
Reviewed-by: John Tapsell
2011-05-12 15:47:26 +02:00
Gabriel de Dietrich
1ce725cb60 Fix licence headers again for MR 900
See commit b00089261eafbdf5f92ed94d7fb20b402bfcaeb2

Reviewed-by: Trust me
(cherry picked from commit 7b6a7f475119878681c9d0c06b29896ec3fe72c3)
2011-05-12 15:43:54 +02:00
Samuel Rødal
e40443f7df Prevent crash in OpenGL engine when scaling images / pixmaps.
Make sure the resulting image / pixmap is valid if the source was valid.

Task-number: QTBUG-19157
Reviewed-by: Kim
Reviewed-by: Benjamin Poulain
(cherry picked from commit 1c5da7207a21cc44a4a08d291c290ffcd9b958fd)
2011-05-11 17:34:42 +02:00
Stephen Kelly
d49c561b73 Add the QIdentityProxyModel.
Older commit history is in KDE svn:
http://websvn.kde.org/trunk/KDE/kdelibs/kdeui/itemviews/kidentityproxymodel.cpp?view=log

Ammended to update the license headers.

Merge-request: 900
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>

Conflicts:

	doc/src/frameworks-technologies/model-view-programming.qdoc
	tests/auto/headers/tst_headers.cpp

(cherry picked from b00089261eafbdf5f92ed94d7fb20b402bfcaeb2)
2011-05-11 17:37:48 +02:00
Shane Kearns
4b2d966566 Fix spelling mistake
Reviewed-by: Trust Me
(cherry picked from commit b166c30d8d0834518337ded44d2ebfe097ee312f)
2011-05-11 16:39:13 +02:00
Bjørn Erik Nilsen
1e41e3076a Fixes crash in QWidget::effectiveWinId.
Widgets are left in a transitional (and incosistent) state while being
re-parented, which caused QWidget::effectiveWinId() to crash in certain
circumstances. See patch for more details.

Auto test included.

Reviewed-by: ogoffart
(cherry picked from commit 6db0153cd7e35e4a919a76ae2aadbf2d2510bfb7)
2011-05-11 16:38:49 +02:00
Shane Kearns
7ee981a834 Fix crash when QSocketNotifier used with an invalid descriptor
select code for open C file/socket descriptors was crashing in FD_SET
if a QSocketNotifier was created with an invalid descriptor.

Added two autotests to QSocketNotifier, one to check notifiers with
bogus socket descriptors don't crash, the other to check that notifiers
with posix socket descriptors do work. (symbian socket engine doesn't
use them so they are not implicitly tested)

Reviewed-by: mread
Task-Number: QTBUG-18138
(cherry picked from commit 8a9a6afcf02f089f932bc81431ab46a60af32134)
2011-05-11 16:37:58 +02:00
Shane Kearns
605102d5c6 Fix some warnings in symbian network tests
Ignore warning when the test intentionally sets an invalid socket descriptor.
Make sure to set content type on all http post tests in tst_qnetworkreply.
Run test with enough capabilities to avoid platsec errors when accessing
certificate store.

Reviewed-By: Markus Goetz
(cherry picked from commit 9632fdefa9012ca11cd1345d66bafd6f417de88e)
2011-05-11 16:37:16 +02:00
Qt Continuous Integration System
1a1af689fc Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Fix tst_QVariant::invalidColor
  Move QTextCursor::MoveStyle to Qt namespace
  Add some QRawFont related low level functions to avoid extra copying
2011-05-11 23:47:33 +10:00
Jiang Jiang
a1d91af499 Fix tst_QVariant::invalidColor
Since a423ff5474b89028eeca95b254f5184311c8223b, the warning message is
no longer produced.

Reviewed-by: Samuel Rødal
(cherry picked from commit 8a5e82732be3aac37d14ef85c6974add46c6b65f)
2011-05-11 15:28:19 +02:00
Jiang Jiang
16628b76c0 Move QTextCursor::MoveStyle to Qt namespace
We cannot use QTextCursor::MoveStyle enums in QTextLine because
QTextCursor is not a QObject, while referring to that enum in
Q_PROPERTY requires it to be. That's why we need to move the
enums in Qt namespace.

Reviewed-by: David Boddie
(cherry picked from commit 5eba82b752e85a5d6cb3a893214ed2646d75f362)
2011-05-11 15:28:09 +02:00
Qt Continuous Integration System
8cd8e5e4cb 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:
  tests: fixed or disabled qtbase tests with circular dependencies
2011-05-11 21:47:11 +10:00
Rohan McGovern
698b3da842 tests: fixed or disabled qtbase tests with circular dependencies
tst_lancelot did QT+=svg, but didn't actually use QtSvg.

qlocalsocket/lackey uses QtScript, which is not available when compiling
qtbase.

Change-Id: Ic3cc5a6f74a58ee8f2fdc48b9c852d9551b85f68
2011-05-11 13:34:00 +02:00
Rohan McGovern
fda40e37df tests: fix private header inclusion in qtbase autotests
Any test which needs private headers from some Qt module must do:

  QT += modulename-private

Reviewed-by: Jason McDonald
Change-Id: I6924a577a960e4990f4379b02bca4822d8248fb4
2011-05-11 17:04:19 +10:00
Rohan McGovern
838cf9abd9 tests: disable tests in qtbase which depend on qtsvg
Reviewed-by: Jason McDonald
Change-Id: I2416d34b5c262e20ee18f7121e8745327d5614f8
2011-05-11 17:04:16 +10:00
Rohan McGovern
ce26a6fd2b tests: make benchmarks compile or disable those which don't compile
Reviewed-by: Jason McDonald
Change-Id: Idc9fa4722b59f9b75d5e4a91bbfd0ae068d29b3d
2011-05-11 17:04:12 +10:00
Rohan McGovern
427d32a3b8 tests: remove references to benchmark directories which don't exist
Reviewed-by: Jason McDonald
Change-Id: I14d0981c9f962c4eb048ca426a8ba19aa7ea66de
2011-05-11 17:04:02 +10:00
Rohan McGovern
0012bd57a9 tests: make tst_qrawfont compile for QGlyphs -> QGlyphRun API change
Broken by 051ef6f294

Reviewed-by: Jason McDonald
Change-Id: Ia8589aba1bfb71d000d8fad455d90e704ba28972
2011-05-11 11:52:09 +10:00
Rohan McGovern
ed8c43b5ee tests: mark some tests as using private API
These autotests are all using private symbols, available only when Qt is
configured with -developer-build.  So, gracefully disable them when
the private symbols are not available.

Reviewed-by: Jason McDonald
Change-Id: Iafd1c7af486feeee810110bc021e75984827f78a
2011-05-11 11:51:46 +10:00
Alexander Potashev
342d2a253c Allow different text for undo actions and items in QUndoView
Now the texts used for undo actions and for items in QUndoView can
be set separately. This introduces an extended format of text that
can be passed to QUndoCommand::setText or QUndoCommand constructor.

The action text can now contain two strings separated by a "\n". The
first string (that goes before "\n") is then returned by
QUndoCommand::text() and used as name of item in QUndoView.
The second string (that goes after "\n") is returned by
QUndoCommand::actionText() and used when the text properties of the
undo and redo actions are updated.

If the text passed to QUndoCommand does not contain "\n", everything
works as before, and both QUndoCommand::text() and
QUndoCommand::actionText() return the same string.

Even though action text in English usually does not need different forms
for undo actions and QUndoView item, translators can employ this new
command text format, for example to adjust the grammatical case used in
command text to match the context of "Undo %1"/"Redo %1".

Merge-request: 2610
Reviewed-by: ossi
(cherry picked from commit 9b784789c75d59b27530bbf1d12676cc44f64f46)
2011-05-10 12:54:56 +02:00
Alexander Potashev
ec4d346f95 Allow using not only prefixes for undo command text
Functions QUndo{Group,Stack}::create{Undo,Redo}Action() now use action
text templates "Undo %1" and "Redo %1" if no custom prefix was provided.

This makes more flexible translations possible. The surrounding text
(like "Undo" and "Redo") can now be suffixed to the command name as
German and Korean languages require ("%1 rueckgaengig machen" for German).

Also, now the default action text (when no command can be undone) can be
translated differently from the prefix. For example, it can be
translated as "Undo action", not just "Undo".

When a non-empty prefix is passed to QUndo*****::create****Action(),
those functions work as before, and the features described above become
unavailable.

Task-number: QTBUG-14442
Merge-request: 1212
Reviewed-by: ossi
(cherry picked from commit 213c25ad24e4f3b0a44f82f23d34746cd294f8d6)
2011-05-10 12:54:56 +02:00
Robin Burchell
0bb70c3164 Ensure that QDateTimeEdit::calendarWidget() will always return a valid widget.
This case may be triggered in the (admittedly slightly abnormal) case where a
user wishes to embed the calendar widget in a layout or, for whatever reason, do
something else that will change its ownership.

We work around this by detecting when it is deleted and recreating the widget.

This will also have a positive side effect if setCalendarWidget() is called with
a widget which is then subsequently deleted, returning the default widget
instead of a pointer to (now deleted) memory.

Reviewed-by: Denis Dzyubenko

Merge-request: 2568
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
(cherry picked from commit 124ec3200f8453142717fcfe7a4aa0a55164aaa6)
2011-05-10 12:54:56 +02:00
aavit
5a7409a423 Make autotest more resilient against network timeout
(cherry picked from commit 50be38737507f5c23b4d050e635a200024164a13)
2011-05-10 12:54:55 +02:00
aavit
f55563e7df Do not filter adhoc clients
(cherry picked from commit 4fe5307af44a76b99cc8c70aa330180c1985eabc)
2011-05-10 12:54:55 +02:00
aavit
c890bf88a7 Lancelot: Add configurable client filtering to baseline server
(cherry picked from commit d499f7ca995e40f7a75f913ff0f07d9a73fa3559)
2011-05-10 12:54:55 +02:00
aavit
c3ce002a54 Improve error reporting on failure to connect to baseline server
(cherry picked from commit 9d75ff6fa8f8844ff6599b68618821cd8c501757)
2011-05-10 12:54:55 +02:00
Olivier Goffart
3a0f5d04fc Fix the tst_QPluginLoader::loadCorruptElf on 64 bit
The error message do not match

Reviewed-by: Arvid Ephraim Picciani
(cherry picked from commit 383f57dd2669b71fd14cf9b6b56213423a3d2d01)
2011-05-10 12:54:54 +02:00
Oswald Buddenhagen
4212ee7ec7 make QProcessEnvironment on Windows preserve variable name case
while windows itself does not care which case the variable names are in,
they may be passed to unix tools which *do* care.

note that this uses true case folding for string comparisons while
windows uses uppercasing. this means that "ess" and "eß" will be
considered the same by us, while not by windows. this is not expected to
have real-world impact, particularly because non-ascii variable names
are not used much.

Task-number: QTCREATORBUG-3110
Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit f3db5603871928ebed43a085a496397e65952b39)
2011-05-10 12:54:52 +02:00
Jan-Arve Sæther
d454d69408 Add missing license headers
(cherry picked from commit d5ee1bc752dc8aed717776a80e9e15972dd98065)
2011-05-10 12:54:51 +02:00
Frederik Gladhorn
45baf4ed0b Fix warning (unused variable) in QAccessibility test.
Reviewed-by: Morten Sorvig
(cherry picked from commit c3ebd1d38826739cb989e65770d2a22b9a39dcc4)
2011-05-10 12:54:50 +02:00
Jens Georg
0683ff9f74 Add test for ISODate change in QDateTime::toString
Merge-request: 1149
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
(cherry picked from commit d9e0c2ea4d64b8fdfb31b28e71373735be38101b)
2011-05-10 12:54:50 +02:00
Miikka Heikkinen
91ac13ceb7 Fix BlendBench::unalignedBlendArgb32 test case
The test case freed the wrong pointer, causing crash in Symbian devices.

Task-number: QTBUG-17489
Reviewed-by: Janne Koskinen
(cherry picked from commit 02bb8e4c5f4584f3c0a7ed16bcba20c7f43456cd)
2011-05-10 12:54:50 +02:00
Frederik Gladhorn
8691b6ea51 Skip child count test on Intel compiler.
For some reason this test is sometimes giving false results
with intel compilers.
The child count is most likely style dependent.
For now ignore it in the test.

Reviewed-by: Thierry
(cherry picked from commit 0ddecd383c91afb18ce2776eed5608bb1a0c2129)
2011-05-10 12:54:50 +02:00
Gabriel de Dietrich
a759518a98 Removing the "resetInternalData" slot in QAbstractProxyModel
This reverts commits 0916a68056154ecb60e4ea2c79726ab2e49b1532 and
6f1384fcbeea993d5be47590c696de60215b7608.

This effectively reverts most of MR 694.

Reviewed-by: Olivier
(cherry picked from commit 06e104b9c305d3db0dd1848e6e633ee3888fd1de)
2011-05-10 12:54:49 +02:00
Laszlo Agocs
c9cf5b45e3 Added autotest for threaded text rendering.
Task-number: QTBUG-18516
Reviewed-by: TRUSTME
(cherry picked from commit 903d4dc2196df2775255c24c707bfeb571992bb7)
2011-05-10 12:54:49 +02:00
mae
4d38a48a70 Fix insert and scroll to bottom case
When using QtextCursor::insert() with a large text followed by setting
the vertical scrollbar to its maximum value (scroll to bottom),
QPlainTextEdit would not behave properly if a document size
change was triggered by the insertion due to line wrapping.

This was visible in Qt Creator.

Auto test included.

Reviewed-by: con
(cherry picked from commit 5d144faf3c524ab557b88f69c4b755e20237e846)
2011-05-10 12:54:49 +02:00
Gabriel de Dietrich
560114a415 Fix tst_QTableWidget::task219380_removeLastRow
Again, dure to the fix to QTBUG-18551.

Reviewed-by: Olivier
(cherry picked from commit 1e4d824462b44315944a27ec328f7e400a67c96c)
2011-05-10 12:54:49 +02:00
Samuel Rødal
6c42aa3b0f Skip linearGradientSymmetry test on QWS.
QWS defines GRADIENT_STOPTABLE_SIZE to be 256, which is not enough
resolution for this test to pass.

Reviewed-by: Eskil Abrahamsen Blomfeldt
(cherry picked from commit 0201d5f5a8c95bd4f6b94726ed0db2b83cd3efc7)
2011-05-10 12:54:48 +02:00
Samuel Rødal
d00555862c Made linearGradientSymmetry test pass on qreal=float platforms.
We need to loosen the requirements a bit when qreal is float... Just
skip the two failing test cases for now.

Reviewed-by: Eskil Abrahamsen Blomfeldt
(cherry picked from commit 3c659eb590aecbcdb40cb498901e757e780fa892)
2011-05-10 12:54:48 +02:00
Jan-Arve Sæther
4bfcb2febe Benchmark for layout hierarchies
(cherry picked from commit cb503a3f4901c0b017374f099b0de8c0c4c50648)
2011-05-10 12:54:47 +02:00
Jan-Arve Sæther
04e8fb5e51 Manual test for layout flickering
(cherry picked from commit fae8bb9f583b416bf47208561c38e0b102f8578c)
2011-05-10 12:54:47 +02:00
Samuel Rødal
83ecb25998 Added support for six-parameter radial gradients.
The extended radial gradients conform to the radial gradient
specification in HTML 5 canvas.

Task-number: QTBUG-14075
Reviewed-by: Andreas Kling
(cherry picked from commit da55c1ea92474e989e5582b02815936bbf584405)
2011-05-10 12:54:46 +02:00