Commit Graph

1177 Commits

Author SHA1 Message Date
Jason McDonald
db0361e9b1 Remove redundant class from QStringMatcher test.
The removed class was evidently attempting to promote protected members
of its base class to public, but the way this was done doesn't work and
doing so wasn't actually necessary for the test.

Change-Id: I15e0c31891da08cacee1054e15596a79a058b466
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-06 07:50:21 +01:00
Sami Rosendahl
e6b9382ae2 Add regression test for QTBUG-22660
QHttpNetworkReply crashed in Qt4.7 and 4.8 if a HTTP server responded with
gzip-encoded empty content without defining Content-Length in the response
header. This commit adds the test for the problem as a regression test to
Qt5.

Change-Id: Iddfb970a31d92a66fd1dd524811cf54bb06e5157
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-06 04:43:05 +01:00
Sami Rosendahl
d55cdcd59f Fix memory leak in QDomDocument DTD entity declaration handler
The created entity node's reference count needs to be decremented to 0
before it is added as a child, because appendChild will increment the
reference count to correct value of 1. Also added autotest DTDEntityDecl
to tst_qdom to expose the leak when executed under valgrind memcheck.
There was no previous direct test case for unparsed entity declarations in
DTD, only indirect coverage via regression test cloneDTD_QTBUG8398.

Task-number: QTBUG-22587
Change-Id: I394ae9fc32d5b84e4ca287c5db4dd7effde6128b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-06 02:59:59 +01:00
Sami Rosendahl
1bc31fa43d Fix memory leak in QDomDocument DTD notation declaration handler
The created notation node's reference count needs to be decremented to 0
before it is added as a child, because appendChild will increment the
reference count to correct value of 1. Also added autotest DTDNotationDecl
to tst_qdom to expose the leak when executed under valgrind memcheck.
There was no previous test coverage for the notation declarations in DTD.

Task-number: QTBUG-22588
Change-Id: I876186d1277ceb4414f803b58b62f51cc1474367
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-06 02:59:55 +01:00
Jonas M. Gastal
bf7f170607 Make socket descriptors qintptr.
Windows x64 uses 64 bits integer for sockets, to ensure compatibility we
should use ptr sized integers for our socket descriptors.

Task-number: QTBUG-19004
Change-Id: I4b56023874a4f1bad107c66c054fecfedde33d88
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-05 15:07:51 +01:00
David Faure
9498f1aa54 Fix compile error with qWarning() << myDateTime and QT_NO_DEBUG_OUTPUT
All QDebug operator << in custom classes were disabled by
QT_NO_DEBUG_STREAM, which was set by QT_NO_DEBUG_OUTPUT.

Now QT_NO_DEBUG_STREAM is never set automatically, but remains available
for reducing the feature set altogether (qconfig.h).

Remove check on QT_NO_TEXTSTREAM: this define is meaningless, it
doesn't even undefine QTextStream, and this is unrelated to QDebug
streaming anyway.

Change-Id: I5eeed0144fa684d0e790e9dfd9a4aeb956218c39
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-05 15:02:56 +01:00
Pekka Vuorela
8ad583b7f9 Removed QApplication::setInputContext()
Obsoleted by platform input context. Setting a custom QInputContext
wouldn't work properly anymore.

Change-Id: I966573a82fdd7530544878513a655eae7b3ad67b
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-05 11:40:08 +01:00
Jason McDonald
1fdfc2abfe Update copyright year in license headers.
Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 06:36:56 +01:00
Jason McDonald
f599b5cd30 Fix memory leak in QAbstractItemModel autotest.
The test was allocating a new model on the heap each time init() was
invoked, but none of these models were deleted.

Change-Id: Ibe107b2dbc949a5f72940f67c08f4b0f46256c09
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 03:49:45 +01:00
Jason McDonald
ca81ec03d6 Prevent QFileInfo test from leaving temporary files behind.
Use a small helper class to ensure that the files created during the
test are removed afterwards, even if the test fails. Also, verify
creation of the files in the body of the test function, not in the
helper, as verifying in the helper won't terminate the test on failure.

