summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Android: Blacklist tst_QPainter::textOnTransparentImageMårten Nordheim2018-06-281-0/+3
| | | | | | Task-number: QTBUG-69166 Change-Id: I16289801ff64b09894a5379a584270b53ad7e105 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Android: Blacklist some cases in tst_qwindowMårten Nordheim2018-06-281-0/+23
| | | | | | | | | | | | | | Task-number: QTBUG-69154 Task-number: QTBUG-69155 Task-number: QTBUG-69156 Task-number: QTBUG-69157 Task-number: QTBUG-69159 Task-number: QTBUG-69160 Task-number: QTBUG-69161 Task-number: QTBUG-69162 Task-number: QTBUG-69163 Change-Id: Ie44de7fd3f4871bebcaadcc4a8735bf47692ea49 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Android: Make tst_qfile passMårten Nordheim2018-06-281-3/+22
| | | | | | | | | | | | | By disabling the "stdinprocess"-related tests/code... ... but differently. After fixing my earlier mistakes I'm getting segmentation faults when it executes a couple different library calls after the QProcess object has started. Task-number: QTBUG-68596 Change-Id: Id42a1f939c000754a187dee90c4a4cdfec816232 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Android: fix tst_qloggingMårten Nordheim2018-06-282-1/+19
| | | | | | | | | | | The "app" subfolder was already excluded in the .pro-file but Android supports QProcess, so lets include it in the build. Unfortunately it currently has trouble and crashes (the child process or both processes). So we skip those tests. Task-number: QTBUG-68596 Change-Id: I2e6d0869c408bf08b22c02145db8ce522c64c617 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Android: Pass tst_qlocaleMårten Nordheim2018-06-281-4/+19
| | | | | | | | | | | | To make it run we make sure it finds the syslocaleapp, however since it causes a crash we skip the test that uses it... "formatTimeZone" was failing, but it is the exact same issue as in e08ba34f26197fb9893fd48a38bdd0dfff7d4a60, so we solve it the exact same way. Change-Id: Ifd5c796735775dad94acf55210cf18c0f4d375ca Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Android: Pass tst_QUuidMårten Nordheim2018-06-281-0/+11
| | | | | | | | Same issue as has been seen a few other places: path to executable being wrong, and then a crash when the paths are fixed. Change-Id: I77a596c6e52d2a02a69a6b9dfe91f878b3ffe07c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSortFilterProxyModel unittest: add test for filtered-out-after-setDataDavid Faure2018-06-281-6/+33
| | | | | | | | | | | | The row names for this test were very unspecific. After reverse-engineering what they are testing, I gave them proper descriptive names, which allowed me to notice that there were tests for "filtered in after sourceModel->setData" but not for "filtered out after sourceModel->setData". Change-Id: Ib79108db803ae77fb65d29cf0c0ef96c26655980 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* tst_qthreadpool: Skip "stackSize" if unsupportedMårten Nordheim2018-06-271-0/+8
| | | | | | | | | If you're on a Unix platform which don't have the necessary defines then the thread will never be launched due to an error. Skip the test instead. Change-Id: I83159988b8f330a750c7aa328a8805e4fa478070 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Return a correct filter from QFileDialog::selectedMimeTypeFilter()Alexander Volkov2018-06-271-3/+7
| | | | | | | | | | | | | | | | QFileDialog::selectedMimeTypeFilter() returns either an empty filter in the case when a platform file dialog doesn't implement mime type filters, or initiallySelectedMimeTypeFilter() in the case of Qt's file dialog. In both cases the result is incorrect. Make it return a mime type filter corresponding to a selected name filter. As a result, tst_QFiledialog::setMimeTypeFilters() has to be fixed: QFileDialog::selectMimeTypeFilter() can't select a name filter for an invalid mime type, and "application/json" is not supported by RHEL 6.6, so replace it by "application/pdf". Change-Id: I58d3be860a9b5e8a72cba86d74b520178115a812 Reviewed-by: David Faure <david.faure@kdab.com>
* QAbstractItemModelTester: fix out-of-bounds index() callsDavid Faure2018-06-271-3/+9
| | | | | | | | | | | | | | When removing rows, the tester is looking at the data of the row "just before" and the row "just after" the removed rows, to see if they are still the same at the end of the removal operation. Guard this with bounds check, in case there is no row just before or just after. This is the opportunity to use modeltester in tst_qidentityproxymodel, which was already a testcase for removing the only row in a given parent. Change-Id: Iec8228c16b9c670b794e2665356d153679178494 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Android: tst_qtimezone: Blacklist a bunchMårten Nordheim2018-06-271-0/+171
| | | | | | | | | Task-number: QTBUG-69122 Task-number: QTBUG-69128 Task-number: QTBUG-69129 Task-number: QTBUG-69131 Change-Id: Ida626a6675764e9554785b5e56cfba3ab7206f17 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Android: tst_QTimeZone::transitionEachZone: skip 2 zonesMårten Nordheim2018-06-271-0/+4
| | | | | | | | | When testing zones "America/Mazatlan" and "Mexico/BajaSur" the test crashes from an assert. Skip testing the zones for now. Task-number: QTBUG-69132 Change-Id: I595089647792e9a2c094d63cb837584b8cdc9cb9 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Android: Blacklist various cases in tst_QLineEditMårten Nordheim2018-06-261-0/+31
| | | | | | | | | | | | | Task-number: QTBUG-69111 Task-number: QTBUG-69112 Task-number: QTBUG-69113 Task-number: QTBUG-69114 Task-number: QTBUG-69115 Task-number: QTBUG-69116 Task-number: QTBUG-69118 Task-number: QTBUG-69119 Change-Id: I424cb472e97bd427e800ee230e0e57d763d1b8a6 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Android: Blacklist a few cases in tst_qgroupboxMårten Nordheim2018-06-261-0/+13
| | | | | | | Task-number: QTBUG-69084 Task-number: QTBUG-69083 Change-Id: Icf218795f81f01a559094cf2088f53a9fd597c24 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Android: Blacklist tst_qframe::testPaintingMårten Nordheim2018-06-261-0/+3
| | | | | | | | It causes most of the fails seen on Android. Task-number: QTBUG-69064 Change-Id: I2f97fea41ee78e7962b8c34ed996bbe4bcb88732 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Kludge round Android's ignorance of some esoteric time-zone transitionsEdward Welbourne2018-06-261-3/+9
| | | | | | | | | | Skip a few tests that Android's time-zone information doesn't suffice to get right. Task-number: QTBUG-68835 Change-Id: Ibf8d213c96b29d74fc478a0ede686ae52b5200fb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QTimer: Replace unconditional qWait()s with QSignalSpyKari Oikarinen2018-06-261-152/+111
| | | | | | | | | | | | | | | | | | | | | | | Where possible. Sometimes the replacement is QTRY_COMPARE instead. Also don't use QTestEventLoop directly when it can also be replaced with QSignalSpy use. Remove the TimerHelper class, since its uses can be done with QSignalSpy (and a lambda when remainingTime is checked). Although checking static single-shot timers still needs a target object, so use a stripped down version in those tests. remainingTimeDuringActivation() was not actually testing the repeating case, but single-shot case twice, so fix that. In the repeating case the remaining time is exactly 20 ms on my machine, but QEMU emulation seems to be slow enough for time to advance before the lambda is executed, so relax the conditions. Task-number: QTBUG-63992 Change-Id: Iae92ff7862a13d36e695eec63b54403ec872f2b4 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Make tests compile for AndroidLiang Qi2018-06-2517-14/+33
| | | | | | | | | | | | | | | | | | This only enables compilation, it doesn't fix any test. Qt on Android supports process, but not TEST_HELPER_INSTALLS. See also acdd57cb for winrt. android-ndk-r10e is used to compile, see http://doc-snapshots.qt.io/qt5-5.11/androidgs.html . corelib/io/{qdir,qresourceengine} need to be fixed later. Done-with: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Change-Id: I34b924c8ae5d46d6835b8f0a6606450920f4423b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Remove dead test - compilerwarningsLiang Qi2018-06-221-54/+0
| | | | | | | A follow-up of 9d078c8f147ea875e862360b0d7480201fbbcff7 in qtqa repo. Change-Id: Ib7c1f5cf325e9ad0066aae139b0dc72bc0184b32 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* findtestdata: test 'relative to test source'-fixMårten Nordheim2018-06-221-0/+24
| | | | | | | | | | | | | | Before the fix is applied this test fails because QFINDTESTDATA will return "/usr/" instead of the folder with the same name in the current directory. The 'usr' folder can't be located 'next to' the application since this does not trigger the issue (QFINDTESTDATA looks for the folder next to the executable early on). So we put it in a subdirectory and change the current working directory to its parent directory. Change-Id: I627679dcb6f2f6954264e23bfc1a71de3bff7203 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Android: fix qdiriterator testMårten Nordheim2018-06-212-10/+10
| | | | | | | | | | | | ... by adding a prefix to the resource. On android there is a resource ("qpdf") which gets included in the root in all applications, included from "src/gui/painting/painting.pri". So we move the test data to a sub-folder. Task-number: QTBUG-68596 Change-Id: I67f2ed79a32c68d9a76cafba8ef23fe0da7c0fe8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: tst_qthread: terminate is not supportedMårten Nordheim2018-06-211-4/+4
| | | | | | | | | "terminate" and "terminated" both fail on Android since QThread::terminate not supported on Android. So we should skip them. Task-number: QTBUG-68596 Change-Id: Id0d1dde2cfa02bb2978e5dd16087bf8f3bf112b0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: Blacklist tst_qkeyeventMårten Nordheim2018-06-211-0/+6
| | | | | | Task-number: QTBUG-68974 Change-Id: I9178f91b44bc27a055a4bb743374a8bd1dfa5599 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.11.1' into 5.11" into ↵Liang Qi2018-06-215-2/+170
|\ | | | | | | refs/staging/5.11
| * Merge remote-tracking branch 'origin/5.11.1' into 5.11Qt Forward Merge Bot2018-06-195-2/+170
| |\ | | | | | | | | | Change-Id: I9a4571ccf826a86e055dfbba23b5e5cbd8ea55e8
| | * CMake: Restore qt5_use_modules() functionKevin Funk2018-06-154-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears that in the 5 years since we deprecated this function, people have not stopped using it. The removal of qt5_use_modules() caused lots of troubles in packages still using it when they were compiled against Qt 5.11.0. Instead, let's revive this function and keep it for the Qt5 life time. See discussion on qt-development mailing list: http://lists.qt-project.org/pipermail/development/2018-June/032837.html Change-Id: Ic263e3bb6706268cb9ea38a0711665f166a3aa9e Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QHeaderView: Send the StatusTip events to itself if there is no parentAndy Shaw2018-06-141-2/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is a parent (typically an itemview) then StatusTip events should be sent to that. However in the case of there not being a parent then the event should be sent to the QHeaderView itself. Task-number: QTBUG-68458 Change-Id: I2a8c11c973210c7adf1bf29443f224f968a357a9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Cope if mktime() deems times in a spring forward gap to be invalidEdward Welbourne2018-06-211-27/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In tst_QDateTime::springForward(), we test correct handling of times in the gap; these are formally invalid and a mktime() implementation may reasonably reject them causing our date-time code to produce an invalid result. So handle that case gracefully in the tests, only insisting on consistency between the two ways of preparing the date. In one test, package the repeated code I was going to adapt into a macro to save repeitition. Task-number: QTBUG-68832 Task-number: QTBUG-68839 Change-Id: Ib8a16ff007f4e75ab2ccff05b1ccf00a45e50dc8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Add Android to exceptions in tst_QDateTime::toString_textDate_extra()Edward Welbourne2018-06-211-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android doesn't use the proper zone-abbreviation, so just check it starts with the right date-time. Revised the way the #if-ery for that is handled, to avoid repetition of the (now more complex) condition in the two tests affected. Task-number: QTBUG-68833 Change-Id: Iceb5469f46c69ba5cdbaf7ca050ad70f2bb74f44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Cope with Android's lack of time-zone abbreviationsEdward Welbourne2018-06-211-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have a test expect what it does produce rather than fail what we can't fix. Task-number: QTBUG-68837 Change-Id: Icda7bd9968682daf97d46d597f8bb0433560cde2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Make some QEXPECT_FAIL()s consistent in form and contentEdward Welbourne2018-06-211-6/+6
|/ / | | | | | | | | | | | | | | They used different messages for the same excuse, which weren't well worded in any case; and their #if-ery was differently decorated. Change-Id: I28f5032693aff1036cb086ac4032c669110a5cb5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* / Make QString's formatting of doubles be consistent with other placesEdward Welbourne2018-06-141-0/+23
|/ | | | | | | | | | | | | | | | | | | | QString::sprintf(), like the C printf-family, always includes two digits in any exponent it outputs. Up to 5.6, number() and arg() taking a double did the same; but changes at 5.7 to enable opting out of the leading zero this implies for a single-digit exponent accidentally opted out of it in args() and number(). This commit fixes number() and arg() to include QLocaleData::ZeroPadExponent in the flags they pass down to the C locale's doubleToString(), restoring the prior behavior, including consistency with sprintf(). [ChangeLog][QtCore][QString] Formatting of doubles with single-digit exponent, by number() or args(), now includes a leading zero in that exponent, consistently with sprintf(), as it did up to 5.6. Task-number: QTBUG-63620 Change-Id: I10c491902b8556e9f19e605177ead8d9fd32abd9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix HDR format in QOpenGLFramebufferObject::toImage()Allan Sandfeld Jensen2018-06-061-0/+18
| | | | | | | | If the fbo had samples > 0 set, it would use a temporary fbo with a default configuration losing the HDR precision. Change-Id: I7e9966165b3100f148c4ad24738f3ee71273f29a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix QTransform::transposed() result having wrong transformation typeEirik Aavitsland2018-06-061-0/+35
| | | | | | | | | | The implementation of QTransform::transposed() had a wrong assumption about the type of the result. Task-number: QTBUG-68630 Change-Id: Ia5ce794efe773d74fb5fdaff3da8cae2b452e7e5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add binary compatibility files for 5.11 for QtBaseMilla Pohjanheimo2018-06-0511-0/+100472
| | | | | | | | Binary compatibility files for bic test added Change-Id: Ie540ea0084c72a6a0ae7c47831ecbcc0dd7030b9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use qFuzzyCompare instead of qFuzzyIsNull in QPointF ==Allan Sandfeld Jensen2018-05-301-0/+39
| | | | | | | | | | | | | qFuzzyIsNull has a fixed range, where qFuzzyCompare can tell if numbers are different in a more relative range. Without it QPointFs that are heavily scaled will be interpreted as identical, when they are quite different at their own scale. Task-number: QTBUG-60359 Task-number: QTBUG-62161 Change-Id: Ic4ba90e9e994aedff5548d690f053eb309b0a60b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-299-21/+21
| | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* macOS: Fix QFileSystemWatcher to watch paths with the same prefixMikhail Svetkin2018-05-291-28/+60
| | | | | | | | | It happens because our filesystemwatcher thinks it is subdirectory and not two different paths Task-number: QTBUG-60676 Change-Id: Ic753e9481cb26303a030044e0a5ab4d703bc529f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* QSortFilterProxyModel: don't assert when old model gets destroyedChristian Ehrlicher2018-05-261-4/+14
| | | | | | | | | | | | | | When a new model was set with setSourceModel() and the mapping was built up, the destruction of the old model caused a reset in the QSortFilterProxyModel which lead to an empty view or an assertion. Now we properly disconnect the old model again and also clean up the old mapping/persistent indexes when a new source model is set. Task-number: QTBUG-44962 Task-number: QTBUG-67948 Task-number: QTBUG-68427 Change-Id: I2e0612899c210bde3ac0cfa59aefd78269deee5b Reviewed-by: David Faure <david.faure@kdab.com>
* Fix tst_QDoubleSpinBox::editingFinished failing after other testsKari Oikarinen2018-05-181-2/+2
| | | | | | | | | | | | | Wait for the spinbox to show become active in the previous test. Also use QWidget::activateWindow() instead of QApplication::setActiveWindow(). Use of the latter seemed to result in some confusion where QWidget::isActiveWindow() returned true but QWindow::isActive() on the underlying window returned false, leading qWaitForWindowActive() to fail. Also remove superfluous setting of focus. It was just set and verified. Change-Id: I023cdc2d272e23b2537b32606b7a3bf35bf671ac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add support for QSharedPointer<cv qualified>::create()Thiago Macieira2018-05-171-0/+8
| | | | | | | | | | [ChangeLog][QtCore][QSharedPointer] Fixed a problem that made create() on a type with const qualification fail to compile. Task-number: QTBUG-68300 Change-Id: I0825ff5b5f6f4c85939ffffd152f3e55e5b9caae Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove a reference to a no longer used database serverAndy Shaw2018-05-161-2/+0
| | | | | | Task-number: QTBUG-32390 Change-Id: I7556507267be04ca50c4ad0c7d49f3aa5fe31a90 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* sqlite: Allow for duplicated placeholders with just one placeholderAndy Shaw2018-05-161-0/+10
| | | | | | | | | | This accounts for a case of a placeholder being duplicated in the prepare query, but where only one placeholder was used. This amends e4e87a2ece1e0c9901514fea094f31863b64b570 Task-number: QTBUG-68299 Change-Id: Ia92ee912facd51a13e7222886debb219b24442b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tst_QCommandLinkButton: Add back wait to the beginning of setAutoRepeat()Kari Oikarinen2018-05-161-6/+9
| | | | | | | | | | | | | | | | | | | setAutoRepeat() is failing on macOS and Windows when run together with defaultAndAutoDefault(). It succeeds when run on its own. Adding the wait allows it to succeed when run with the other tests as well. Amends 0cb940b1d3b9a1ba50f2d1973fca411706da266d, which removed the wait. The comment is the same as before. I couldn't see a better way to replace the wait (QApplication::topLevelWidgets() already returns only the testWidget and testWidget->isActiveWindow() returns true). Another theory I had was something waiting for the KeyRelease so I changed QApplication::sendEvent() uses to QTest::keyClick(). It did not help but that still seems preferable. Change-Id: If87d1e6e018751f3068ea4c913ae6731aba41ff0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Skip tst_QProcess::processesInMultipleThreads under QEMUKari Oikarinen2018-05-142-0/+5
| | | | | | | | | | | | | | tst_QProcess hangs sometimes in QEMU. Based on my experiments in a debug VM the offending test seems to be processesInMultipleThreads(), since that was were I was able to reproduce the hanging in. Since the whole test executable hangs, blacklisting is not enough, so skip the test. Task-number: QTBUG-67760 Change-Id: I34f8852be955a8612deac22b369f68d79a139d11 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Treat the Content-Disposition header as a known headerAndy Shaw2018-05-141-0/+3
| | | | | Change-Id: I307f67b10759d17f603a340b14266ab47d195497 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QJsonDocument: Avoid overflow of string lengthsJüri Valdmann2018-05-142-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The added test case contains the binary JSON equivalent of ["ž"] with the modification that the string's length has been set to INT_MAX. In Value::usedStorage this length is used through the pointer d like so s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d); Because 2 * INT_MAX is UINT_MAX-1, the expression as a whole evaluates to 2, which is considered a valid storage size. However, when converting this binary JSON into ordinary JSON we will attempt to construct a QString of length INT_MAX. Fixed by using String::isValid instead of Value::usedStorage. This method already takes care to avoid the overflow problem. Additionally, I've tried in this patch to clarify the behavior of Value::isValid a bit by writing it in a style that is hopefully more amenable to structural induction. Finally, the test case added in my previous patch had the wrong file extension and is renamed in this one. Task-number: QTBUG-61969 Change-Id: I45d891f2467a71d8d105822ef7eb1a73c3efa67a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tests/auto/widgets/dialogs: Avoid unconditional qWait()sKari Oikarinen2018-05-144-76/+50
| | | | | | | | Task-number: QTBUG-63992 Change-Id: I679a0f482ec2c3ed5d896f1c40c67d9932c6fc18 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* tests/auto/widgets/graphicsview: Avoid unconditional qWait()sKari Oikarinen2018-05-146-188/+70
| | | | | | | | Task-number: QTBUG-63992 Change-Id: Ibbcf5bf968fcf1b1c3a043c805bdcc23a4005f00 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* OpenSSL v1.1.1: fix qtbug18498_peekMårten Nordheim2018-05-111-2/+10
| | | | | | | | | | | | | Previously the test worked because the client was the last party to know when encryption was established. However, due to changes in the TLSv1.3 handshake the server is now the last one. In either case, relying on both to be encrypted when one of them is finished is not great, so now we only quit the event loop when both client and server have emitted 'encrypted'. Change-Id: Ic1fc75671206d866f7ea983805fd58a99657aac6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>