summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Extend lance-tests for text/statictext to check flipped/negative scaleTor Arne Vestbø2013-01-242-16/+52
| | | | | | Change-Id: I0504a6676f1acaa13ea1826e945d1faa51dd4e48 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Added initializer list constructors for Qt associative containers.Roman Pasechnik2013-01-243-0/+82
| | | | | | | | | Affected: QSet, QMap, QMultiMap, QHash, QMultiHash. Task-number: QTBUG-25679 Change-Id: I01f3ecfbca805f4c053a75232188bd2a77fdb1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-231126-1157/+5210
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221126-1157/+5210
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| | * Accessibility Linux: Make dbus registration asyncFrederik Gladhorn2013-01-221-22/+8
| | | | | | | | | | | | | | | | | | Change-Id: I74043be04f4ee17089353304fdc007a7f22cdea0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| | * Make hierarchy of actions in menubars more consistent.Jan Arve Saether2013-01-211-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an assumption that the interface returned from iface->parent() would have iface as one of its children (thus, parent->indexOfChild(iface) should always return an integer != -1, indicating that it is a child. This is a good assumption, otherwise an hierarchy would be presented differently depending on how it is traversed. However, a QMenu created like this: QMenu *menu = new QMenu("weird parent", mainWindow); mainWindow->menuBar()->addMenu(menu); will have a different ancestor sequence than a menu created like this: mainWindow->menuBar()->addMenu("ok parent"); This is because it will walk up the QObject hierarchy. This patch tries to deal with that by looking at which widgets the action of the menu is associated with before determining which should be the accessible parent. Change-Id: I00dad8a94463f772d7b1f5d66fdb36b2e8d3aea2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * Accessibility: Test for do not crash if the column count is 0Jan Arve Saether2013-01-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This tests the fix submitted in bb5e11b56dd2f5fe2957f151a38 Task-number: QTBUG-28611 Change-Id: I7b15aa6b46be3607bd7079294d8e7d18bd507d1c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * QNetworkReply auto test: also test uploading data via HTTPSPeter Hartmann2013-01-181-0/+216
| | | | | | | | | | | | | | | | | | | | | ... and not only HTTP. Change-Id: I1190e07fdacd9bdfb218c8932e0e5e2c0c6fc6ab Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Fix a crash when minimizing a QQuickWindow.Friedemann Kleint2013-01-182-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send empty expose event and flush queue when minimizing. Task-number: QTBUG-28439 Task-number: QTBUG-26424 Change-Id: I2e921a86660f946ced7af735cdf197fb666e2934 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| | * Update copyright year in Digia's license headersSergio Ahumada2013-01-181124-1126/+1126
| | | | | | | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * QDateTime auto test: stabilize currentDateTimeUtc2 testPeter Hartmann2013-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | ... by trying more often to get dates close enough to each other. Change-Id: I370f7cd61bbb84fbb77ea96ff9fd82c1a6f1f76a Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| | * tst_bic: Add linux-gcc-ia32 bic data for QtXmlSergio Ahumada2013-01-162-0/+3844
| | | | | | | | | | | | | | | Change-Id: I43670f41f41f465e5684362de64c355b68a1dbf7 Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* | | QImage plugins should report supported mime typesAllan Sandfeld Jensen2013-01-232-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces the methods QImageReader::supportedMimeTypes and QImageWriter::supportedMimeTypes which corresponds to the similar supportedImageFormats methods, except they return lists of MIME types. Task-number: QTBUG-28177 Change-Id: Ibb0e264a12eaf972a8bfd6bd891dcd9f89efd085 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Fix qstring-literals test for MinGW.Friedemann Kleint2013-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is compiled since QT_UNICODE_LITERAL is always defined on Windows and ref.isStatic()) then fails since C++ 11 is not enabled. Task-number: QTBUG-29014 Change-Id: I357574a493c5191f1463e7ee5851d7db0e569315 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Implement focus handling of child windows for cocoa.Gunnar Sletta2013-01-231-3/+5
| | | | | | | | | | | | | | | Change-Id: I1e05ef39aa67f8febdd27215d8ad05d26ece7caa Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | | Check existence of QProcess feature before using it on Qt autotests.Pasi Petäjäjärvi2013-01-2311-8/+49
| | | | | | | | | | | | | | | | | | | | | VxWorks does not have QProcess support. Change-Id: I20ed479125097d468a1aa50afb18c3749f0fbb98 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | Make the QtDBus object tree keep a count of active childrenThiago Macieira2013-01-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new member variable activeChildren shall contain the number of direct children that are active. This number differs from children.count() because the vector may contain empty entries that haven't been garbage-collected yet (obj == NULL and activeChildren == 0). When this count drops to zero, we know we can simply erase the vector of children. Change-Id: Ia20604d3fac852ea4a6e8862d934fbb936fa5e18 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | | Add a new Q_GLOBAL_STATIC implementationThiago Macieira2013-01-223-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike the previous implementation, this implementation is locked: only one initialisation is ever run at the same time. It is exception-safe, meaning that a throwing constructor will restart the process. Also, start using the thread-safe behaviour that GCC has offered for a long time and C++11 requires. Change-Id: I20db44f57d258923df64c0051358fd0d9a5ccd51 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | | Fix testlib-selftest for MinGW.Friedemann Kleint2013-01-221-2/+5
|/ / | | | | | | | | | | | | | | Fix float format and exclude crashing sub-binary. Task-number: QTBUG-29014 Change-Id: I404f971edeb128263122a194f23e2806d6fd3bd0 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Don't build lance as application bundle on Mac OSTor Arne Vestbø2013-01-222-0/+2
| | | | | | | | | | Change-Id: I23732b4ec0dc45d9d3a2cc5f21dad2cb33af5830 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | QTestLib: improve output when comparing lists fails.David Faure2013-01-225-22/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only QStringList was handled before, now any QList is handled. A specialization for QStringList is still needed though, due to the way template matching works. Example with QList<int>. Before: FAIL! : tst_QTextCodec::threadSafety() Compared values are not the same Loc: [../tst_qtextcodec.cpp(2057)] After: FAIL! : tst_QTextCodec::threadSafety() Compared lists differ at index 0. Actual (res2.toList()): '0' Expected (mibList): '3' Loc: [../tst_qtextcodec.cpp(2057)] Change-Id: If0fdec3236ddb78a679ee549aba569ef5571c395 Reviewed-by: Jason McDonald <macadder1@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Fix cleanup of temporary files in test of QFileInfo.Friedemann Kleint2013-01-221-25/+24
| | | | | | | | | | Change-Id: I0d21fc05a7d816acab5f7284f905bf971a5c04da Reviewed-by: David Faure (KDE) <faure@kde.org>
* | MinGW: Disable tests in tst_qstring that use unsupported formats.Friedemann Kleint2013-01-221-0/+6
| | | | | | | | | | | | | | Task-number: QTBUG-29014 Change-Id: I7dc879c456da8dabe02a2bce07e8628d176ca9d1 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | 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>