Change-Id: I76eff20e54ef6a1ed71d9bbb31e00f41f3d14c38
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 03:49:45 +01:00
Kurt Korbatits
77ddb00a49 Changed tests: qmake,selftest and lancelot to use QFINDTESTDATA.
Changed these tests to use QFINDTESTDATA macro to detect location of testdata.
Checking for a specific file contained in the testdata so as not to be confused by empty directories
created during configure.

Change-Id: Iac2ac6304b6b9ac79e00886025b93ec0af5a8507
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 03:49:45 +01:00
Denis Dzyubenko
92f9678055 Registered QUuid in the metatype system as a builtin type.
Change-Id: I6be6129d9f6bf468ba8a5805cfa0f6f79199afb3
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2012-01-05 02:17:04 +01:00
Samuel Rødal
07edbd23ed Introduced QOpenGLContext::aboutToBeDestroyed() signal.
This signal can be used to clean up OpenGL resources in a safe way
before the context is destroyed.

Task-number: QTBUG-20083
Change-Id: I45a4be01b06af4ee7196fa502116f099d50afeab
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-05 02:17:04 +01:00
Simon Hausmann
73187281c3 Fix QPainter::drawText with complex brushes
Commit d52fd497f6 introduced a call path to
QPaintEngineEx::drawStaticTextItem, which has a bug in using the pen's color
instead of the entire brush.

This patch replaces the use of the color with the pen's brush().

Task-number: QTBUG-23450
Change-Id: Ieb3bf352c840ff0d3fb4ac678caf7b13f4f9a8f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-04 21:16:55 +01:00
Robin Burchell
ecb57cfc32 Pass notification of failure of watches onto the caller.
This is particularly useful for situations where the user might really want to
be notified about a failure, for instance, in a backup application.

Empty paths are not treated as an error in calling, as the user code cannot
really do anything sensible to handle this error, but empty paths should not be
used.

Change-Id: Iddb44fd39f4e3fac5c3f9f60fb7999e1833280a8
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-04 21:09:10 +01:00
Jędrzej Nowacki
08863b6fda Refactor QVariant handlers.
QVariant implementation is based on delegation to a handler. The handler
has rather simple construction, it is a set of function that implements
a switch statement over known types and redirects calls to a right
method of an encapsulated types instance. Unfortunately after qt
modularization project, it is not easy to use types directly from
different modules, as they can be undefined or completely unaccessible.
Which means that each module has to implement own handler to cooperate
correctly with QVariant. We can suspect that list of modules known to
QVariant will grow and it is not limited to GUI, Widgets and Core,
therefore it would be nice to have an unified, from performance and
source code point of view, way of working with handlers.

This patch is an attempt to cleanup handlers. Keynotes:
- Each handler is working only on types defined in the same module
- Core handler implements handling of primitive types too
- Custom types have an own handler
- Each handler is independent which means that dispatch between handlers
  is done on QVariant level
- Handlers might be registered / unregistered using same interface

Change-Id: Ib096df65e2c4ce464bc7a684aade5af7d1264c24
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-04 14:25:25 +01:00
Joerg Bornemann
a4533b4503 fix invalid connection in tst_QProcess::lockupsInStartDetached
Change-Id: I06f2d56f5c45c13bbe08707e6baad4f2aece39b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-04 06:01:33 +01:00
Jason McDonald
0afe990714 Avoid QCOMPARE outside test function in QSettings test.
QCOMPARE and friends should only be called in a test function.  Instead
of calling QCOMPARE elsewhere, keep a count of the number of errors and
QCOMPARE that count with zero in the test function.

Change-Id: I9a264e91169a98c30980fdc04a3e45bfb0ca8063
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-04 06:01:33 +01:00
Jason McDonald
20f0196a2c Remove redundant debug code from QFileSystemWatcher test.
There is no need to print out the name of the backend used by each test
run of a test function as every message output by the test function will
have the name of the current data row included.

Change-Id: Ie69881d2ecedce728ea67b5aae1c1196776552a5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-04 06:01:33 +01:00
Frederik Gladhorn
afd22f52f8 Accessibility: extend listview unit test.
Test more functions from Table Cell.

