summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Make QBuffer::bytesAvailable() workThiago Macieira2013-04-161-1/+22
| | | | | | | | | | | | | We don't need to keep an internal QBuffer position, we can just use the one from QIODevice::pos(). It will keep track of goings ahead and backwards for us, plus it will make the default bytesAvailable() work out-of-the-box too. This error was reported on IRC. Change-Id: I8559e8ee56edaa01ca8732c1f1012082ebe3a3f2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QDateTime - Fix auto tests on Windows before 1980unknown2013-04-121-0/+15
| | | | | | | | | | | Auto tests using CET expect there to be no Daylight Time before 1980, but Windows does apply Daylight Time. Fix expected test results to match. Task-number: QTBUG-30420 Change-Id: I7080598fa0a20c1cd5680782606ab983e714e546 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QPagedPaintDevice: Fix setPageSize() to set correct metricsJohn Layt2013-04-121-0/+38
| | | | | | | | | | Use the correct metrics for the requested PageSize instead of always defaulting to A4. Task-number: QTBUG-30494 Change-Id: Ia3978afe3f7cc9b1ded1065416e5c3def44e7a05 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* tst_qtranslator: Remove QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-04-122-9/+6
| | | | | Change-Id: Iefd8ce56b7102b5a6a656df7dbea2cd344bb9b5d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qcoreapplication: Remove QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-04-122-2/+1
| | | | | Change-Id: I6d5098ff57293171b5ddd3a58c53718cbbc8e4bf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qdataurl: Remove QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-04-121-2/+0
| | | | | Change-Id: I6f2e45bbc6d31cac4d9b8c735650f7985865109c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix leaking of QFontEngineDataKonstantin Ritt2013-04-121-4/+7
| | | | | | | | | | | | | QFontCache now references QFontEngineData-s it maintains, so that QFont instances not freed prior to calling ~QFontCache() would destroy QFontEngineData on their own. Task-number: QTBUG-25434 Change-Id: Ia7679d64de436841f09ac7be62ceb570e50cce5b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: jian liang <jianliang79@gmail.com>
* Fix the check if mouse events should be synthesized from touch eventsFabian Bumberger2013-04-111-0/+6
| | | | | | | | | | | | | | | | In QGuiApplication only Qt::AA_SynthesizeMouseForUnhandledTouchEvents is taken into account when synthesizing mouse from touch events, in QApplication only the PlatformIntegration syle hint QPlatformIntegration::SynthesizeMouseFromTouchEvents. With this patch both attributes are checked. Furthermore the check was moved out of translateTouchToMouse in QApplication in order not to influence the result which is returned to the user, when mouse events are not be synthesized. Change-Id: I87ac7299f0a9fbf0a083eff9c547f0dbfab75dfb Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Stabilize tst_qcombobox.Friedemann Kleint2013-04-111-46/+127
| | | | | | | | | | | | | - Remove member variable testWidget and instantiate on the stack to ensure tests do not interfere. - Move widgets away from taskbar areas. - Fix windows geometry warnings by making small windows frameless. - Fix wrong target widget for key click in keyBoardNavigationWithMouse(). Task-number: QTBUG-30573 Change-Id: I6d9fad0f212814a67367baf446750e9bed0ebdb2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Don't bypass overwritten [set]data() methods in the proxy.Volker Krause2013-04-081-0/+26
| | | | | | | | | By calling itemData() of the source model directly, the result cannot contain data provided by the proxy model itself. The base class implementation however will call data() on the proxy instead. Change-Id: Ib0ef5f5621457adbfa4bd896a756dfcb98d0ae54 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make QTextCursor accessibility boundary finder availableFrederik Gladhorn2013-04-081-25/+25
| | | | | | | | | This allows re-using the function in QtQuick. In addition TextBoundaryType is moved to QAccessible and QAccessible2 as namespace ceases to exist. Change-Id: I184bc2c181a22ca51ac4db4e5a080dc26d4acfe0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Don't call virtual methods after the source model is destroyed.Stephen Kelly2013-04-051-0/+35
| | | | | | | | | | | | | Calling clear_mapping causes the persistent indexes to be queried, and mapped using map_to_source, so that they can be restored later. That is not the appropriate response to the source model being deleted because there won't be anything to restore. Simply clear the stored mapping information instead so that the source model actually exists when mapToSource is called by the framework. Change-Id: I99692ee7aa9c6714aec45c68fe4a2d62be189d60 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Test that the CMake files create appropriate version variables.Stephen Kelly2013-04-051-0/+10
| | | | | | | Change-Id: I1d8061302fbb8494b5ae31e20a644745fe969f10 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Stabilize tst_qcompleter.Friedemann Kleint2013-04-051-41/+54
| | | | | | | | | | | | - Use qWaitForWindowActive in task178797_activatedOnReturn(). - Remove hardcoded timeouts, use qWaitForWindowActive/Exposed. - Instantiate widgets on stack or use QScopedPointer to ensure cleanup. - Move widgets to a central location, avoiding taskbar areas. Change-Id: I98991b70067dddab9aa69b1681fa80398ec8b1f6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix sql tests in respect to Oracle databasesAndy Shaw2013-04-059-377/+394
| | | | | | | | | | Oracle has a limitation of 30 characters for a tablename so the main change is to account for this, which meant changing all the usages of qTableName(). Some other fixes are included that ensure the tests are working correctly as far as Oracle is concerned. Change-Id: I8ad8a5a33e6a70fcad235f6a7e82e91687b74fee Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QSaveFile: allow saving to a writable file in a non-writable directoryDavid Faure2013-04-051-9/+76
| | | | | | | | | | The only way to make this possible is to disable the atomic-rename-from-temp-file behavior. This is not done by default, but only if the application allows this to happen. https://bugs.kde.org/show_bug.cgi?id=312415 Change-Id: I71ce54ae1f7f50ab5e8379f04c0ede74ebe3136d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix Qt tests for Android.BogDan Vatra2013-04-035-31/+87
| | | | | Change-Id: I53856056a00684a9a37596a74b79f46d3b47331f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Move the dbmstype to QSqlDriverPrivate so it can be used for all driversAndy Shaw2013-04-029-17/+17
| | | | | | | | | By moving it to QSqlDriverPrivate we make it easier to check what database is actually connected which is particularly useful for the autotests. Change-Id: I54d1c2c998919c1d54efb1b6ac9303070ece54aa Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Cache QAccessibleInterfaces.Frederik Gladhorn2013-04-023-169/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since there already is a one-to-one relationship between QObject and QAccessibleInterface it makes little sense to create and destroy the interfaces on each call to queryAccessibleInterface. Add a cache and keep created interfaces around for the lifetime of the corresponding QObject. This changes the memory management rules: accessible interfaces must no longer be deleted. If you get an QAccessibleIntrface pointer that pointer will stay valid as long as the corresponding QObject is not deleted. This also re-enables accessibility for Mac. We limit the range of the IDs so that they are useable for Windows directly. That means we can get rid of the event cache there. This is based on: Iebf2f374916fc70a9dd29e95f45a6444b85f6cee Change-Id: I9fe6531812c0dbc5b41101ac05830a6dd75e13a3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Upgrade the bundled PCRE to 8.32Giuseppe D'Angelo2013-04-011-2/+0
| | | | | | | | | | | | | | Changelog: http://pcre.org/changelog.txt Amongst other things, the Unicode tables were upgraded to 6.2.0 and case folding support was added, which also fixes a QString autotest (marked as XFAIL). Qt still requires 8.30, not 8.32. Change-Id: I4056c1dc1d949d33443bb8ca280de4c8c363ac74 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update QLocale data to CLDRv23Konstantin Ritt2013-04-011-2/+3
| | | | | | | | Say hello to Interlingua and Mongolian once again. Change-Id: I735fbc5793f34620be1f6932a251224b9ded02e3 Reviewed-by: Denis Dzyubenko <denis@ddenis.info> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QLocale: Report textDirection() by looking to the locale scriptKonstantin Ritt2013-03-301-0/+42
| | | | | Change-Id: Ic562b0301271ba414d5d3ff75a308d84bd288f56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qthread: fix race on "bool visited"David Faure2013-03-291-4/+4
| | | | | Change-Id: I438bad9a4f8afb76272c8d8f08461a6d2c9a0b18 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Update the high-dpi manual test.Morten Johan Sørvig2013-03-299-40/+169
| | | | | | | | | - Organize the test images into different sizes. - Add a button and icon drawing test. - Don't show all tests by default. Change-Id: I95eff846b8c5159085f53b413dea7212c1ea5071 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QtSql tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-2812-12/+0
| | | | | Change-Id: I93169244b51f8b993f97f7595e0bc7006ae04e3a Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-28111-120/+0
| | | | | Change-Id: I1264784d6984edc70bf07e58ed763e1d1b001d7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtWidgets tests: Replace qFindChild{ren} with QObject::findChild{ren}Debao Zhang2013-03-2728-185/+185
| | | | | Change-Id: I79a26387bcce0d7f79f4f9f70293e97dae52f949 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Test with random qobject instead of widget twiceFrederik Gladhorn2013-03-271-1/+1
| | | | | Change-Id: Ibece0f65dafa7fc59486c5a4c1467c93636b93c1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Populate includes, defines and pic flags in target interfaces.Stephen Kelly2013-03-275-0/+203
| | | | | | | | | | | | | | | Used by features in CMake 2.8.11. This matches the features in FindQt4 in that version of CMake, namely that the IMPORTED targets contain the appropriate INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS and that the qtmain.lib static library is automatically linked to on Windows by executables. Additionally, the INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately if Qt requires users to use position independent code. Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QtWidgets tests: Don't use the deprecated QTest::qWaitForWindowShown()Debao Zhang2013-03-276-8/+8
| | | | | Change-Id: I2dd5a54f9485591ca2dab65f7a352ef453c185e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtWidgets tests: Don't call the empty function QApplication::syncX()Debao Zhang2013-03-277-15/+0
| | | | | Change-Id: I2c732afd43586209cf5a2b72caac53e34abb9090 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* tst_qgraphicseffectsource: Don't use the deprecated QGraphicsItem::children()Debao Zhang2013-03-272-21/+21
| | | | | Change-Id: I0cc0c5284a675fb1c7f960e9790baa89c56112b1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtXml tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-275-5/+0
| | | | | Change-Id: Ifb9363fb6d397a91501fc906454e172731d4c06d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-2775-75/+0
| | | | | Change-Id: I48c83fa0c5eccd86a5242fc8ed51ac6d7623f7f3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtConcurrent tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-275-5/+0
| | | | | Change-Id: Ia0c4751b891ae81a66b072bc504b555d81625172 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtTest tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-2746-46/+0
| | | | | Change-Id: Id67ab0ea3be47d3b365aa01a354829b8745b7250 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Cocoa: Correct enter/leave event handling.Morten Johan Sørvig2013-03-262-0/+154
| | | | | | | | | | | | | | | | | | Make top-level windows generate enter/leave events for sub-windows. Keep track of the current "under mouse" window in mouseMoved and send EnterLeave events when it changes. mouseEntered/mouseExited handles enters and leaves from the top-level window. Add tests/manual/cocoa/nativewidgets. Task-number: QTBUG-27550 Task-number: QTBUG-29751 Change-Id: If4b9f9e0f39d9fb05fdab45a100ffdcf107965ad Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QNetworkInterface auto test: do not abort without sessionPeter Hartmann2013-03-261-5/+8
| | | | | | | ... but only if the QNetworkConfiguration manager requires one. Change-Id: I1c69c43438f1df9080d207c8598a42201f759c5b Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* tst_qtreeview: Use QRect::intersected instead of QRect::intersectDebao Zhang2013-03-261-1/+1
| | | | | Change-Id: I4579929473a408b73f3ad9014ea30ce5a602259c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove dependency on QPlatformSupport in fontdatabase testEskil Abrahamsen Blomfeldt2013-03-252-16/+1
| | | | | | | | | | | | | | | | | | | If you include a static library in the test, all symbols will be duplicated, and this can cause nasty crashes because global static data is also duplicated. This happened on Linux because of a global static cache in the font engine where the two instances of it would get out of sync, and we would reference invalid data. To test QPlatformSupport features, a QPlatformSupport test which does not load any platform plugin (or uses its own platform plugin which does not load QPlatformSupport) is needed. For now, I will just revert adding the test, since it is broken and was added as part of supporting Windows CE: f2fabf77f9bc18448aed0e99a6d7d1d6c5c9c736. Change-Id: I6c002d1e0880ee8e031a68eee80e781fe0c62af4 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QMdi: Don't emit subWindowActivated during StyleChange handling.David Faure2013-03-251-0/+31
| | | | | | | | | | | | | | The handling of StyleChange de-maximizes the child window temporarily, which was emitting subWindowActivated. This would crash lokalize, because deactivating a window means deleting the widgets associated with it, and style-change handling is done in QApplication by looping over QApplication::allWidgets, which would then contain dangling pointers. Full valgrind log at https://bugs.kde.org/show_bug.cgi?id=271494#c7 Change-Id: Ifb24032cde2cd470dcae7cd553ec5ab45a919dd6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Ensure QTemporaryFile can create files when an identical dir exists.Mitch Curtis2013-03-231-0/+35
| | | | | | | | | | | | | | | | | | When QTemporaryFile attempts to create a new file in createFileFromTemplate, it fails if the filename exists and is a directory. Windows returns error code 5 (ERROR_ACCESS_DENIED) in this case - rather than ERROR_FILE_EXISTS - which is not handled. This patch handles ERROR_ACCESS_DENIED in addition to the already handled ERROR_FILE_EXISTS, meaning that QTemporaryFile will continue to look for unique names when a directory with the same name exists. Task-number: QTBUG-30058 Change-Id: I42339887d7f5483e3dc6a03a9da15111c350da8f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Do not update accessibility for invalid interfacesFrederik Gladhorn2013-03-231-0/+18
| | | | | Change-Id: I8dc29ea51393406e529c76f25bf2f8cf426e26cf Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Compile most manual tests with Qt 4.Friedemann Kleint2013-03-2248-45/+236
| | | | | | | | Replace <QtWidgets> includes by class includes, remove tests that do not compile. Change-Id: I52837e8c567dc8ac365c7d43c37beb9a368f6f72 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Only instantiate QAccessibleWidget after trying inherited classesFrederik Gladhorn2013-03-221-40/+96
| | | | | | | | | | | | The plugin should try each class name from the meta object in succession instead of giving up right away and just using QWidget. This improves the handling of the itemviews and makes many sub-classes of QWidget outside of Qt work. Change-Id: Id81017c648fe229c3eb85d6d9ae6696d5f16a1ef Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Merge remote-tracking branch 'gerrit/release' into stableSamuel Rødal2013-03-215-23/+70
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/qt_module_headers.prf mkspecs/features/qt_tool.prf src/angle/angle.pro src/tools/bootstrap/bootstrap.pro tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
| * Skip unstable tst_QSslSocket test case.Samuel Rødal2013-03-201-0/+2
| | | | | | | | | | | | | | | | | | | | The connection to qt-project.org seems to be the one that causes this particular test case to fail. Task-number: QTBUG-29941 Change-Id: Ie5e430646997e86e3acb04132cd90a1773a091da Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * Tests: stabilize tst_QDockWidget on small screensJ-P Nurmi2013-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The test has been recently failing in CI. The problem was easy to reproduce in a virtual machine by resizing the window of the virtual machine small enough. This change makes sure that the requested size hint is significantly smaller than the desktop size, to avoid the window manager stepping in and limiting the window size. Change-Id: Id8ce63b2b88cbed964e0330633c5d2e1dc33598c Reviewed-by: Caroline Chao <caroline.chao@digia.com> (cherry picked from commit 36e6632fa363152e1a0d42e53a0e5ada09092324) Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * Attempt to prevent tst_QWidget::scroll() from failing in CI.Samuel Rødal2013-03-201-4/+8
| | | | | | | | | | | | | | | | | | | | Skip the test on X11 where it's consistently failing in CI but not when trying to reproduce locally. Also attempt to make test slightly more robust on other platforms (it's already #ifndef'd for Q_OS_MAC). Task-number: QTBUG-30271 Change-Id: I6743eb99549abbd945e380a3a54ce8620000298a Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Fixed artifacts when drawing same line with different clips.Samuel Rødal2013-03-141-11/+47
| | | | | | | | | | | | | | | | | | | | Expanding on the change fixing QTBUG-24762 with the realization that any line needs to be drawn in a consistent way regardless of system or painter clip, not just dashed lines. Task-number: QTBUG-25036 Change-Id: Ief7ef19cc92c52e7d792500a581a072ba032767e Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>