summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Fixed selftests unittest on windowsKurt Korbatits2012-02-021-2/+8
| | | | | | | | | - Needed to add toLower() for compare as c:\ and C:\ was causing a failure. Change-Id: Idd55774d118b7249e88362688166b4f9d9712c7c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fixed qfile unittest on windowsKurt Korbatits2012-02-022-14/+7
| | | | | | | | | | | - Changed to set working directory based on subprogram stdinprocess's directory location. - Changed QProcess execution of subprograms to use relative paths. Change-Id: Idbccca635f0f61adba9721bcceeceb0a8a961dcf Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add selftest for xpass in a data-driven test.Jason McDonald2012-02-025-31/+71
| | | | | Change-Id: I9491d1e17ad31453ec353a11c9efb31522a16459 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve readability of expectfail selftest.Jason McDonald2012-02-025-92/+92
| | | | | | | | | Rename some of the test functions to improve consistency, and change the order so that all the xfail tests are together (some new xpass tests will be added later). Change-Id: Ice1ac5bf61bc26109bb0d08f72eb74e1a0424101 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add testlib selftest for counting of test results.Jason McDonald2012-02-029-1/+466
| | | | | | | | | | | | | | | | | | | | | | | The test simply generates each possible pair of Pass, Fail and Skip results. At present the test simply serves to demonstrate the current shortcomings of testlib's plain text logging, namely: * If a test function passes for all data rows, that is counted as one pass, but each skipped or failed row counts as one skip or fail. * Only skipped and failed rows are reported individually in the test output. Passed rows are not reported, so it is impossible to see how many rows were executed. * A skip followed by a pass will be reported as an overall pass for the test function, but the same rows in reverse order will not report any overall result for the test function. Future commits will attempt to correct these problems. Task-number: QTBUG-22124 Change-Id: If8c7ea15fc43ba9a1bccd0e881c1efc18e705b25 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Changed qtextbrowser unittest to work from install directoryKurt Korbatits2012-02-023-19/+14
| | | | | | | | | - Changed qtextbrowser unittest to use TESTDATA and QFINDTESTDATA Change-Id: I0ac7c990640d492d5ec94f5824c022a2b5075103 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Changed qlabel unittest to work from install directoryKurt Korbatits2012-02-022-10/+3
| | | | | | | | | - Changed qlabel unittest to use TESTDATA and QFINDTESTDATA Change-Id: Ide6755cd79caf91b553fb6b1412da6fbab583720 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Introduce QItemDelegate::destroyEditor virtual invoked at editor closeThorbjørn Lund Martsum2012-02-021-3/+29
| | | | | | | | | | | | | | This provides a stronger mechanism e.g when inheriting QItemDelegate. It makes some things much easier e.g avoid delete of an editor and maybe only delete depending on what the editor says itself. This introduces a new virtual function. Task-number: QTBUG-2299 Change-Id: I8410f8199775987dbacffd99e4c354fdadcdd21f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Extending the auto test for QHeaderViewThorbjørn Lund Martsum2012-02-011-3/+501
| | | | | | | | | This is a test that verifies correct behaviour of qheaderview. It includes test of swapSections, moveSection, rowcount-change, resizeSection, hideSection and position lookup. Change-Id: Idc1fe8167f2d95dee5c5b1161cb633cbf9495d17 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Windows: Fix inclusion of <windows.h>Friedemann Kleint2012-02-011-0/+3
| | | | | | | | | | | | | - Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* QtDebug: Include file, line, function informationKai Koehne2012-02-014-9/+191
| | | | | | | | | | | | | | Record the file, line, and function where a qDebug, qWarning, qCritical or qFatal call happens, and make this information available in a custom message handler. The patch uses the C preprocessor to replace qDebug, qWarning, ... with a line that also records the current file, line, and function. Custom message handlers can access this information via a new QMessageLogContext argument. Change-Id: I0a9b89c1d137e41775932d3b1a35da4ebf12d18d Reviewed-by: David Faure <faure@kde.org>
* QHeaderView - preventing negative section sizes.Thorbjørn Lund Martsum2012-02-011-0/+10
| | | | | | | | | | | | | | This patch removes the posibility to call resizeSection with negative sizes. Sections with negative sizes affect the other sections, and it does not seem to have a useful, well-defined semantic. The length can also become negative - and visualIndexAt work strange. Change-Id: I632beb160649fa10e2106314557b8c5a106aa3cf Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add the event loop quitlock feature to QtCore.Stephen Kelly2012-01-315-4/+712
| | | | | | | | | | | | | | | | A feature of a ref-counted quit (managed by a quit-lock class) is added to both QEventLoop and QCoreApplication. This allows, for example, an event loop to quit() when there is no more work for it to do. quitOnLastWindowClosed is implemented in terms of the refcount in QCoreApplication so that jobs can be completed before the application quits. Change-Id: I14c8f4e7ee12bbf81a6e5849290d4c8ff37fa110 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add support for cleanup functions for data-constructed QImagesSimon Hausmann2012-01-311-0/+37
| | | | | | | | | | | | | | | | A QImage can be constructed with a provided buffer, that has to be kept alive for the live-time of the QImage and all its copies. Frameworks like CoreGraphics or Cairo offer a similar method of creating image objects and also offer the ability to provide a callback function that is called when the image is destroyed. This patch adds this functionality to QImage by extending the QImage constructors that take a raw image buffer pointer. Change-Id: Ia6342408c560ef49b498c9e4664b4602febb0fcd Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Allow function types to be registered without workaroundsJoão Abecasis2012-01-312-5/+13
| | | | | | | | | | | | | | | | | Commit 4b8ceb41aed352f10d36db5284453f425dbc5f3f added the requirement that pointed-to types need to be registered when registering pointer types. Unfortunately, the implementation also affects function pointer types. This change whitelists 0, 1, 2 and 3 argument functions as not deriving from QObject, forgoing the need to workaround details of the type registration implementation when registering those function pointer types. Change-Id: I4d855e9d70a8179a6e31b84623ad5bf063e0d6d8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove many deprecated methodsLars Knoll2012-01-315-40/+38
| | | | | | | | | | Remove methods that have been marked as deprecated before Qt 4.6. Keep others, but inline them where possible and mark them as QT_DEPRECATED_SINCE(5, 0). Change-Id: If881821ae095f054b31cc13464f19e2007c20ed7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Mac: Fix compilation with -qtnamespace setKai Koehne2012-01-311-1/+6
| | | | | | Change-Id: Id3b9f4e3edf2caeac32c8a44278cdf05a1fc70fb Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Moving tiff image format support and libtiff out of qtbaseaavit2012-01-3144-287/+12
| | | | | | | | | | The tiff plugin and bundled libtiff is moving to the qtimageformats project on Gerrit. Task-number: QTBUG-23887 Change-Id: I4c848232fdccddd7e7f54215f9eaa78dc4c3a53d Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add public role names setter to QStandardItemModelChris Adams2012-01-311-0/+20
| | | | | | | | | This allows QStandardItemModel to be usable in QML without requiring clients to subclass it. Task-number: QTBUG-15067 Change-Id: I867fcd8137132affdf21f37a9fa293e855a09a13 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QDirectPainter is gone in Qt5Lars Knoll2012-01-317-345/+0
| | | | | Change-Id: I3ba8985c9c38be978198a4abd58775aa6f525968 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Remove Symbian specific code from qtbase.Xizhi Zhu2012-01-313-7/+0
| | | | | Change-Id: I27d37d914b71e1e43c94e2a975ffec49e1ecd456 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix QGuiApplication::topLevelWindows(), introducing allWindows()Anselmo L. S. Melo2012-01-311-0/+36
| | | | | | | | | | | | | As discussed on the development mailing list, the window list returned by QGuiApplication::topLevellWindows() included all QWindows, even the non top-level ones. This commit introduces the new method allWindows(), which returns the list of all QWindows, fixes the list returned by topLevelWindows() and also introduces tests for both methods. Change-Id: I761f0fcdec79f83949012c628655ed12cd18572c Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QValidator: Don't fallback to C Locale when validating inputJohn Layt2012-01-312-11/+11
| | | | | | | | | | QIntValidator and QDoubleValidator used to accept C formatted input if the input wasn't valid in the default locale. This change removes this, only the default locale is now used. Change-Id: I8b2d8f9f3849abe3fcb5c12083aae542a76eaf90 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove QIconEngineV2 and fold it into QIconEngineLars Knoll2012-01-311-28/+0
| | | | | | Change-Id: Ife590b7639f4aadcfbd4d77ca170285b623c14ae Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Windows: Fix autotests with -qtnamespaceKai Koehne2012-01-312-1/+8
| | | | | Change-Id: If367429dafc283b3b2d57dab593060055f65659d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* tst_qabstractitemmodel does not need QT += widgetsMark Brand2012-01-311-1/+1
| | | | | Change-Id: I6f615f849f77df19129efb82acaae387b17a787b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Changed qapplication unittest to work from installation directoryKurt Korbatits2012-01-316-25/+18
| | | | | | | | | | - Changed to use TESTDATA and installTestHelperApp() - Changed to use QFINDTESTDATA instead of currentPath() Change-Id: Ia24ebc758d5d0fdfcca951500766adefbcf9fe93 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Changed qlibrary unittest to use applicationDirPath()Kurt Korbatits2012-01-311-34/+34
| | | | | | | | | | - Changed unittest to use QCoreApplication::applicationDirPath() instead of QDir::currentPath(). Change-Id: I398f7ea8b4426be85432d0eb3767ef6d59488d0a Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact address in license headers.Jason McDonald2012-01-313-3/+3
| | | | | Change-Id: I35bf916087511f26bfeb49ceb3256d9a20fbc1c0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed qstandardpaths unittest to check before using first()Kurt Korbatits2012-01-311-0/+1
| | | | | | | | | | - Added check to testLocateAll() to check count() before calling first(). Change-Id: I04e93c1f913972b26c517f2bbd08760f9898cc7a Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Changed qsplitter unittest to work from install directoryKurt Korbatits2012-01-312-9/+2
| | | | | | | | | - Changed qsplitter unittest to use TESTDATA and QFINDTESTDATA Change-Id: I5db0fbfb20e6bd0ec169e884f16c1ec819f4e449 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed qicon unittest to use QFINDTESTDATAKurt Korbatits2012-01-311-2/+2
| | | | | | | | | - Two cases of image.png not being found when run from install directory Change-Id: I5f20b7a0ea0b120ce06c556b83bc20dd658a4f83 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed qmovie unittest to use QFINDTESTDATA in jumpToFrame()Kurt Korbatits2012-01-311-1/+1
| | | | | | | | | - jumpToFrame() updated to use QFINDTESTDATA Change-Id: I1b5ff92722e389e714eb58b37996f3e933e95489 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QDateTime: Add validity checksJohn Layt2012-01-312-2/+51
| | | | | | | Check the validity of date/time before attempting to perform maths. Change-Id: Ia6a2caf07c6c36f7d7fac713a77bc4eb456c6ed6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime: Add missing QDate Unit TestsJohn Layt2012-01-311-0/+137
| | | | | Change-Id: Idcc93cdc29739f0108b5629402b6b7a4b2c86657 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime: Deprecate setYMD()John Layt2012-01-311-0/+2
| | | | | | Change-Id: I077332df554fb750666d51486c97724411276679 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix bugs when using a non 0 terminated QLatin1StringLars Knoll2012-01-301-0/+7
| | | | | | | | | | A few methods in QString still assumed that QLatin1String is always 0 terminated. Change this to rely on the size provided by QLatin1String instead. Change-Id: I9145a46e52ed8811f3b4e3d72d8a81a12588760a Reviewed-by: Kevin Simons <kevin.simons@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix tst_QSslCertificate::toText on windowsShane Kearns2012-01-301-2/+2
| | | | | | | | Open the comparison file as text mode, so that it does not differ from the dumped certificate in CRLF vs LF line endings. Change-Id: I54d6ea6e37044059e89e762435657ebf5fa6cb39 Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix link error in QSslSocket auto testShane Kearns2012-01-301-2/+2
| | | | | | | | | This has been broken for months, but invisible because the code causing the link error is unreachable (due to QSKIP). So the link error only occurs in debug builds with -O0. Change-Id: I6093a7803bedf37bfc8c2d9ff0b28b2309b57959 Reviewed-by: Richard J. Moore <rich@kde.org>
* Add a null pointer check to QJsonObject::toVariantMapLars Knoll2012-01-301-1/+34
| | | | | | | | | | If the object is null, simply return an empty variant map. Added another test case checking conversion from QJsonArray to a QVariantList. Change-Id: Ieccd163e76630f7db7f41255acd9d1baf66bb38d Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* Add the missing test file and give it a proper name.Lars Knoll2012-01-302-3/+19
| | | | | Change-Id: Icb9bc2aab99d52b5ffbd6153ce94d64a494330d8 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Remove type id/name conversion for QVariant::UserTypeKent Hansen2012-01-301-1/+3
| | | | | | | | | | | | | QVariant::UserType does not correspond to an actual type named "UserType". This logic didn't make sense. Change-Id: I369911e514f7902fc863cb05174011d6fc15c447 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add support for DNS lookups using native APIsJeremy Lainé2012-01-305-0/+382
| | | | | | | | | | | | | | | | The QDnsLookup class provides asynchronous APIs for performing DNS lookups. For now, the following lookups are supported: - A and AAAA - CNAME as defined per RFC 1035 - MX as defined per RFC 1035 - NS as defined per RFC 1035 - PTR as defined per RFC 1035 - SRV as defined per RFC 2782 - TXT as defined per RFC 1035 Task-number: QTBUG-10481 Change-Id: I46c1741ec23615863eeca3a1231d5e3f8942495e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add the QAbstractItemModel::canDropMimeData method.Stephen Kelly2012-01-301-0/+32
| | | | | | | | | | | Can be used by views to indicate whether a drop is allowed (eg adequete permissions in a filesystem model). Change-Id: Iefedb5399e44c8edc5f5df1403c8d5c0da618612 Reviewed-by: Peter Penz <peter.penz19@gmail.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QHeaderView - length returns wrong value fixThorbjørn Lund Martsum2012-01-301-0/+21
| | | | | | | | | | | | | | | | | | | | setSectionHidden called with (logindex, true) will sometimes prevent a (correct) call to resizeSection(logicalIndex, 0). This seems a bit odd - however it does execute d->doDelayedResizeSections(). Therefore the section is going to be hidden later. However it is a problem that the length meanwhile is wrong. (That is a value that is not the sum of the sections) This is fixed by execute updates before returning the length. Task-number: QTBUG-14242 Change-Id: Ia1d2f6db3213792b250a6a37942b56554261cd3a Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-30767-767/+767
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix BC break with QAbstractFileEngine "mount points"Shane Kearns2012-01-291-1/+92
| | | | | | | | | | | | | | | | | | File system cached metadata can't be trusted when custom file engines are in use, because the custom file engine may want to override the metadata. (e.g. present an archive file as a directory) Therefore, check if a file engine should be instantiated for each result in QDirIterator. This is a fast check if no custom file engines are registered. When pushing a directory (using QDirIterator::SubDirectories) the file engine needs to be instantiated also. Task-number: QTBUG-23688 Task-number: ou1cimx1#965023 Change-Id: I0114c8df6258535553783a2486131c4194926649 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> (cherry picked from 3864ad09d578210b52e5f58fca2ee8a1144f5be2)
* Introduce QTypeInfo::sizeOf.Jędrzej Nowacki2012-01-291-4/+1
| | | | | | | | In QMetaType "void" is a regular type, lack of c++ sizeof operator force us to write a template specialization for the type. Change-Id: I9a56e135223b416b8031836d29ef33ef3fb750e4 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Get rid of checks for Qt3 typesKent Hansen2012-01-291-1/+6
| | | | | | | | | | | | | | These types don't exist anymore, so it's pointless to check for them. Also remove the dead types from uic's type-to-header map. Change-Id: I7f0af5c337859f3da1c103157a802bbe5372df9f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Call connectNotify when connecting with function pointerOlivier Goffart2012-01-291-0/+14
| | | | | | | | Some objects expect connectNotify to be called in order the signal to be emitted. Change-Id: Id0460d9c2aef8f9c3618a2b62b2119a790e06f30 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>