summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Reduce invocations of QFINDTESTDATA in tst_qfileinfo.Friedemann Kleint2013-01-211-31/+47
| | | | | | | | Introduce variables for the paths used in the test and check in initTestCase(). Change-Id: Ie801266e30cd860e5bdf079c1182fe385f9598c7 Reviewed-by: David Faure (KDE) <faure@kde.org>
* Fix temporary file leak in tst_qfileinfo.Friedemann Kleint2013-01-211-4/+3
| | | | | Change-Id: I0d679638d5a9564f612ae5e70717f164b74aefb0 Reviewed-by: David Faure (KDE) <faure@kde.org>
* Add support for defining properties from member variables.Gerhard Gappmeier2013-01-191-6/+117
| | | | | | | | | | | | | | | This associates properties with member variables and avoids writing getter and setter methods manually. The metaCall() method directly accesses the member variable, so additional method calls can be avoided. The metaCall() setter code also supports NOTIFY signals, which means the according signal is emitted when the property gets written. Task-number: QTBUG-16852 Change-Id: I88a1f237ea53a1e9cf65fc9ef2e207718eb8b6c3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix crashes in tst_qthreadpool on Windows.Friedemann Kleint2013-01-181-6/+28
| | | | | | | | | | | Qt 4.8 shows frequent crashes in runMultiple apparently caused by the QMutex construction in the free functions by different threads. Use a common QMutex class member instead. Change-Id: I851d4e2d3637a7b4f404ed843f5360c10caa21f5 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Output std error from qmake/make when the test fails.David Faure2013-01-171-1/+1
| | | | | | | | This is intended to make it easier to understand what's happening when this test is flaky during CI. Change-Id: I13163c244cb99414d90b5f71c365a4ff2216bc83 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSaveFile autotest: restore permissions using RAIIDavid Faure2013-01-171-8/+25
| | | | | | | So that the QTemporaryDir can happen even on error. Change-Id: I728d49eac8bd65e1919fd314a95387949e134de0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSaveFile: test the case of an existing, but readonly, target file.David Faure2013-01-171-2/+23
| | | | | Change-Id: I296d9c2598b8c72e2fd3e6ec80a615364b7eddeb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add class QSaveFile.David Faure2013-01-173-0/+240
| | | | | | | | | | This QIODevice uses a temporary file for writing, so that in case of write errors, the writing operation is canceled, without losing any existing file. It also avoids having a partially-written file visible by other processes, at the final destination. Change-Id: I9482df45751cb890b1b6f1382ec2eea3eb980627 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-1631-1300/+21637
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-1631-1300/+21637
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| | * 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-143-8/+20849
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | / Dialog testing tool: Control life cycle of non-modal file dialogs.Friedemann Kleint2013-01-162-6/+36
|/ / | | | | | | | | | | | | | | | | Keep the non-modal file dialog around and delete only on request, such that one can simulate repeated invocations of show() on the same dialog for testing native dialogs. Change-Id: I80d0f1dfafbc02a31be192098121654a01025174 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Add Q_COREAPP_STARTUP_FUNCTION macro.David Faure2013-01-151-1/+30
| | | | | | | | | | | | | | | | | | | | | | This is necessary for initializing things in a library, which require a QCoreApplication instance (unlike Q_CONSTRUCTOR_FUNCTION, which runs before that). Example use cases: KCrash (segv handler), and KCheckAccelerators (debugging tool triggered by magic key combination). Change-Id: I5f4c4699dd4d21aea72b007989ba57467e86ed10 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | 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>