Change-Id: I43b8766138350ece781bdaba7ab10fde8542aa4f
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-04 02:17:20 +01:00
Bradley T. Hughes
68202f646a Make sure tst_QThreadStorage finds its subprocess
On Mac, the application's dir is in the bundle, so we need to "escape"
the bundle when looking for the an executable relative to the
application's dir path.

Change-Id: I5c01f7d816ec8cc30f5277202f4eefb0c49a2bc3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-03 12:58:24 +01:00
Jason McDonald
fda36df6ba Use true and false in preference to TRUE and FALSE in tests.
Use the C++ boolean constants true and false instead of the C macros
TRUE and FALSE (which are actually integers), and use QVERIFY instead of
QCOMPARE for verifying simple boolean expressions.

Change-Id: Ie76dfcab6722df6b93b3fa62b0f3437901482932
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-03 02:57:12 +01:00
Robin Burchell
d4514b63c7 Remove support for dnotify QFileSystemWatcher.
Inotify has been available in Linux for some ~6 years now, 7 when Qt 5 will
actually be released, so I'd say it's safe to remove this fallback path now,
particularly as the autotest notes that it's broken.

Change-Id: I49dbb161d4765d63e92f512a6375323c7d37ccbe
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-02 18:19:36 +01:00
Stephen Kelly
f29e55448b Change the default value of QSortFilterProxyModel::dynamicSortFilter
The value is changed to true. It is a common bug that developers expect
this proxy model to reflect the source model when the source changes.
That requires setDynamicSortFilter(true), so we change the default to
optimize for the common case.

Change-Id: I9bf7efdbda10309fa77aed9391c33054aaae4a29
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-02 16:43:02 +01:00
Robin Burchell
fb7404e569 Implement (and unit test) simple QVarLengthArray::first()/last().
Pure syntactical sugar, to match up with what the other container
classes offer.

Change-Id: I0f97de011923d9d204cca0fa906b059dc5054a89
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-02 15:08:19 +01:00
Bradley T. Hughes
2bbf9befd8 Add Qt::TimerType argument to QAbstractEventDispatcher::registerTimer()
... and deprecate the old registerTimer() functions. The new pure-
virtual registerTimer() breaks source-compatibility. Subclasses cannot
be instantiated anymore, since the pure virtual function signature has
changed.

QAbstractEventDispatcher::TimerInfo is no longer a QPair. It is now a
struct with timerId, interval, and timerType members. This is a source
incompatibility that should only affect subclasses of
QAbstractEventDispatcher, which will need to pass 3 arguments to the
TimerInfo constructor instead of 2. If the subclass used QPair<int,int>
instead of the TimerInfo typedef, the QPair<int,int> declarations will
need to be replaced with TimerInfo.

Call the new registerTimer() function with the type from
QObject::startTimer(). Change all subclasses of QAbstractEventDispatcher
to reimplement the new virtual function. The type argument is unused at
the momemnt, except to ensure that registeredTimers() returns the type
each timer was registered with. Implementations for the various
dispatchers will be done in separate commits.

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: Ia22697e0ab0847810c5d162ef473e0e5a17a904b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-02 10:44:00 +01:00
David Faure
05ca21411e Handle -1 (Invalid Key) and Qt::Key_unknown gracefully in encodeString.
Previously they would fall into the unicode handling and return very
strange values.

Change-Id: I62a53894c0983bf53fd79f924b40a6fd3ba02993
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-02 09:04:12 +01:00
Sergio Ahumada
628d3f85d2 tests: use contains(QT_CONFIG,private_tests) consistently
These tests used requires(contains(QT_CONFIG,private_tests)) in their
.pro file, but did not subtract themselves from their parent project
SUBDIRS when private_tests weren't enabled.

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

Change-Id: If36b1b8f69c3509128786fec67899ae18ffaa2bc
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-02 01:37:42 +01:00
Robin Burchell
69a44f9cfc Change event posting to use a QVector.
This provides a ~10% improvement to the newly introduced QCoreApplication
event_posting_benchmark (a simple synthetic benchmark of creating a bunch of
events, posting them, and sending the queue).

