summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Make the supportedDragActions a virtual accessor.Stephen Kelly2012-01-101-3/+17
| | | | | | | Change-Id: I4001fcabc67e5b46465b3c9111c33247c52e5788 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Make the roleNames a virtual accessor.Stephen Kelly2012-01-101-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | This is consistent with the rest of the API of QAbstractItemModel (which is virtual) and removes the need for code like this in the constructor (where it doesn't belong): QHash<int, QByteArray> myRoleNames = roleNames(); myRoleNames.insert(Qt::UserRole + 1, "myCustomRole"); setRoleNames(myRoleNames); in favor of MyModel::roleNames() const { QHash<int, QByteArray> myRoleNames = QAbstractItemModel::roleNames(); myRoleNames.insert(Qt::UserRole + 1, "myCustomRole"); return myRoleNames; } which is consistent with all other QAIM API (eg, flags()). This is a source compatible change. Change-Id: I7e1ce17f8dab2292c4c7b6dbd3c09ec71b5c793b Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
* Reimplement QVariant to QDebug streaming.Jędrzej Nowacki2012-01-101-0/+62
| | | | | | | New implementation fixes some commented code marked as FIXME. Change-Id: If8f5bebedd65bcf8f839d804c2022ca79ef82ddf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Accessiblity State as bit field.Frederik Gladhorn2012-01-101-56/+81
| | | | | | | | | | | We would like to add more flags that will be over the 32 bit boundary. On Windows enums don't seem to digest values >32 bit. This patch changes the state flags to be a bit field instead. The windows part of the patch was written by Jan-Arve Sæther. Change-Id: I2d1d87807f920ce4d4a5c7bfea8b1122ed44eb08 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-103-2/+2
| | | | | | | | The previous change missed some headers from years prior to 2011, and a few new files were merged after the previous change. Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove the unused QTRY_COMPARE macro from bearer auto tests.Xizhi Zhu2012-01-101-15/+0
| | | | | | | | The custom QTRY_VERIFY macro is needed since the one provided by testlib does not support custom timeout. Change-Id: I12bbc5efcb16c4f53514ad738d6115d217a55b05 Reviewed-by: Alex <alex.blasche@nokia.com>
* Remove ICD plugin for bearer.Xizhi Zhu2012-01-106-371/+1
| | | | | | | It's only used by Maemo and Harmattan, thus not needed in Qt5. Change-Id: I8638f4fc63637be88d1aa584cde7e3a4116f2de6 Reviewed-by: Alex <alex.blasche@nokia.com>
* Add V3(md5) and V5(sha1) version for DCE in QUuidLiang Qi2012-01-101-2/+26
| | | | | | | | | | Add the above versions based on RFC4122 standard. Done-with: Hagen Rother Task-number: QTBUG-23071 Change-Id: Ieb90925374d1e3c85011b899b8dd3bb1a608c561 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Changed selftests unittest to use specific headers instead of QtCore.Kurt Korbatits2012-01-1027-30/+29
| | | | | | | | | | | Changed selftests unittest to use specific classes of QtCore instead of pulling in all of QtCore headers by using include <QtCore> - Decreasing build time. Change-Id: Ic53a70423ecafeb342cc05ae6d7dee795533d205 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Improve QDateTimeEdit autotest.Jason McDonald2012-01-101-5/+5
| | | | | | | | | | | Reinstate a check that was presumably disabled because it wasn't checking for the right expected date. At present pressing Enter in a QDateTimeEdit without changing the date still emits the dataChanged() signal. By reinstating the test, we ensure that the behaviour can't change by accident. Change-Id: I1b766af6ced001a4191606247338dbc91049cb8d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* If decodestring can't translate the string return Qt::Key_unknown.David Faure2012-01-101-0/+6
| | | | | Change-Id: Ie082b326e944a28b4e29984a527e3841a05b32f6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix memory leak in QDomDocument entity text expansionSami Rosendahl2012-01-101-2/+2
| | | | | | | | | | 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. Re-enabled commented-out test data tst_QDom::setContent to exercise the code path with the leak. Change-Id: Ieb015d68ba9bbb3f20dd47e76835ad15abb1738e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Avoid using 'check' as an identifier.Stephen Kelly2012-01-101-4/+4
| | | | | | | Avoids conflict with macro on Mac OS. Change-Id: I79d78283b45bc97032d6a94139ee750ec01e9c0a Reviewed-by: hjk <qthjk@ovi.com>
* Avoid using check as an identifier.Stephen Kelly2012-01-101-8/+8
| | | | | | | Avoids conflict with Mac OS. Change-Id: I72a1218d101fdf2fa40f80934a6157ed26e699a1 Reviewed-by: hjk <qthjk@ovi.com>
* Avoid using check as an identifier.Stephen Kelly2012-01-101-6/+6
| | | | | | | Avoids conflict with Mac OS. Change-Id: I64856a64808dcd481f6075eb4f3a7cc19950bad3 Reviewed-by: hjk <qthjk@ovi.com>
* Add missing subdirectory to kernel.pro file.Jędrzej Nowacki2012-01-101-0/+1
| | | | | | | QMetaPropery test was not build by CI. Change-Id: I27407e8df674414c2d74f3aa1e4cbb809969c040 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Changed qprocess unittest to use specific headers instead of QtCore.Kurt Korbatits2012-01-102-2/+5
| | | | | | | | | Changed qprocess unittest to use specific classes of QtCore instead of pulling in all of QtCore headers by using include <QtCore> - Decreasing build time. Change-Id: Ifc7911548e4a9323726093ac1d35e4ce38b5f8ad Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove execute permission from files that don't need it.Jason McDonald2012-01-101-0/+0
| | | | | Change-Id: Ib92875289cdd9831f35301c566fb567acc725bb6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Make sure cursor navigation in qtexttable works like user expectsC. Boemann2012-01-091-7/+127
| | | | | | | | Before the selection of cells NW of anchor showed some defects where cells would not be selected as the user expects Change-Id: Ia2b63f11b8d534e918ffb97b76339d60f1ca0389 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Make the meta type shortcut in this test more robust.Stephen Kelly2012-01-091-6/+6
| | | | | Change-Id: Ie9f5ea3a62c80b2a4255eda0995133d0471c7538 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove QtV8 library from QtBaseSimon Hausmann2012-01-098-642/+0
| | | | | | | | | | The QtV8 library is going to live in the qtjsbackend module. Change-Id: I72251316163829411dda998b9503ce6f75b3606a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Avoid using 'check' in QSharedPointer test.Stephen Kelly2012-01-092-44/+44
| | | | | | | Avoids conflict with macro on Mac OS. Change-Id: Ia8301f52c879d941eece0fa6ae47a4c21d4e6490 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the Q_TYPENAME define.Stephen Kelly2012-01-081-1/+1
| | | | | | | | | | | | | It is mostly not used (most places in Qt use typename directly), so is already not very useful. For example typename is used in: QDataStream& operator<<(QDataStream& s, const QVector<T>& v) Change-Id: I85337ad7d8d4ebbb424bfa2ab9a356456ff3e90f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Removing QHttp class, its tests and its usage in examples.Jonas M. Gastal2012-01-0617-5351/+40
| | | | | | Task-number: QTBUG-22750 Change-Id: I161fad772bfb26797e6ee9d69da925b6747c371f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove all references to QAccessible:: {Child|Ancestor|Sibling}Jan-Arve Saether2012-01-061-160/+38
| | | | | | | | | | | These are deprecated in favor of QAccessibleInterface::child() and QAccessibleInterface::parent() QAccessible::Sibling can be done with a combination of those two. This is handled by the bridges, if required. Change-Id: I2e2a6eb2a982e7c9001a393d69f0c5f1ae9c0970 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Move the qitemmodel test to the itemmodels directory.Stephen Kelly2012-01-067-1/+1
| | | | | Change-Id: I67e1008bea0d94ffbc52aad453a29645261e109e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove all non-inline of qMalloc/qFree/qRealloc.Robin Burchell2012-01-062-7/+7
| | | | | | | | | | | | We're trying to deprecate these, so don't use them anymore. The inline uses of these have been left intact, for the moment. Inline code will need to create their own non-inline allocation methods (for future-proofing to allow alterations in how e.g. individual containers allocate) Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove redundant class from QStringMatcher test.Jason McDonald2012-01-061-10/+4
| | | | | | | | | 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>
* Add regression test for QTBUG-22660Sami Rosendahl2012-01-061-0/+23
| | | | | | | | | | 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>
* Fix memory leak in QDomDocument DTD entity declaration handlerSami Rosendahl2012-01-061-0/+25
| | | | | | | | | | | | | 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>
* Fix memory leak in QDomDocument DTD notation declaration handlerSami Rosendahl2012-01-061-0/+24
| | | | | | | | | | | | 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>
* Make socket descriptors qintptr.Jonas M. Gastal2012-01-055-14/+14
| | | | | | | | | | 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>
* Fix compile error with qWarning() << myDateTime and QT_NO_DEBUG_OUTPUTDavid Faure2012-01-053-0/+85
| | | | | | | | | | | | | | | | 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>
* Removed QApplication::setInputContext()Pekka Vuorela2012-01-052-73/+14
| | | | | | | | 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>
* Update copyright year in license headers.Jason McDonald2012-01-05764-766/+766
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix memory leak in QAbstractItemModel autotest.Jason McDonald2012-01-051-0/+6
| | | | | | | | 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>
* Prevent QFileInfo test from leaving temporary files behind.Jason McDonald2012-01-051-20/+33
| | | | | | | | | | 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>
* Changed tests: qmake,selftest and lancelot to use QFINDTESTDATA.Kurt Korbatits2012-01-054-14/+20
| | | | | | | | | | 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>
* Registered QUuid in the metatype system as a builtin type.Denis Dzyubenko2012-01-052-0/+34
| | | | | | | 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>
* Introduced QOpenGLContext::aboutToBeDestroyed() signal.Samuel Rødal2012-01-051-0/+22
| | | | | | | | | 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>
* Fix QPainter::drawText with complex brushesSimon Hausmann2012-01-041-0/+24
| | | | | | | | | | | | Commit d52fd497f60a3c4456994f4f10e9451d611c9ea4 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>
* Pass notification of failure of watches onto the caller.Robin Burchell2012-01-041-30/+41
| | | | | | | | | | | | | | 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>
* Refactor QVariant handlers.Jędrzej Nowacki2012-01-041-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* fix invalid connection in tst_QProcess::lockupsInStartDetachedJoerg Bornemann2012-01-041-1/+2
| | | | | | Change-Id: I06f2d56f5c45c13bbe08707e6baad4f2aece39b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Avoid QCOMPARE outside test function in QSettings test.Jason McDonald2012-01-041-1/+9
| | | | | | | | | 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>
* Remove redundant debug code from QFileSystemWatcher test.Jason McDonald2012-01-041-4/+2
| | | | | | | | | | 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>
* Accessibility: extend listview unit test.Frederik Gladhorn2012-01-041-21/+39
| | | | | | | Test more functions from Table Cell. Change-Id: I43b8766138350ece781bdaba7ab10fde8542aa4f Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Make sure tst_QThreadStorage finds its subprocessBradley T. Hughes2012-01-031-0/+4
| | | | | | | | | 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>
* Use true and false in preference to TRUE and FALSE in tests.Jason McDonald2012-01-0330-432/+430
| | | | | | | | | 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>
* Remove support for dnotify QFileSystemWatcher.Robin Burchell2012-01-021-32/+1
| | | | | | | | | | 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>