summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QSqlField: Add a means to see what the tablename is for a given fieldAndy Shaw2017-07-122-7/+47
| | | | | | | | | | | | When you are using a query that pulls from a number of different tables then it can be ambiguous as to which table a particular field belongs to. So this will make it possible to determine the table that a given field belongs to if it is set. Task-number: QTBUG-7170 Change-Id: I49b7890c0523d81272a153df3860df800ff853d5 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix deprecation warningsAllan Sandfeld Jensen2017-07-111-4/+4
| | | | | | | Switch to QImage::sizeInBytes for huge QImage support. Change-Id: I0145f204dd2db6670e199c320fff9064b4a97ef4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Wait for window expose on the viewport widgetMorten Johan Sørvig2017-07-111-1/+1
| | | | | | | | | | | | | The child viewport window covers the entire client area of the parent window, which prevents the parent window from being exposed. This worked by accident until now, and was uncovered by changes to the cocoa platform plugin implementation. Change-Id: I0d62a1a33f125e5a9030c8def452a49886e54956 Task-number: QTBUG-50414 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Implement setDoubleStep for QInputDialogAndy Shaw2017-07-111-0/+43
| | | | | | | | | | | | setDoubleStep works in the same manner as for setIntStep in that it is just available for input dialogs getting a double. [ChangeLog][QtWidgets][QInputDialog] Added setDoubleStep to enable changing of the step amount for getDouble(). Task-number: QTBUG-17547 Change-Id: I5cabcfceb23324f8045f2b1e49017644418db01a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* tst_QSslSocket::protocolServerSide - fixes for OpenSSL 1.1Timur Pocheptsov2017-07-111-3/+17
| | | | | | | | | | | | | | | | Several tests are not valid for 1.1 anymore: 1. SSL2 was removed, but there is no OPENSSL_NO_SSL2 and the 'protocolServerSide' test is trying to use QSsl::SSLv2 and thus is failing. 2. We now use the generic TLS_server/client_method instead of version specific methods we have in pre-1.1 back-end. So, for example, a client socket with QSsl::TLS_V1_0 in its SSL configuration will be able to negotiate TLS 1.2 if our server socket wants it, while with TLSv1_client_method (OpenSSL < 1.1) our test was expecting SSL handshake to fail. Change-Id: I18efd5921c79b189e4d9529be09299a361a8a81d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add support for parameters in QShaderGeneratorKevin Ottens2017-07-081-6/+7
| | | | | Change-Id: Iff8fec51ddbf9b018cb5ec3aff357125134013eb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for node parameters in QShaderGraphLoaderKevin Ottens2017-07-081-32/+39
| | | | | | | | Now the parameters from the prototypes are used as default values and the graph file can overload them. Change-Id: I9a8a73963c7e578bd0a34e96f76f147a12224f4f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for node parameters in QShaderNodesLoaderKevin Ottens2017-07-081-13/+26
| | | | | | | | This will allow to make the prototypes more extensible when referred to from a graph file while providing some sane defaults. Change-Id: I1ae10182427d8a7d29c51a64e19e99139494ea92 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add parameters to QShaderNodeKevin Ottens2017-07-081-2/+47
| | | | | | | | | This will allow to create nodes having an entry point for tuning, still need to be exploited by the loaders and the shader generator. Coming in further commits. Change-Id: I8384b0f528c9919e9f8d35102adde2b307f08b80 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Complete the QShaderGraphLoader tests to introspect nodesKevin Ottens2017-07-081-0/+45
| | | | | | | | We forgot to check that the node content was correct and complete when loading the graph. Change-Id: Id4ee6aaba6ca268b0785e7fa3fb51a19817e7c9c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Allow QImage with more than 2GByte of image dataAllan Sandfeld Jensen2017-07-084-7/+34
| | | | | | | | | | | | Changes internal data-size and pointer calculations to qssize_t. Adds new sizeInBytes() accessor to read byte size, and marks the old one deprecated. Task-number: QTBUG-50912 Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QDateTime::toTimeSpec(): verify round-tripping works cleanlyEdward Welbourne2017-07-071-0/+4
| | | | | Change-Id: I811fa4249dae923e5e4e434910d8bf96c15bff25 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QFileInfo: generalize old-file testEdward Welbourne2017-07-071-49/+23
| | | | | | | | | | | | | Now that QFileDevice::setFileTime() provides a portable way to prepare our test file, we can verify QFileInfo does handle the distant past, notably including negative time_t values. The old MS-specific code used a time back in 1601, which we can't hope to support cross-platform, so use one in 1901 that's a little inside the range of 32-bit time_t. Task-number: QTBUG-47985 Change-Id: I2de3e79d8c7864221f92395813b63f373e4d8a3b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Q(Date|Time)+: in QDebug's <<, handle invalid explicitlyEdward Welbourne2017-07-071-1/+1
| | | | | | | | | | The output didn't previously make clear that the datum was invalid. It's now explicitly invalid. At the same time, use QDebug's space() and nospace() methods to make spacing choices explicit. Revised a QDate test to match. Change-Id: I4699f5897530b4caa31c22fdb07de149832b30f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clarify tst_QDateTime::fromStringToStringLocale() using a macroEdward Welbourne2017-07-071-7/+9
| | | | | | | | | | | Separate the part varying between tests from the common form of all the tests, so the reader can see the common pattern and know for sure that there's not a typo or copy-and-paste glitch. Change-Id: I3145a26ab42c104eb27756d906ac87f937024bad Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qstyle: Don't fail on empty scroller subcontrols on macOSGabriel de Dietrich2017-07-071-5/+11
| | | | | | | | | | | macOS hasn't had SC_ScrollBarAddLine and SC_ScrollBarAddLine since 10.7, when transient scrollbars first appeared. We also make the warning message a bit more informative. Change-Id: Idef4684162456d9bc274eea77908a6afe24fa0f5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Make calling QCoreApplication::translate() thread-safeAram So2017-07-061-0/+47
| | | | | | | | | | | | | | Fixed crash on QCoreApplication::translate() call from qqmlThread while QCoreApplication::{install,remove}Translator() is called from the GUI thread. [ChangeLog][QtCore][QCoreApplication] Calling QCoreApplication::translate() is now thread-safe. Task-number: QTBUG-57095 Change-Id: Ie5340a42040a829f311c01332e05d4bbaf60462c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-0611-49/+105
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
| * Extend tst_macgui::nonModalOrder blacklist to include 10.12Simon Hausmann2017-07-041-1/+2
| | | | | | | | | | | | Change-Id: I9cfe9e8d79a3223c9cdbb039cc3e243b173f5e9c Task-number: QTQAINFRA-1333 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Fix parsing of 0E+1 and 0E-1 (capital 'E')Thiago Macieira2017-07-031-1/+57
| | | | | | | | | | | | | | | | | | | | Since the result is an actual zero, this section of code looking for underflows kicks in. But we forgot to take the capital letter into account when parsing the number. Task-number: QTBUG-61350 Change-Id: Ia53158e207a94bf49489fffd14c6abbd21f0bac0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Blacklist tst_QWindow::positioning on macOS 10.12Simon Hausmann2017-07-031-0/+3
| | | | | | | | | | | | Change-Id: I41f46e8387519a691d3df9a4fdcc577916e6d247 Task-number: QTQAINFRA-1332 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * Fix offset calculation to be valid at the correct timeEdward Welbourne2017-07-031-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QLocale::macDefaultLocale() was determining local-time's current offset from UTC and using it when working out what to expect the offset at 1:2:3 today to be. When a transition happens after 1:2:3 on its day (which is usual for DST changes in Europe), this lead to using the new offset to test a time before the transition; the test was thus wrong and failed. Use the time to be tested (and current date) to compute the offset to use, instead of using the current date-time. Change-Id: I1c02a5579bca859e1d1aeb4f45b24871a08287af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * macOS: Blacklist tst_QToolButton::task176137_autoRepeatOfAction()Friedemann Kleint2017-07-031-0/+2
| | | | | | | | | | | | | | The test is apparently flaky. Change-Id: I4d7b5ad653c46a432d79c9090b9f5d4cc98e5b6e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix BMP ImageFormat for semi-transparent filesAllan Sandfeld Jensen2017-07-031-2/+1
| | | | | | | | | | | | | | | | | | Reads the v4 and v5 info-header together with the rest of the info- headers, and use that to report the correct image format before decoding. Change-Id: I69e2bcc54367b7f14820815ae2ae1fa2d8d5dc8c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * tst_QPrinter: Run in temporary directoryFriedemann Kleint2017-07-031-27/+32
| | | | | | | | | | Change-Id: I299b740a43926e4af31c70aadda882f87ba9c362 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Require printer config for printsupport auto testsOliver Wolff2017-07-031-0/+2
| | | | | | | | | | Change-Id: I171c5d642e41480b4feec102dc0095af5f500098 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * Remove remains of wince in .pro filesFriedemann Kleint2017-07-034-13/+2
| | | | | | | | | | | | | | | | Task-number: QTBUG-52590 Change-Id: I444fc9eedc8a8e4ad2ede224d66e7c410bedbb48 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | uic: Don't clear and readd combobox items in retranslateUiJarek Kobus2017-07-058-80/+97
| | | | | | | | | | | | | | Task-number: QTBUG-61778 Change-Id: If7a15ef69fcfe459f177ff8b671f53a6022ab335 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-07-054-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially in examples, where we should show off our convenience functions, prefer calling these functions over doing arithmetic with M_PI (or approximations thereto) and 180 (give or take simple factors). This incidentally documents what's going on, just by the name of the function used (and reveals at least one place where variables were misnamed; the return from atan is in radians, *not* degrees). Task-number: QTBUG-58083 Change-Id: I6e5d66721cafab423378f970af525400423e971e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-0446-151/+286
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * Skip QThread stress test on QemuSami Nurmenniemi2017-07-022-0/+8
| | | | | | | | | | | | | | | | | | | | Qemu uses some memory for each generated thread. This test creates > 80000 threads and consumes about 10Gb of memory which is too heavy for a VM. Task-number: QTBUG-59966 Change-Id: I1bb8a0d7955778f5201948b41befcb9f1f391514 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Convert features.filesystemmodel to QT_[REQUIRE_]CONFIGStephan Binner2017-07-021-2/+2
| | | | | | | | | | Change-Id: I862510387e79d04221ec075f3e79896908ee9d8f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Fix moving a hidden QOpenGLWidget to another windowSérgio Martins2017-07-021-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | A visibile QOpenGLWidget receives a QEvent::WindowChangeInternal which triggers a QOpenGLWidget::reset(). A hidden QOpenGLWidget never received this event so it was never reset, resulting in a black rendering. Includes unit-test that fails without this patch. Change-Id: I9d2c57d66fa629f631a9829a5ebf4de09998ad75 Task-Id: QTBUG-60896 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * macOS: Blacklist tst_QProgressDialog::autoShow()Friedemann Kleint2017-07-021-2/+2
| | | | | | | | | | | | | | The test is apparently flaky. Change-Id: Ib0161fb18cdef1d532c81ac7196c57af1f7c8ee1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Convert features.filedialog to QT_[REQUIRE_]CONFIGStephan Binner2017-06-291-2/+2
| | | | | | | | | | Change-Id: I9bc229b0d1430b81eeb2cfca2b24474736d5d561 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * QTabBar: fix expanded tabs appearanceOleg Yadrov2017-06-281-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression introduced by 175f33ed8. 'expanding' property set to true was ignored when QStyle::styleHint() returned Qt::AlignRight for SH_TabBar_Alignment. When we calculate tabs geometry, we put an empty tab at the front and back and set its expansive attribute depending on tab alignment AND 'expanding' property. Task-number: QTBUG-61480 Change-Id: I6a1827ae8a3f2c6bee5124c18c7f2b1c0a7862f3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * Fix some MSVC warnings in testsFriedemann Kleint2017-06-284-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | tst_qvariant.cpp(80): warning C4309: 'initializing': truncation of constant value tst_qvariant.cpp(4635): warning C4309: 'initializing': truncation of constant value tst_qbytearray.cpp(1438): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data tst_qbytearray.cpp(1440): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data http2srv.cpp(64): warning C4018: '<=': signed/unsigned mismatch tst_qinputdialog.cpp(352): warning C4804: '<=': unsafe use of type 'bool' in operation Change-Id: Id012d88b7b20c5c9f128f2ef53753cc1d479f358 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tests: Add Q_FALLTHROUGH to unmarked fallthroughs seen by GCC 7Friedemann Kleint2017-06-282-35/+110
| | | | | | | | | | Change-Id: I70c87912476372097517fc20b3740416c24cb819 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_QSocks5SocketEngine::downloadBigFile(): Output elapsed timeFriedemann Kleint2017-06-281-7/+8
| | | | | | | | | | | | | | | | | | Print time in the error handler to get some diagnostics about when the network connection is dropped. Task-number: QTBUG-61673 Change-Id: I376bec81f52d75c9b601f2af9b7e0b63f5883bb0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * tst_QSharedPointer: Terminate hanging qmake-processesFriedemann Kleint2017-06-281-0/+2
| | | | | | | | | | Change-Id: I580ff3ccbecba81c09ce3fc3e082b906f956171d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Stabilize QDnsLookup testMarc Mutz2017-06-281-20/+6
| | | | | | | | | | | | | | | | | | | | Use 15s instead of 10 (one check took 7.5s on my development machine, even). Port to QTR_VERIFY_WITH_TIMEOUT instead of rolling our own waitForDone(), as that reports (within limits) by how much the timeout was exceeded. Change-Id: Id76a66d5f4fe3a4e814915add329eb4de3d264a7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Convert features.tabletevent to QT_CONFIGStephan Binner2017-06-281-2/+2
| | | | | | | | | | Change-Id: Ibd7ed7f269a64afddadee70979b20f1c58398378 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.wheelevent to QT_CONFIGStephan Binner2017-06-2810-32/+32
| | | | | | | | | | Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Ignore tst_macNativeEvents::testPushButtonPressRelease on macOS 10.11Simon Hausmann2017-06-281-0/+3
| | | | | | | | | | | | Task-number: QTQAINFRA-1292 Change-Id: I1047b797380820d2636f4d514b41b621c7794486 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * Ignore tst_QOpenGLWidget::clearAndGrab failures on UbuntuSimon Hausmann2017-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | The test fails for unknown reasons when using the mesa swrast when using qemu/kvm (as opposed to when using the vmware mesa driver). Task-number: QTQAINFRA-1318 Change-Id: Ib7e9d894cd368b8c2c12d83ec1e4862622781fe6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Ignore tst_qwidget::showMinimizedKeepsFocus on macOS 10.11Simon Hausmann2017-06-281-0/+1
| | | | | | | | | | | | | | | | It's failing for inexplicable reasons not only on 10.10 but also 10.11. Task-number: QTQAINFRA-1317 Change-Id: Id316764443dfe9e0ae30e2d25d8bae73fa255617 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * Ignore failure of tst_qmenu::submenuTearOffDontClose on macOS 10.11Simon Hausmann2017-06-281-0/+2
| | | | | | | | | | | | | | | | The test is failing inexplicably on macOS 10.11. Task-number: QTQAINFRA-1315 Change-Id: Ia0162768b6d4fdd016bce62b92c3df0b5d4ed8d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Skip the threaded systemProxyForQuery test on Windows 7Simon Hausmann2017-06-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | Under qemu/kvm the systemProxyForQuery call - when initiated from a secondary thread - never completes. Consequently the thread hangs, test fails and the crashes due to the inability to cleanly terminate the test thread. Task-number: QTQAINFRA-1200 Change-Id: I9bd4ed163d215fadd8532a03bbdccd80fc8d9cb1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * Blacklist tst_QSocks5SocketEngine::downloadBigFile()Friedemann Kleint2017-06-281-0/+2
| | | | | | | | | | | | Task-number: QTBUG-61673 Change-Id: Id81446e52c6492a22347de708b4785f55a1b0d5d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * tst_QTreeWidget: Fix GCC 7 warnings about using uninitialized variablesFriedemann Kleint2017-06-251-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | qtreewidget.h:179:53: warning: 'search' may be used uninitialized in this function [-Wmaybe-uninitialized] ^~ tst_qtreewidget.cpp:1564:22: note: 'search' was declared here QTreeWidgetItem *search; tst_qtreewidget.cpp: In member function 'void tst_QTreeWidget::expandAndCallapse()': tst_qtreewidget.cpp:2678:18: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized] Change-Id: I19c9dc86aa12f36c26ae2475f1854ed17fad0638 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>