before:
********* Start testing of QCoreApplicationBenchmark *********
Config: Using QTest library 5.0.0, Qt 5.0.0
PASS   : QCoreApplicationBenchmark::initTestCase()
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"1000":
     0.82 msecs per iteration (total: 53, iterations: 64)
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"10000":
     8.6 msecs per iteration (total: 69, iterations: 8)
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"100000":
     84 msecs per iteration (total: 84, iterations: 1)
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"1000000":
     874 msecs per iteration (total: 874, iterations: 1)
PASS   : QCoreApplicationBenchmark::signal_slot_benchmark()
PASS   : QCoreApplicationBenchmark::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of QCoreApplicationBenchmark *********

after:
********* Start testing of QCoreApplicationBenchmark *********
Config: Using QTest library 5.0.0, Qt 5.0.0
PASS   : QCoreApplicationBenchmark::initTestCase()
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"1000 events":
     0.781 msecs per iteration (total: 100, iterations: 128)
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"10000 events":
     7.8 msecs per iteration (total: 63, iterations: 8)
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"100000 events":
     75 msecs per iteration (total: 75, iterations: 1)
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"1000000 events":
     774 msecs per iteration (total: 774, iterations: 1)
PASS   : QCoreApplicationBenchmark::event_posting_benchmark()
PASS   : QCoreApplicationBenchmark::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of QCoreApplicationBenchmark *********

Change-Id: Ibf56d9526b0a8cbaf171008da4104bb457628172
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-12-30 21:58:10 +01:00
Toby Tomkins
7f4c45390d Flag udpTest as insignificant, fails on Ubuntu 11.10 x64.
This testcase fails on the Ubuntu 11.10 x64 platform, add flag to .pro
file so test is ignored on this platform.

Task-number: QTBUG-23380

Change-Id: I51831df8c8e9bfcf63d3689e37552ca1a62691cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-30 15:17:02 +01:00
Pekka Vuorela
6576fda2ad Adapt QGraphicsView test to QPlatformInputContext
Change-Id: I9562a0b763fe7d77cd08451426bf2ceaec00acf9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-30 13:20:37 +01:00
Pekka Vuorela
b83e98d22c Adapt QGraphicsScene test to use QPlatformInputContext
Change-Id: Iaf61798cc78e57563fee088711d39090b722a946
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-30 11:28:20 +01:00
Jason McDonald
14e139f391 Prevent qDebug test bypassing the testlib message handler.
Several of the test functions in the QDebug autotest call
qInstallMsgHandler() to temporarily use a custom message handler.
Unfortunately, these test functions were then resetting the message
handler back to Qt's default handler at the end of the test.

QTestLib also calls qInstallMsgHandler() to set a message handler that
redirects debug/warning/fatal messages into the test log.  When the test
resets the message handler back to Qt's default handler, testlib's
message handler is bypassed for the rest of the test, preventing any
subsequent debug/warning/fatal messages from being visible in the test
log or subject to testlib's ignoreMessage() function.

This error also caused several of the test functions to fail if they
were run manually.  The "defaultMessagehandler" test would fail if it
was run before any other test function and the "assignment" test would
fail if it was run after any other test function.

This commit fixes these failures by using a helper class to ensure that
the previously active message handler is restored at the end of each
test function, even if the test function fails or throws an exception.

Change-Id: I51376724d164c8ad126e5b9be76890bf3e6a9fb0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-30 04:14:53 +01:00
Jason McDonald
d8f1749a74 Use QVERIFY2 to output verbose failure messages.
Change-Id: I2ce96d9d9f582e99c1d9f6dd6e6e80ce42d6e61d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-30 02:07:50 +01:00
Jason McDonald
fb83806138 Correct misspelt function names in QFutureWatcher test.
Change-Id: I60965f3475f83a7c42d2efc6ed8adf9a1403e144
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-30 02:07:50 +01:00
Jason McDonald
0372d5bf0d Correct misspelt function name in qtconcurrentmap test.
Change-Id: I79b54b4e0de6319add89d220d3c3306556ab4ccc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-30 02:07:50 +01:00
Jason McDonald
8b66c46c18 Correct misspelt function name in qtconcurrentfilter test.
Change-Id: Ie7ea2defac407d099d7bb27cccfb34911b832626
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-30 02:07:50 +01:00
Robin Burchell
18d2528b6c Change test to use new QTRY_COMPARE/QTRY_VERIFY macros.
When verifying nonzero results (i.e. that something expected *did* happen),
using these macros allows bailing out of the timer much earlier than the
potential 5 seconds.

