summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Adding a QHeaderView benchmarkThorbjørn Lund Martsum2012-02-013-1/+273
| | | | | | | | | | This is a small QHeaderView benchmark. It measures visualIndexAt, hideSection, showSecion, moveSection, insert, remove and trunc rows. Change-Id: Ibca6a2e130f4ab27d68f51e5e341a78579abd1bf Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* 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-313-20/+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-3153-289/+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-315-30/+1
| | | | | 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-314-4/+4
| | | | | 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-301062-1061/+1062
| | | | | | | | | | 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>
* QUrl: deprecate setEncodedUrl() and fromEncoded(), add url().David Faure2012-01-281-8/+4
| | | | | | | | | setEncodedUrl() isn't necessary anymore now that setUrl can handle encoded (and partially encoded) urls. url() is added for symmetry with setUrl(). Change-Id: I4e671482a5635a86797421ca50882db9cd60d852 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: use partially-decoded data in toString and QUrl(QString)David Faure2012-01-281-44/+65
| | | | | | | | | | | | | This fixes round-trip bugs. People expect to be able to do QUrl u(...); QString s = u.toString(); QUrl u2(s); and have u==u2. This was not true for paths containing a '#', for instance, which would be parsed back as a fragment. The solution is to make toString output partially decoded data (more readable than toEncoded, but not decoded to the point of changing the meaning, if parsing it back later as a QUrl), and to make the QUrl constructor work with partially decoded data. Change-Id: I013c01e8947d538435f3c20fc4ec57cd9ccbba6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QHash benchmark: improve Java's hashGiuseppe D'Angelo2012-01-271-0/+11
| | | | | | | | Added a bit of documentation to the Java-like hashing function. Change-Id: I3f44eee305d91b76f0f89cd1acf21f6430b9482b Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QHash benchmark: remove unused variablesGiuseppe D'Angelo2012-01-271-3/+0
| | | | | | Change-Id: Ib5abc171fb8fb70e2f73ac92ca22dc09146d8a55 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QWidgets to use QGuiApplication focus object change notificationsPekka Vuorela2012-01-271-8/+4
| | | | | | | | | | | | | Moving away from deprecated QInputPanel inputItem. Small behavioral changes: - On focus proxy widgets, disabling WA_InputMethodEnabled on proxy will no longer disable input method for proxy target. - setEnabled(false) on proxy widget will no longer disable input method for target as a special case. Change-Id: Ifb5b7144d29bd3aefdde7cf4a0bd396db06e67e2 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* QGuiApplication::focusObject() to replace QInputPanel::inputItem()Pekka Vuorela2012-01-273-0/+125
| | | | | | | | | | | * Deprecated QInputPanel::inputWindow() which is already just returning QGuiApplication::activeWindow() * Deprecated QInputPanel::inputItem() and introduced QGuiApplication::focusObject(). Input methods can check input method support by Qt::ImEnabled query. Change-Id: I70a9c1c3f79aadb75c839d0489a9428f7a221df5 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Implement QWindow::close()Anselmo L. S. Melo2012-01-271-0/+16
| | | | | | | Implement the public slot QWindow::close() and add the correspondent test. Change-Id: If3f07cce3b26640f06fc52d0e4dca875d9894b3d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix a typo in tst_qtreewidget autotest.Jędrzej Nowacki2012-01-261-1/+1
| | | | | Change-Id: I573467c3fdfc4b3d059b216258d39944ac546061 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>