summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Clean up logical dpi for QImage.Morten Johan Sørvig2013-01-311-0/+22
| | | | | | | | | | | | | | | | | | | | | Revert to the pre highdpi-patch behaviour. Before, both physical and logical DPI would be based on the dpmx/dpmy variables, which could be changed with setDotsPerMeter(). The highdpi patch introduced separate ldpmx/ldpmy variables, which were not changed by setDotsPerMeter(). This broke when loading images: setDotsPerMeter would be called but the logical dpi would not change. Remove ldpmx/ldpmy. Keep scaling the physical dpi by the devicePixelRatio, which will be set to 1 by default. Task-number: QTBUG-29187 Change-Id: I0d6f5f3b8efae5fb1adc0a50b22a5da78324a282 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Fix references to Qt TestSze Howe Koh2013-01-303-6/+6
| | | | | | | | | | | | | | | | QtTestLib and QTestLib don't exist. The proper name is "QtTest" (code) or "Qt Test" (English) http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation http://lists.qt-project.org/pipermail/interest/2012-December/005221.html Files paths in qttestlib.qdocconf can't be changed easily however, as it breaks things. So, they're left as they are. Change-Id: Ifbc44ea858c453bedad8cd7723f847e67fc7a85a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* test: Add bic data for linux-gcc-amd64Sergio Ahumada2013-01-293-0/+24692
| | | | | | Task-number: QTQAINFRA-321 Change-Id: I449d51088d3e5bfc6f92f036d498a2ef6f7a46b2 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QSslSocket tests: use qt-project.org as test server instd of codereviewPeter Hartmann2013-01-292-2/+2
| | | | | Change-Id: I1f3a860bf1ab24c30001059b7bcbb19fba7cbc1d Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make the null pointer dereference a volatile oneThiago Macieira2013-01-291-1/+1
| | | | | | | | | | | | This is to ensure that the compiler won't optimise it out of existence. Clang says it will do it: testProcessCrash/main.cpp:50:5: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference] *(char*)0 = 0; ^~~~~~~~~ Change-Id: Iac7771046442f869e205e8789fffdd6443d58e67 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Forward-port tests on invalid port numbers from Qt 4Thiago Macieira2013-01-281-0/+8
| | | | | | | | | These tests were added to Qt 4 on commit a17fc85b51a6bdcfa33dcff183d2b7efd667fb92 Task-number: QTBUG-28985 Change-Id: I3cf595384f14272197dcfb85943213c8f8ddeba0 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix minor typos in docs, printed messages & commentsSze Howe Koh2013-01-288-9/+9
| | | | | | | Missing apostrophes Change-Id: I3ef5e9d494fb7a37f8e6075f24cd3a274e572c23 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Check existence of QProcess feature before using it on Qt autotests.Pasi Petäjäjärvi2013-01-2811-8/+49
| | | | | | | | VxWorks does not have QProcess support. Change-Id: I917b769f967e9d71ec5025aae788f3e237b07aeb Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from commit 416e73a0fcaf31f7c32ba7dcd214b62e6060123c)
* Doc: Fix module name formatSze Howe Koh2013-01-258-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fixed checking HOME variable return value using isEmpty()Pasi Petäjäjärvi2013-01-251-0/+8
| | | | | | | | | | | Return value of the QFile::decodeName(qgetenv("HOME")); is never null if HOME environment variable is not set. So need to check the return value using isEmpty() instead. Task-number: QTBUG-28912 Change-Id: Ic57b1978d63e99b056cde35ca8cb9d2a07ff8ce8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Stabilize tst_qabstractsliderFrederik Gladhorn2013-01-241-3/+3
| | | | | | | | | | When simulating hight load, this test failed 4 times out of 80 runs on my machine. With this patch I could no longer reproduce the failure. Change-Id: I42748de0200b9094c8facf0e33f3794002ec1d01 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Make sure QGraphicsItem notifies changes to focusScopeItem.Andreas Aardal Hanssen2013-01-241-0/+57
| | | | | | | | | | | | | | | | | | A glitch in QGraphicsItem's logic made it update the focusScopeItem pointer, but fail to notify the change to QDeclarativeItem through the d_ptr->focusScopeItemChange() virtual function, hindering QDeclarativeItem from emitting focusChanged() correctly for focus scopes that do not have focus. Two lines were moved, and a comment updated to reflect the reason why the "return" is needed at this point. It's clear that the calls to focusScopeItemChange() are unrelated to the return. Task-number: QTBUG-29260 Change-Id: I12ba9161b16d34c3689401a92c86d2047989f7bd Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* QSslConfiguration: toggle on demand loading of root certs properlyPeter Hartmann2013-01-233-4/+69
| | | | | | | | | | | | | | | make sure we keep track of when we can load root certs and when we cannot (we cannot when the developer set the certs explicitly). This is implemented the same way for QSslSocket already, and needs to be duplicated because we have 2 methods for setting CA certificates: one in QSslSocket and one in QSslConfiguration. In addition, adapt the auto test which checks whether setting a default QSslConfiguration works: There is no way to set on demand loading through the API, so it should be enabled by default. Task-number: QTBUG-29103 Change-Id: I5146128aaa385dfcc0ad1e0ef81a92d9350ec5f2 Reviewed-by: Richard J. Moore <rich@kde.org>
* Add autotests for Indonisian and Catalan localesMehdi Fekari2013-01-231-0/+12
| | | | | Change-Id: Idbf14ee6f0cd83acfdc407408794aac7ad91c054 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Disable only accessibility bridge without dbus on linuxFrederik Gladhorn2013-01-231-1/+1
| | | | | | | | | | | | Keeping accessibility and only disabling the bridge will enable more builds to work. Warning about disabling accessibility disabled is needed because in QStyle it is used to discover semantics about widgets (if a toolbutton is in a toolbar). Change-Id: Iae4e6ab63479743bdd70cba4b1954ec7cf3f88e9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* 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>
* 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>
* 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-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>