My running this on Linux goes from ~147 seconds to ~91 seconds.

Change-Id: Ie1e41252eb4eb295b5c8e795ded02f00eb7f9387
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-30 00:18:24 +01:00
Jason McDonald
4c1469f7da Improve QTextCodec::codecForLocale() test.
Don't call QSKIP when omitting the optional part of the test, as doing
so hides the fact that the rest of the test passed.

Change-Id: I9c102e8daeaf9586b2e510c4c9ce697ead290795
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-29 13:27:17 +01:00
Sergio Ahumada
78c27380c6 Fix printerPaperSize and some tst_qprinter test failures
Removing QEXPECT_FAIL accordingly.

Task-number: QTBUG-22296
Task-number: QTBUG-22562
Change-Id: I128a78897722cc067168ee50dbcbfc7537abdfcd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-29 13:18:20 +01:00
Jason McDonald
b4557829f4 Don't allow QThreadPool test to hang on failure.
Use QTRY_VERIFY() to fail after a reasonable timeout rather than putting
the test into an infinite loop.

Change-Id: Ie0917556e15999a94cc0587f3f4c11c0d743a228
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-29 01:39:04 +01:00
Jason McDonald
b2f2258719 Avoid repeatedly registering the same meta-type
Register the meta-type in initTestCase(), which is run once, rather than
in init(), which is run before every test function is run.

Change-Id: Ic62a2469da6a2a85254ffc7c4d893395202c50d8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 08:16:47 +01:00
Jason McDonald
36eb666391 Improve qtconcurrentthreadengine autotest.
The threadCount() test function is unstable and had been disabled by
making it not be a slot.  It is better to disable it with QSKIP so that
the test output shows that the test function exists and is in need of
repair.

Change-Id: Iccdc8da31e0d15d922f7e9606835d1ff1a3a4966
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 06:34:15 +01:00
Jason McDonald
79b64957b0 Cleanup itemmodel autotests.
Avoid using bug tracker identifiers in test function names.  These
identifiers lose their meaning when the bug tracker is replaced.

Change-Id: Ia867f7c2ec2ab9ed546588843d532ac615a34031
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 06:34:02 +01:00
Jason McDonald
4ae3fea163 Remove old debug code from itemmodel tests.
Change-Id: I7c6aeed2d3b593a4dac89e54ef22743d5f736d42
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 06:33:50 +01:00
Jason McDonald
6b6406d659 Reinstate commented test data in QItemSelectionModel test.
The restored test data was marked as failing, but appears to pass, and
the available history does not explain why it was commented out.

Change-Id: I7e9e3ba72fc8fef42c91ee882efa98d25b3d8317
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 06:33:42 +01:00
Jason McDonald
613d0e407e Cleanup itemmodel autotests.
Bring the code closer to compliance with Qt's coding style guidelines
and eliminate excessive vertical whitespace.

Change-Id: Iaa29f8edf326ddb80cbadb6c18cca4fea88fd9b2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 06:33:32 +01:00
Jason McDonald
9f843918f2 Remove empty functions from itemmodels tests.
Change-Id: I23775a334812b096192c7f44c4a3cb06f4b08705
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 04:50:35 +01:00
Jason McDonald
ea415e2060 Cleanup corelib autotests.
When using QSignalSpy, always verify that the signal spy is valid.  This
will cause the test to give a meaningful failure when spying on a
non-existant signal.  Without this change, tests that spy on a signal to
ensure that it is not emitted (i.e. by comparing the spy count to zero)
could pass erroneously if something went wrong when creating the signal
spy, as an invalid QSignalSpy will always return a count of zero.

Change-Id: I41f4a63d9f0de9190a86de237662dc96be802446
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 04:48:11 +01:00
Jason McDonald
1e7296f3f2 Remove mention of Trolltech in qlibrary autotest.
Task-number: QTBUG-19653

Change-Id: I8cf21bac41b08187528ba7004a7a23b9baa64b17
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 04:48:06 +01:00