summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Made it possible to run tst_qtjson test from shadow build directory.Denis Dzyubenko2012-01-262-8/+13
| | | | | Change-Id: I167737c91e01f055a2ce14db54dfcc6b74ad8c28 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Convert tst_qurl.cpp to UTF-8 (to make it editable in QtCreator)David Faure2012-01-261-18/+18
| | | | | Change-Id: I9baa445b11f65b28596e5b88746b72c5cf04fe77 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed QString::operator<(QLatin1String)Denis Dzyubenko2012-01-262-0/+29
| | | | | | | | | | | | | | QLatin1String now has a constructor that takes explicit length, which makes it possible to create QLatin1String that do not have null-termination character. Fixed QString::operator> and < to be safe in that case. In the same patch fixed qtjson which had operator< implemented in the same way. QString::compare(QLatin1String) is still broken and will be fixed separately. Change-Id: I48ec1183a6f44034129cc17312af854795085408 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Mark the single argument containers as movable.Stephen Kelly2012-01-261-0/+28
| | | | | | Change-Id: I1557b9f3c2d3ad805e1ab7bf4d49973f08664a79 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Automated metatype definition for template types.Stephen Kelly2012-01-261-0/+46
| | | | | | | | | | | | | | | | If T is defined as a metatype, then QList<T> is too automatically. So for example, no need to use Q_DECLARE_METATYPE(QList<int>) anymore. This is a source compatible change. Change-Id: I2ee8a7b9e28fe6d4775f6a05cce39aca8563e0c5 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Made QWindow::currentOrientation() a property.Samuel Rødal2012-01-261-2/+6
| | | | | | | | | | | | | | To match the previous QWindow::orientation() property which can be useful to access from QML. Also, removed the automatic translation of Qt::PrimaryOrientation to QScreen::primaryOrientation() on the QWindow level, as it leads to a lot of complexity regarding the QWindow::contentOrientationChanged() signal, and makes it hard to distinguish between the case where the window's orientation follows that of the screen, and the case where the orientation just happens to be set to that of the screen. Change-Id: I6950d1337b7f929815eff1328181855090d8066b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix a couple of edge cases for WildcardUnix matchingAndy Shaw2012-01-261-1/+3
| | | | | | | | | | | | | | Fix a couple of cases where WildcardUnix was not matching when the string was just [] or ended with a \. The testWildcardEscaping() test has been extended to account for these two cases too. Integrate 7ce3726aea4be2dfdb57966a4482f66fec6f8f57 from 4.8 Task-number: QTBUG-20897 Change-Id: I7a07ac008473fa7a080db752e189f6404842603f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QTextControl and QLineControl.Andrew den Exter2012-01-252-67/+4
| | | | | | | | QtWidgets and QtDeclarative now both have their own versions of these so there's no need to keep them around any longer. Change-Id: I9c2201c8495a0a0816e2af16c8f647fcad991479 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Cleanup mess in public type ids.Jędrzej Nowacki2012-01-25130-13/+139
| | | | | | | | | | | | | | | | | | There is no reason to keep two separated core types sets. It couldn't be fixed before Qt5 because of binary compatibility promise. This patch merges QMetaType core types with ext core types. This "simple" operation consists of: - QDataStream version was incremented, because type ids are saved in QVariant's data stream. - QMetaType LastExtCoreType and FirstExtCoreType were replaced by LastCoreType, FirstCoreType and new QMetaType::HighestInternalId. - New tests checking QVariant data stream for Qt4 and for Qt5 versions were added. Change-Id: I02dd74d29317365c297a789a4eb7c9c5edc3b231 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* QAbstractSocket / QSslSocket: add API to pause and resumePeter Hartmann2012-01-251-17/+93
| | | | | | | | | | | | | | | pause and resume is currently only supported upon emitting the QSslSocket::sslErrors() signal. The API was added in QAbstractSocket to also support QAbstractSocket::proxyAuthenticationRequired() in the future. This is the first patch to support that feature on the socket level, another patch will follow to support sslErrors() and authenticationRequired() in QNetworkAccessManager / QNetworkReply. Task-number: QTBUG-19032 Change-Id: Ide2918268590ab9a01454ab26cb7fdca3dc840ab Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-253-3/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* moc: Use QMetaType::QVariant as the type for QVariantKent Hansen2012-01-252-1/+16
| | | | | | | | | | | | | | | | | | | QMetaType::QVariant has existed as a proper type for almost two years, but the qvariant_nameToType function was written in 2006. Using QMetaType::QVariant means QVariant can be treated just like any other type. We can get rid of those hacky checks for LastType, and the remaining checks become more readable. The fact that QMetaProperty::{type,userType}() returned LastType (0xffffffff) for QVariants was never documented (LastType itself is internal). But there are other Qt modules that assume so. I'll fix the ones I know about (qtdeclarative, qtscript, activeqt). Change-Id: I799b9079bb8bbb1fe76c132525440b30415cbac5 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* tst_qobject: Run as console application.Friedemann Kleint2012-01-252-3/+3
| | | | | Change-Id: If3049249cf8ceeb0985d158209e217455bfc3c47 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove support for the MNG file format and the bundled libmngaavit2012-01-2514-56/+1
| | | | | | | | | | | | | The MNG file format is generally abandoned, and libmng has been unmaintained for several years. The MNG plugin and bundled libmng has been moved to the qtimageformats project on Gerrit. Task-number: QTBUG-21869 Change-Id: I946432347014ffde2b72307a5f8b166ca5553602 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add a changed() signal to QValidator.Andrew den Exter2012-01-253-0/+49
| | | | | | | | | This provides a general notification of changes that may change the validity of previously validated input. Change-Id: I5ec6f127af60fdca68605fee903a08758bc01360 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QKeySequence: fix copy/paste error in autotestDavid Faure2012-01-251-1/+1
| | | | | Change-Id: If03a99c9aa7210d3f166c2674831c645f67b1794 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add autotest for failing signal connection.Friedemann Kleint2012-01-241-0/+6
| | | | | Change-Id: Iaae93253fa6d1ca0798d05d69a7ab6d6ff8b60bc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Re-enable 'make check' for tests/auto/widgetsBradley T. Hughes2012-01-241-1/+0
| | | | | | | | We want the autotests for the QtWidgets library to be run on Mac OS X as well. Change-Id: Ie731b802b64222c84116e2df82f536acf4971565 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* add missing move* methods to QAbstractItemModelMark Brand2012-01-241-0/+94
| | | | | | | | | | | | | | The existence of QAbstractItemModel virtual methods moveRow, moveColumn, moveRows, and moveColumns is implied by the existence of beginMoveRows, endMoveRows, beginMoveColumns and endMoveColumns. However, these were not actually provided by QAbstractItemModel. With this change, subclasses can implement support for moving rows and columns following the same pattern as for insert* and remove*. Change-Id: Iad8b2223d4b9303abb6459c174a82ffed71a0fdf Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make mid() and midRef() properly return empty, non-null objectsGiuseppe D'Angelo2012-01-242-4/+12
| | | | | | | | | | | If we request a substring starting at the very end of the string, QString::mid should return an empty string, not a null string. For instance, QString("abc").mid(3, 0) used to return a null one, while this patch makes it return an empty one. The same thing applies to QString::midRef() and QByteArray::mid(). Change-Id: Ie9efd7a0622d429efd0fb682c19856c19e9469af Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Made window orientation API more flexible.Samuel Rødal2012-01-242-5/+34
| | | | | | | | | | | | | | | Previously we only had QWindow::setOrientation() which was a hint about the orientation the window's contents were rendered in. However, it's necessary to separate between the orientation corresponding to the window buffer layout and orientation of the contents. A game for example might typically want to use a landscape buffer even on a portrait device. Thus, we replace QWindow::orientation() with QWindow::reportContentOrientationChange() and QWindow::requestWindowOrientation(). Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Import json support from playground/qtbinaryjsonLars Knoll2012-01-2410-1/+1762
| | | | | | | | | | | | | This imports the JSON support for Qt 5 from playground/qtbinaryjson. It adds a fast, fully compliant json parser, a convenient C++ API, conversion to and from QVariants and a binary format for JSON that is extremely fast to use together with the C++ API. Change-Id: If9e3a21a4241d388d0abaa446b6824f9cc6edb1c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Store the is-a QObject fact with the metatype declaration.Stephen Kelly2012-01-244-4/+60
| | | | | | | | | | | | | | This is a source incompatible change for Q_DECLARE_METATYPE(T*), which now requires T to be fully defined. The consequences of this are: * Forward declared types can no longer be declared as a metatype. (though this is a very uncommon thing to do). There is a trivial workaround where necessary. Change-Id: Id74c40088b8c0b466fcd7c55abd616f69acc82c8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>