summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'gerrit/release' into stable" into ↵Frederik Gladhorn2013-01-152-2/+2
|\ | | | | | | refs/staging/stable
| * Merge remote-tracking branch 'gerrit/release' into stableFrederik Gladhorn2013-01-152-2/+2
| |\ | | | | | | | | | Change-Id: Ieb104d0e390218a063082c93bc9c7e412af2166d
| | * Fix crash in tst_qaccessibility.Friedemann Kleint2013-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Release the table item below the table test instead of releasing the text item twice. Change-Id: I74d283d50a39b9a4570b73a8297ed3dbb2de2271 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * Change all shmget calls to user-only memoryThiago Macieira2013-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Drop the read and write permissions for group and other users in the system. Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Fix renaming of files that differ only in case.Friedemann Kleint2013-01-151-2/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This currently fails on case-insensitive file systems since the check for existence then triggered and indicated "file already exists". Check on the file id (inode or file id) whether the target file is really a different file for a case-changing rename. Task-number: QTBUG-3570 Change-Id: I1b2d40850692e02142ee23d2c753428de00aedc6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QMenu: Fix nested popup when keyboard shortcut is usedOrgad Shaneh2013-01-141-0/+17
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-20403 Change-Id: I2a5fe00dd16e9dc1ec0d742a8f48083fc2954996 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
* | Resolve some race conditions on tst_QSharedMemoryThiago Macieira2013-01-142-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test runs fine almost all of the time on systems with 1 processor, which were the norm when the test was written and are still the way that the Qt Continuous Integration system works as of today. But it falls flatly on multi-processor systems. The root of the problem is that QSystemSemaphore recreates the semaphore if it disappears underneath it. However, the recreation process is not thread-safe at all: if two threads race to recreate it, weird things might happen. strace on Linux shows that a thread got stuck trying to acquire the semaphore: <... nanosleep resumed> NULL) = 0 stat("/tmp/qipc_systemsem_market5c9f73af73334ffe350c60ec076e5744db0ecda3", {st_mode=S_IFREG|0640, st_size=0, ...}) = 0 stat("/tmp/qipc_systemsem_market5c9f73af73334ffe350c60ec076e5744db0ecda3", {st_mode=S_IFREG|0640, st_size=0, ...}) = 0 semget(0x51001388, 1, IPC_CREAT|IPC_EXCL|0600) = -1 EEXIST (File exists) semget(0x51001388, 1, IPC_CREAT|0600) = 114786308 semop(114786308, {{0, -1, SEM_UNDO}}, 1 <unfinished ...> This problem does not happen if the creation and destruction of the QSharedMemory (which uses QSystemSemaphore) does not race with other threads or processes attaching and detaching. For the threads test it's easy. For the processes, we use stdin and stdout as a communication channel. Change-Id: Ie11b135431d4abfc59234654848b67f622eb03c9 Reviewed-by: Richard J. Moore <rich@kde.org>
* | tst_bic: Add bic data for QtConcurrent and QtPrintSupportSergio Ahumada2013-01-142-0/+20839
| | | | | | | | | | | | | | | | Task-number: QTQAINFRA-321 Change-Id: I2699a13c3d8a7df9b12049e0337501a4e24d2d64 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* | Fix incorrectly disabled autotestShane Kearns2013-01-111-1/+1
| | | | | | | | | | | | | | | | One of the IPv6 autotests was always disabled instead of being disabled only when the system has no IPv6 support. Change-Id: I34dffbeae6ba85a706bfeb0cc4750a4514b73a65 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* | Enable tst_qwidgetsvariant testJędrzej Nowacki2013-01-111-0/+1
| | | | | | | | | | | | | | The test for a magic reason was not build by default. Change-Id: I21c7fc959d76d6faac0091495f965f3da6d415b1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Add an autotest for Canadian locale(dateFormat)Mehdi Fekari2013-01-101-0/+4
| | | | | | | | | | Change-Id: I68a91a418c418e113ecfe66769a7b3bc46de380c Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | tst_bic: Remove 'timex' class from linux-gcc-{amd64,ia32}Sergio Ahumada2013-01-0916-80/+0
| | | | | | | | | | | | | | 'timex' is not a Qt class, so there is no need to check it. Change-Id: Ic77b3518e5a7eaf2c2bc7dcd98d1f9aebf4b655d Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Removed hardcoded values from tst_qgraphicsview::scrollBarRangesOliver Wolff2013-01-094-1197/+731
|/ | | | | | | | | | | | | | | | | | | Instead of testing the "windows" and "motif" styles, that test should actually test the scrollBarRanges for all available styles. To be able to do that, the magic numbers 16 (width/height of scrollbars) and 4 (spacing for the faux motif style) were replaced and instead of setting the explicit values in the data the "number of scrollbars/spacings to add/remove" is saved in a struct and the value of these (depending on the style) is obtained in the test run. This change does not also cause the fusion style to also be tested but also fixes this test for Windows 7 and 8 (Aero) where the scrollbar width/height is not 16 but 17. Task-number: QTBUG-28611 Task-number: QTBUG-29002 Change-Id: I5d103018fde81cee6e6e89cd414426768b2dc8e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* 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>
* Add bic data for tst_bicSergio Ahumada2013-01-068-0/+59020
| | | | | | | | | - 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-068-15/+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>
* 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>
* 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-2128-32/+32
| | | | | | | | | | | 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-212-2/+2
| | | | | Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Tests: stabilize tst_QAbstractScrollArea::setScrollBars2()J-P Nurmi2012-12-201-8/+8
| | | | | | | | | | | | Use QWidget::isVisibleTo(parent) instead of isVisible(), just like QAbstractScrollArea::replaceScrollBar() does. This removes the need of using QCoreApplication::processEvents() to deliver the actual hide event just for testing if the scrollbar was requested to be hidden as it should. Change-Id: Ie9a816e7b871d280a4b3d9d76adb10601915bd56 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QDBusXmlParser: more reliable solution for setting the seedDavid Faure2012-12-201-2/+8
| | | | | | | | | As recommended by Giuseppe, don't rely on the env var, but use the internal but exported seed atomic int. This way, the compiler will detect breakages, rather than runtime. Change-Id: Iec2bc88c53532d3463d2dc5c73631fc9bc34747b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixes: out of bounds memory access in QImage autotestaavit2012-12-201-2/+2
| | | | | | | | | | | | | A pointer to the data of one qimage is used, with an offset, in a copy. In the mono case, that could lead to overflow: the last row would of the copy would stretch 1 byte beyond the end of the allocated area. Fix by reducing the height of the copy, so that it keeps within the allocated memory. Task-number: QTBUG-28322 Change-Id: I09abfc83f738f8af000fc50f8c94f63dba3a6cfe Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QUrl auto tests: make sure setAuthority is consistent with setHostPeter Hartmann2012-12-201-0/+24
| | | | | | | ... with respect to empty and null strings. Change-Id: Ic107d5bcc8b659497a567b75a7244caceba5a715 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl auto tests: ensure toEncoded() and toString() match wrt. empty authPeter Hartmann2012-12-201-0/+6
| | | | | | | Task-number: QTBUG-8701 Change-Id: I55780a910a0d0996488475f5ce49a240f6223df0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qaccessibility: Fix warnings about window geometry on Windows.Friedemann Kleint2012-12-191-0/+22
| | | | | | | | | Make windows frameless so that size constraints for decorated windows do not interfere. Task-number: QTBUG-28696 Change-Id: Ic4410d8a6e8166bdfe013ed2362173f8e02d4b29 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Change ftp.qt.nokia.com -> ftp.qt-project.orgSergio Ahumada2012-12-182-23/+23
| | | | | | Task-number: QTBUG-28156 Change-Id: I0060144f0336791933205355b125251ccba73b3e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMdiArea: Increase minimum size for Windows 8/Large fonts.Friedemann Kleint2012-12-181-2/+2
| | | | | | | Task-number: QTBUG-28611 Change-Id: I115a5fa6726ac99c2bbff4ec65d3f8856b2530df Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>