summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QUrl: methods for converting QStringList <-> QList<QUrl>David Faure2013-01-141-0/+21
| | | | | | | This is a very common thing to do, e.g. in order to send urls via DBus. Change-Id: I277902460ee1ad6780446e862e86b3c2eb8c5315 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add class QDebugStateSaver for writing QDebug operators correctlyDavid Faure2013-01-141-3/+51
| | | | | | | | | Had to move QTextStreamPrivate to a private header, to be able to use its new internal Params struct from qdebug.cpp Change-Id: If28e25f27bbd04b1825a5eb3e2ef83ecad72e7b2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Added QMessageAuthenticationCodeRuslan Nigmatullin2013-01-144-0/+160
| | | | | | | | | | QMessageAuthenticationCode is HMAC implementation based on QCryptographicHash abilities. HMAC is often used in OAuth and similar authentication protocols. Change-Id: Ifc73947ad06c36a1b770315b7e89ba5c01c5e79e Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QDBusPendingReply behave like QDBusReply when dealing with errorsThiago Macieira2013-01-141-0/+7
| | | | | | | | | | | | | | | QDBusReply allows one to extract a QVariant and the type reply from an error reply and getting a default-constructed value. This is useful when a valid reply can never contain the default-constructed value (0, false, empty strings, empty arrays, etc.), so it simplifies error checking. More importantly, qdbusxml2cpp was changed a while ago from generating QDBusReply to generating QDBusPendingReply, so we need to have the same behavior. Task-number: QTBUG-29046 Change-Id: Ia873b9fd4311c0d4e94f0ef623ba405c20bc0e8c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QString::contains overload that returns the match resultsGiuseppe D'Angelo2013-01-141-0/+49
| | | | | | | | | | | | | | | | | | | | | This convenience overload allows one to write QRegularExpression re1, re2, ...; QRegularExpressionMatch match; QString subject; if (subject.contains(re1, &match)) { // ... } else if (subject.contains(re2, &match)) { // ... } // .. One can then inspect the results of a successful match in each block (as well as extracting the captured substrings, etc.). Change-Id: I0fb8be8b577656e8db994198f8105c26c4fe67b0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Introduce default ctors for QRegularExpressionMatch(Iterator)Giuseppe D'Angelo2013-01-142-0/+26
| | | | | | | | This allows to put them in containers, and to enable subsequent features for QString. Change-Id: I3b3fe695ffe6930331ed9f670738376722e0fc36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Implement QAccessibleActionInterface in QAccessibleTableCellJosé Millán Soto2013-01-111-0/+35
| | | | | | | | | | | | Implemented QAccessibleActionInterface in QAccessibleTableCell to allow selecting and unselecting table cells, as there was no way of selecting or deselecting a simple cell using accessible tools. tst_qaccessibility.cpp was modified to test the new methods. Change-Id: I7bdfe0b363a9813d4a7c62e96b6c924b163f2121 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Ensure raster pixmap cache key is the same as that of pixmap.toImage()Michael Brasser2013-01-111-0/+23
| | | | | | | | | | This is done to support texture uploads in an image provider. It ensures we can load the texture using QImage in the image provider, and when it is later painted as a pixmap, the cacheKey will be identical (assuming no format conversion was required). Change-Id: I54229511ed91ce5430cc478af5aff0d96685a2da Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Clean up some metatype declarations and registrationsStephen Kelly2013-01-098-22/+3
| | | | | Change-Id: I0826f6502cc45279f29f248f5f28f4fc9e6c8b4e Reviewed-by: David Faure <david.faure@kdab.com>
* Merge branch 'stable' into devSergio Ahumada2013-01-0926-5/+59316
|\ | | | | | | Change-Id: I7f0dab6bdb1f3cc1d3e6c30166ff6db9dfae37e9
| * test: Add bic data for linux-gcc-ia32Sergio Ahumada2013-01-088-0/+59020
| | | | | | | | | | | | Task-number: QTQAINFRA-321 Change-Id: I990f0c525fbd0b0b3818b0f7d86ed99438821baa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix warnings about not being able to set Window geometry on Windows.Friedemann Kleint2013-01-0817-5/+171
| | | | | | | | | | | | | | | | | | | | Fully decorated windows cannot be smaller than 160x30 (Large fonts). Enlarge Windows or remove Window frame to get rid of decorations. Task-number: QTBUG-28611 Change-Id: Idb6ee94fb8d0760d5f97042b3084557f11e9fdf9 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Add auto test for HTTP cache fix for QTBUG-28035.Michael Brüning2013-01-081-0/+125
| | | | | | | | | | | | | | | | | | Adds an auto test that verifies that the replies to POST and PUT requests are not cached even though they contain a max-age header and that subsequent GET requests are reloaded from the server. Change-Id: I188ae1200cb5551e164722c0f479719be8d11bfb Reviewed-by: Peter Hartmann <phartmann@rim.com>
* | Merge "Merge branch 'stable' into dev" into refs/staging/devJędrzej Nowacki2013-01-07133-340/+59391
|\ \
| * | Merge branch 'stable' into devFrederik Gladhorn2013-01-07133-340/+59391
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp Change-Id: I6b8d505fc22f052c307ca27f58f7d16f98965f47
| | * Add bic data for tst_bicSergio Ahumada2013-01-069-7/+59027
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Add initial set of amd64 data - Add QtWidgets to global.cfg Task-number: QTQAINFRA-321 Change-Id: I9bffaa00ac01976546629988ac69965383eb2efd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Update qlocale autotestMehdi Fekari2013-01-061-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add additional tests for the updates in the Qt4.8 qlocale data (CLDRv2.0) already existing in Qt5 locale data (CLDRv22.1): - The NumberingSystem for some Indic and Slovak locales. - The Month/Day name in Irish/Gaelic locale. - The AM/PM Text in Turkish locale. Change-Id: Iaea4f13ec79f94ab937b97f8ae60eb8d8f217c4b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Tests: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-069-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: Ifd116dee32a450ff89a9a1011e26b434765d6e95 Reviewed-by: David Faure <david.faure@kdab.com>
| | * Widgets: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-0438-91/+1
| | | | | | | | | | | | | | | | | | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: Ibe8e2ec867afb4051a3c7eef806d9cd86945928b Reviewed-by: David Faure <david.faure@kdab.com>
| | * Gui: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-0417-50/+0
| | | | | | | | | | | | | | | | | | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: I95b8b4b674e85b2b3c374931f6231d60f35be984 Reviewed-by: David Faure <david.faure@kdab.com>
| | * Core: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-0426-61/+0
| | | | | | | | | | | | | | | | | | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: I54523eb854619917123d8816d3cd6c3a1f5b4c55 Reviewed-by: David Faure <david.faure@kdab.com>
| | * Don't increase the reference count if dynamic_cast failedThiago Macieira2013-01-044-0/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the dynamic_cast failed in QSharedPointer::dynamicCast or qSharedPointerDynamicCast, we should avoid creating the QSharedPointer that shares the weak and strong reference counts. In Qt 5, this does not imply a leak since the original pointer is stored internally for deletion. In Qt 4 it implies a leak under certain circumstances, which this change fixes. Task-number: QTBUG-28924 Change-Id: Id2de140de4cf676461e14b201ad250c53666b79d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * SSL certificates: blacklist mis-issued Turktrust certificatesPeter Hartmann2013-01-042-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those certificates have erroneously set the CA attribute to true, meaning everybody in possesion of their keys can issue certificates on their own. Task-number: QTBUG-28937 Change-Id: Iff351e590ad3e6ab802e6fa1d65a9a9a9f7683de Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| | * Make textEditTest pass on Windows 8Jan Arve Saether2013-01-041-4/+19
| | | | | | | | | | | | | | | | | | | | | We make it pass by relaxing the comparison of the characterRect.... Change-Id: I900e0601d9e1e568c12a3952cf42657743345013 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * Fix autotest of textEditTest to use currentFont() instead of font()Jan Arve Saether2013-01-041-3/+3
| | | | | | | | | | | | | | | Change-Id: I5c9b2ad494a7daf9b07804f77c4692d49e774261 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * DBus: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-045-48/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. In some cases, the type is required to be registered with the typedef name, so those Q_DECLARE_METATYPE uses remain for now. In a future patch we can also remove those and the typedefs themselves. Change-Id: I5721955c86f566ae09024203954840f817bd3088 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| | * Fix QGuiApplication::keyboardModifiers() and QGuiApplication::mouseButtons()Jon Severinsson2013-01-041-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous commit b2363a935c8dac fixed keyboardModifiers() after QPA event processing, but broke QTestLib, which expects spontaneous input events sent to qApp->notify() to update keyboardModifiers() and mouseButtons(). The commit also did not fix mouseButtons() after QPA event processing, and missed keyboardModifiers() after QPA Tablet event processing. This commit fixes all these shortcommings in b2363a935c8dac. Includes test case by David Faure <faure@kde.org> Task-Number: QTBUG-26887 Change-Id: I8518b06c4ce86ea7b35120e3353a45ea2a81d356 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Cleanup verifyHierarchy. Remove dead code and add indexOfChild testJan Arve Saether2013-01-031-5/+3
| | | | | | | | | | | | | | | Change-Id: I4f423cf2f08b657329b7fb5e225e7b8b3f17e4af Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * Benchmarks: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-038-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: Iba4b7f8ff7a1c7974d144b955cbf064e43b36ec7 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| | * Network: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-034-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: Ifdce72af844901665c4ebab11507216ba5f00fc1 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| | * Don't read from deleted member variablePeter Kümmel2013-01-031-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | QNetworkProxy::setApplicationProxy deletes factory set by QNetworkProxyFactory::setApplicationProxyFactory. Change-Id: Iaafd62d1cdb2045d69c7359cacc513056216826c Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| | * Fix possible crash in QTextDocumentEskil Abrahamsen Blomfeldt2013-01-031-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With trailing spaces in some cases, we would not get the "no justification at end of paragraph" special case, and continue in the code, getting the unexpected case where line_length becomes < 0 which would lead to memory corruption because we were writing outside our buffers. I added an assert to catch this type of bug earlier, and I added the trailing spaces to the test for the end of the paragraph. The test case added is one example which would crash. Task-number: QTBUG-27354 Change-Id: Id720a6fa55dbc709ce04dd5321e55687bf960d75 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Remove metatype registration of built-in types.Stephen Kelly2013-01-0322-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | As they are built-in, they are effectively registered at compile-time already. Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | | Introduce QRegularExpression::NoMatch match typeGiuseppe D'Angelo2013-01-071-21/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This match type doesn't do any match at all; it's only necessary to properly introduce default constructors for QRegularExpressionMatch and QRegularExpressionMatchIterator (since they return the match type that created them). Change-Id: Ibfe92459c7fdd23129cf3afe073cd443c461ddeb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Provide operators for QMargins.Friedemann Kleint2013-01-071-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide addition/subtraction for QMargins as well as multiplication and division for int/qreal similar to QPoint. Add unary minus. Change-Id: If4eb831cfd610b34b5ca361619b1636031811d0a Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Add API dealing with QMargins to QRect.Friedemann Kleint2013-01-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Addition of a QMargin to a QRect. - Removal of a QMargin from a QRect. - Remove implementation from Windows platform plugin. Change-Id: Iae54bc13e94a7ece48853b1d3f3de2bfc154d2dd Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Improve QRegularExpression autotestsGiuseppe D'Angelo2013-01-071-0/+9
|/ / | | | | | | | | | | | | | | | | Check that the regular expression, the match type and the match options returned by QRegularExpression/QRegularExpressionIterator are the same ones passed to match / globalMatch. Change-Id: Ibd282379bb60b53d614b1d56a7e08b3d6c236da6 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* | Automatically register method types in QSignalSpy.Stephen Kelly2013-01-071-0/+36
| | | | | | | | | | Change-Id: I3655291dca6dbd3d8d09ee835b85983caa911b64 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Introduce QRegularExpressionValidatorGiuseppe D'Angelo2013-01-074-0/+126
| | | | | | | | | | | | | | | | QRegularExpression counterpart for QRegExpValidator. Change-Id: Ib391e73dd49e32aeb9b48e6f2217b67a17a83a11 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Merge branch 'stable' into devFrederik Gladhorn2013-01-04236-547/+1281
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/painting/shared/shared.pri src/corelib/tools/qharfbuzz_p.h src/corelib/tools/qunicodetools.cpp src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
| * test: Change trolltech.com:443 to qt-project.org:443Sergio Ahumada2013-01-031-1/+1
| | | | | | | | | | | | | | | | trolltech.com seems to be shut down already Change-Id: Ic90ce01aeb51b6f154b9bbf4762c365a398c9e3d Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Speed up and fix QByteArray::setNum()hjk2012-12-301-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | Going through QLocale and QString is not really needed. This also makes the result of the conversion of negative numbers in bases other than 10 independent of the architecture and implements the documented behavior of treating them as unsigned types. Change-Id: Ibc231dc5241deb5cbadd9796484a8b5f79c29410 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Add test for QByteArray::setNumhjk2012-12-281-0/+27
| | | | | | | | | | | | Change-Id: I66f3954433bf50fb23fdaeef804838d993e965b5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Fix QMutex::tryLock with negative valuesThiago Macieira2012-12-231-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | The Linux futex implementation had a Q_ASSERT for positive values, but the documentation says that negative values should be interpreted as infinite (equal to lock()). Test that too. Change-Id: I2f96a502d672732781e88e49797756ca9a809121 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * QUrl::fromUserInput: fix for urls without a host.David Faure2012-12-231-0/+4
| | | | | | | | | | | | | | | | | | | | QUrl::fromUserInput("http://") was invalid, which doesn't make sense since QUrl("http://") is valid. Same for "smb:" which is actually even more a valid URL from a user's point of view. Change-Id: I371ac393d61b49499edf5adbbc2a90b426fe9e5d Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix QSqlQuery test in relation to PSQL supportAndy Shaw2012-12-222-14/+28
| | | | | | | | | | | | | | | | | | Some things needed to be corrected for testing with PSQL, this was checked against the the PostgreSQL documentation to confirm that the exepected behaviour is correct. Change-Id: I45a6b343e9eb920fcae2a62910ecc956abcac0f0 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Make sure that the strict parser is also operating on setXxxThiago Macieira2012-12-211-0/+78
| | | | | | | | | | | | | | | | | | | | | | These cases weren't handled before. The validateComponent function is copied from QUrlPrivate::parse, with the added modification that it now needs to check the gen-delims for the userinfo. Change-Id: I055167b977199fa86b56a3a7259a7445585129c6 Reviewed-by: David Faure (KDE) <faure@kde.org>
| * add and use qtHaveModule() functionOswald Buddenhagen2012-12-2142-47/+47
| | | | | | | | | | | | | | | | | | | | | | this is much more elegant than the so far propagated !isEmpty(QT.foo.name). also replace feature-specific tests (no-gui and no-widgets) and the obsolete contains(QT_CONFIG, foo) syntax. Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Fix some typosSergio Ahumada2012-12-213-4/+4
| | | | | | | | | | Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * Add a manual test for QFile.Friedemann Kleint2012-12-213-0/+149
| | | | | | | | | | | | | | | | | | Add a command line program allowing to test rename, copy, etc. Task-number: QTBUG-28246 Change-Id: Ie9667f03b65a874475700ec9ecd91ca2ed32ed97 Reviewed-by: David Faure (KDE) <faure@kde.org>