summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Regenerate tests/auto/corelib/ioAlexandru Croitor2019-11-1230-75/+100
| | | | | | | Change-Id: Ic1d1b5c0deb90800c7219fb8cce4e77e0db145b8 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Rename some more manual test to be uniqueLeander Beernaert2019-11-123-3/+3
| | | | | | | | | | | This patch renames some of the manual test by prefixing them with tst_manual_ to make sure they are unique in the project structure. This is a requirement for the CMake port. Change-Id: I83e2152826e0f95c3378374ab1c9992412022109 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 63a1a30a014eb75a67c390a16faa9aeb03a4a012) Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix compile errors related to missing Qt:: namespaceLeander Beernaert2019-11-1212-54/+68
| | | | | | | Change-Id: I092a26ef38b08c52d84adb027a1b1bdee8cc7f6b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit ce187c4f0e57d5053583613aeedbc89024bae240) Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Rename some manual test to be uniqueLeander Beernaert2019-11-1212-7/+14
| | | | | | | | | | | This patch renames some of the manual test by prefixing them with tst_manual_ to make sure they are unique in the project structure. This is a requirement for the CMake port. Change-Id: Ie393b125ce5a35b7069cf006db0f3af8c4fda5b4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 937e014e6382c172d00ef2a42dcc8913206075f8)
* Build test/manual if it contains a CMakeLists.txtLeander Beernaert2019-11-121-0/+6
| | | | | | | Change-Id: Ibada60b0902f9c6a6a7284489a56106e0021a9de Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make standalone tests build via top level repo projectAlexandru Croitor2019-11-082-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously repo/tests/CMakeLists.txt was a standalone project on which CMake could be called. This was useful for Coin to be able to build and package only tests, but was a bit troublesome because that means having to specify the usual boilerplate like minimum CMake version, which packages to find in every tests.pro project. Instead of having a separate standalone project, modify the top level project and associated CMake code to allow passing a special QT_BUILD_STANDALONE_TESTS variable, which causes the top level project to build only tests, and find Qt in the previously installed qt location. This also means that when building a repo, we generate a ${repo_name}TestsConfig.cmake file which does find_package on all the modules that have been built as part of that repo. So that when standalone tests bare built for that repo, the modules are automatically found. qt_set_up_standalone_tests_build() is modified to be a no-op because it is not needed anymore. Its usage should be removed from all the other repos, and then removed from qtbase. Non-adjusted tests/CMakeLists.txt projects in other repositories should still be buildable with the current code, until they are updated to the new format. Adjust the Coin build instructions to build the standalone tests in a separate directory. Adjust pro2cmake to generate new structure for the tests/tests.pro projects. Adjust the qtbase tests project. Fixes: QTBUG-79239 Change-Id: Ib4b66bc772d8876cdcbae1e90ce5a5a5234fa675 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix handling of _nolink targets for the QtNetwork moduleAlexandru Croitor2019-11-082-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | When a _nolink target is exported, instead of getting the original namespace prefix, it gets the Qt6 prefix (OpenSSL::OpenSSL_nolink -> Qt6::OpenSSL_nolink). There is some special case code in Network autotests which tries to access the former target name, which doesn't exist when building standalone tests. Make sure to create a Qt6:: library alias for _nolink targets during a build (so before the library is exported), and change the Network autotests project to use this Qt6:: namespaced library, which will ensure it is found both in a standalone tests build and in a regular Qt build. Also make sure to actually call find_package to find the OpenSSL library when building standalone tests, otherwise configuration will fail. Change-Id: I3da5b958e72e745a50380f8ab1644459a7c6b005 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Convert remaining tests/benchmarksLeander Beernaert2019-11-04142-24/+2515
| | | | | | | Change-Id: Ie7d49d4dc5bf6b2345b54f6bdfffcd974123f729 Reviewed-by: Qt CMake Build Bot Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Convert remaining gui utils testsLeander Beernaert2019-11-0412-15/+174
| | | | | | | | Fixes:QTBUG-78229 Change-Id: I3bff1b562e1c146f291e5692c90d2c38f162d395 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: add tests/auto/gui/textFrederik Gladhorn2019-11-0130-1/+684
| | | | | | | Fixes: QTBUG-78228 Change-Id: I3d4666a553e94de47e01d64551b8fe672994b137 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: fix tests/auto/gui/kernel/qguieventloopFrederik Gladhorn2019-11-011-0/+3
| | | | | | | | | | | | | | The include does not join the required libraries. When building the tests in a separate build directory this works for some reason (that's why the CI doesn't catch it). Building everything top level breaks though. Considering this happens in maybe two places, I'm not sure it's worth the effort of fixing the porting scripts. Change-Id: I104ab9717257cbe8dfd5112dffd0d0b002cdb09e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* cmake: re-generate auto/gui/kernel/qguieventloopFrederik Gladhorn2019-11-011-7/+6
| | | | | | | | | | | The target naming has been fixed, it used to be taken from the include, but now that we added the real tst_qeventloop we have a name clash. All that's needed to fix the situation is regeneration of this cmake list. Change-Id: Id336906f30494dfa92cf5e2812f8b1a8771a992f Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: add gui/kernel testsFrederik Gladhorn2019-10-3135-44/+627
| | | | | | | Fixes: QTBUG-78224 Change-Id: I9e6294b5035b066dead0f5ff91f81e472bc56d62 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: add widgets/kernel testsFrederik Gladhorn2019-10-3122-35/+330
| | | | | | | | Fixes: QTBUG-78230 Change-Id: Ia59f531f92e1f8499a8e814ff48c36f65984ff2a Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Convert tests/auto/otherLeander Beernaert2019-10-2827-18/+605
| | | | | | | Change-Id: I79ba4f6bbbbede8ddab278dd987d9ad98277a229 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Convert qvulkan testLeander Beernaert2019-10-282-1/+16
| | | | | | Change-Id: I395fa1c08bb67d65604962883dce3b390c604b9c Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Port qopengl and qopenglconfig testsLeander Beernaert2019-10-283-2/+44
| | | | | | Change-Id: Ic3b61fb7f23cb884552126038d0bdf289d0cbc6a Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Port rhi testsLeander Beernaert2019-10-284-1/+59
| | | | | | Change-Id: I3bf5731696a0647bf0e62758eb3d1742ba097041 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Distinguish between qt_plugin and regular pluginsLeander Beernaert2019-10-2817-35/+290
| | | | | | | | | If we do not encounter the load(qt_plugin) statement in the .pro file but we do see the entry CONFIG+=plugin, treat the target as a regular CMake library instead of treating it as a qt_plugin by default. Change-Id: I67ad5c865a1a5ab691a6b0d86c2db4b686aa04dd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: add gui/image testsFrederik Gladhorn2019-10-2313-17/+564
| | | | | | | | Fixes: QTBUG-78223 Change-Id: I9a5c90bb664e3baa4481e6bdaa9a4990e3f68317 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Convert corelib plugin testsLeander Beernaert2019-10-2127-2/+697
| | | | | Change-Id: Ia98f7945a2c5b09a9b4d59e430cf05a7fecb7d55 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix OpenSSL include path for QtNetwork private testsLeander Beernaert2019-10-181-0/+14
| | | | | | | | | On platforms which use OpenSSL that is not installed in a standard directory, e.g: android + vcpkg, private tests would fail to resolve the include for OpenSSL. Change-Id: I57ce6a83e3bc9a232d4285530f8619ffbfdf2f77 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeSimon Hausmann2019-10-1721-131/+306
|\ | | | | | | Change-Id: Ia1da879a7bd8f71a649661a1844144dd67d60b3a
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-1720-99/+226
| |\ | | | | | | | | | Change-Id: Ica69de99be9c8af4d28a52e4b69e6af748ed983c
| | * QAbstractItemModel: implement QRegularExpression support for matchSamuel Gaist2019-10-161-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. [ChangeLog][QtCore][QAbstractItemModel] The match() method now supports the new Qt::RegularExpression match flag value. This will allow users to use either a string or a fully configured QRegularExpression when doing searches. In the second case, the case sensitivity flag will be ignored if passed. Task-number: QTBUG-72587 Change-Id: I07c8d72a661c48b7f4fcf13ef8e95980bcdcb998 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * tst_qfiledialog2: Don't assume window activation is availableJohan Klokkhammer Helsing2019-10-161-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer qWaitForWindowExposed over qWaitForWindowActive whenever possible, skip in the other cases. Makes the test pass on Wayland. Task-number: QTBUG-62188 Change-Id: I60b4000c72c3727a2f33b79a5038469055b0fef2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * tst_QAbstractScrollArea: Use qWaitForWindowExposed instead of activeJohan Klokkhammer Helsing2019-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Makes the test pass on Wayland. Task-number: QTBUG-62188 Change-Id: I53011ad623e4bdb557d79c136f06ce7ac00a08ee Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-1617-83/+167
| | |\ | | | | | | | | | | | | Change-Id: Ifd83db69416230175ddc3161f640b612755018fc
| | | * Prepare for deprecating the QDesktopWidgetSona Kurazyan2019-10-158-30/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDesktopWidget is marked as obsolete in docs, but it is not yet completely deprecated, some of its methods are still in use. Replace uses of the following methods marked as obsolete: - QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen() - QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry() - QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry() Task-number: QTBUG-76491 Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * Win32: Consolidate registry codeFriedemann Kleint2019-10-145-41/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a RAII class for registry keys and use it throughout the code base. Change-Id: I666b2fbb790f83436443101d6bc1e3c0525e78df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | * Fix the size calculation of QHeaderView when stylesheet is usedSona Kurazyan2019-10-141-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calculating the header section size based on its contents when a stylesheet is used, the size hints from the stylesheet are used. In case if the stylesheet specifies only one of the sizes, the other is set to -1. Because of this the actual content size is ignored. The solution is to calculate the size based on the application style, in case if it's not specified in the stylesheet. Fixes: QTBUG-75615 Change-Id: I3453fa623d75b6b32832edf753de6e3e4e7f5a22 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | | * Remove usages of deprecated APIs of QDesktopWidgetSona Kurazyan2019-10-134-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced the usages of the following deprecated APIs: * QDesktopWidget::screenCount() -> QGuiApplication::screens().size() * QDesktopWidget::screenGeometry(int) -> QGuiApplication::screens().at() * QDesktopWidget::screenNumber(QPoint) -> QGuiApplication::screenAt(QPoint) - Added notes for the QWidget *QDesktopWidget::screen(int), which currently has no replacement. - Fixed the tests to build conditionally, only when these APIs are enabled. Task-number: QTBUG-76491 Change-Id: I2fdec96d0a6a4fc782c53549b05a5556412b8305 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-162-32/+80
| |\| | | | | | | | | | | | | | Change-Id: I8348c823117dd3d594d365fc3583f7e44d44a81c
| | * | tst_qgraphicseffect: Wait for exposed instead of activeJohan Klokkhammer Helsing2019-10-151-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes the test pass on Wayland. Task-number: QTBUG-62188 Change-Id: I3900925e74d8d940a8c5af87ea64a6ec3c8c3293 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | tst_qgraphicsitem: Skip tests that fail on WaylandJohan Klokkhammer Helsing2019-10-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-62188 Change-Id: If0638d51bffa6ef375476c0a601c387bd05583ae Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * | tst_qgraphicsitem: Don't assume window activation is availableJohan Klokkhammer Helsing2019-10-141-25/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some windowing systems (i.e. Wayland) do not allow applications to steal window focus. Normally, we would just replace qWaitForWindowActive with qWaitForWindowExposed, because that is usually the intent, in this test however, there are many occurrences of both variants right after each other. And, as described in the commit message of 153e8b49a, this may be because window activation may cause repaints, and we want to wait for it to reduce the chance of receiving an extra repaint later (possibly causing tests to be racy). Therefore, I took the conservative approach, and kept the qWaitForWindowActive calls, except when the capability is not available. Hopefully this will not cause flakiness in existing platforms, while also allowing tests to pass on platforms where activation is not supported. Task-number: QTBUG-62188 Change-Id: I15502baa28c464a808d585a5e6d67c9b745b17ae Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Regenerate files after dev -> wip/cmake mergeAlexandru Croitor2019-10-143-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note the following bigger things that had to be done: Handle GSS library / feature with a new custom find module. Implement rudimentary support for relocatability (does not currently handle extprefix). Change-Id: Ic6cd27dda7ebca9829f51cb42ea76fff6d1767ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-14147-6489/+10289
|\| | | | | | | | | | | | | | | Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-148-62/+47
| |\| | | | | | | | | | | | | | Change-Id: I129dd579f92cb2592a38ca043472b45cb926ae12
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-135-23/+47
| | |\| | | | | | | | | | | | | Change-Id: I9953c1ca16862184c2373027e946c482ce8e6f0e
| | | * QGroupBox: always disable children in a checkable, unchecked groupboxVolker Hilsheimer2019-10-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The childEvent handler sets the enabled property of children as they are added to the groupbox, but applications might later enable children and check/uncheck the groupbox's checkbox in undefined order. In that case, we would end up with enabled children inside a conceptually disabled groupbox (the groupbox's checkbox represents the logical "disabled" state), which breaks documented QWidget::enabled rules. To make sure that all children are disabled as per the state of the groupbox, we need to run that logic once the UI has been set up, and before it becomes visible. This is what polishing is for, so listen for that event in addition and handle it the same way as adding (which duplicates things, but keeps existing code that might depend on things being updated as they are added working). Adds the case to the existing enabledChildPropagation test case. [ChangeLog][QWidget][QGroupBox] Always disable children of a checkable, unchecked group box before showing. Change-Id: I978bd27b6f1a3f54ec745faeea529a98d0d93619 Fixes: QTBUG-25938 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * Fix QEasingCurve possible imprecision at endpointsEirik Aavitsland2019-10-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the spline curves and (most of) the predefines curves are defined as having start value 0.0 and end value 1.0. The spline and In/OutBack functions would sometimes not produce that result precisely, so code could not reliably depend on expressions like (easedValue < 1.0) becoming false. Fix by explicitly handling endpoints. Fixes: QTBUG-76781 Fixes: QTBUG-72630 Change-Id: I21be43af469a76c090154bffef8406a9baf2d0b1 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
| | | * Distinguish invalid datetimes from othersEdward Welbourne2019-10-111-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed QDateTime is invalid, but compared equal to a valid one referencing the start of 1970. This lead to date properties in QML being initialized invalid but not getting an onChange if the first value they're set to is the start of 1970. Fixing that then lead to some tests failing. Indeed, the original equality check involved using toMSecsSinceEpoch(), whose value is undefined unless the datetime is valid, without a prior check on its validity: so ensure all uses of toMSecsSinceEpoch() are guarded with isValid() checks. Reworked tst_QDateTime::toSecsSinceEpoch() to use its bool column (previously unused, after separating from toTime_t(), which uses this column for "out of time_t's range") for validity of the datetime. [ChangeLog][QtCore][QDateTime] Invalid datetimes are now treated as equal and less than all valid ones. They could previously be found equal to valid datetimes. Fixes: QTBUG-79006 Change-Id: Ie72deb8af4350a5e808144d0f6e42dc8eb3ff5ef Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Make QTextBlockFormat::MarkerType an enum classShawn Rutledge2019-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This came up during API review. Change-Id: I9198e1eb96db0c21e46a226a032919bb62d3ca66 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | | * Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-10-101-0/+9
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbscreen.h src/src.pro Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
| | | | * Don't crash when calling jumpToFrame() on an empty QMovieLars Knoll2019-10-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly return an invalid frame when calling jumpToFrame() with a non existent frame number. Fixes: QTBUG-79029 Change-Id: Ic40f4a6de3106fab42c0bb6c961194be47b04e31 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * | | QMYSQL: remove support for MySql 4.xChristian Ehrlicher2019-10-123-39/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MySql 5.0 was released 2005 so it's time to remove support for MySql 4.x 14 years later. [ChangeLog][QtSql][QMYSQL] Removed support for MySql < 5.0 since 5.0 was released 14 years ago. Change-Id: I45005accdffefbd9338ac0e710512a4c7ea8e09e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-124-385/+370
| |\| | | | | | | | | | | | | | | | | | Change-Id: I6ad865b2c26003f4508da9b3f8e075a951ff8ef7
| | * | | Win: QUdpSocket: Use QVarLengthArray for retrieving sizeMårten Nordheim2019-10-113-1/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increased size of the peek buffer to 2048 from 1500 and now uses QVarLengthArray with space for 10 stack-allocated WSABUF instances, but still growing at the pace of 5. In benchmarking (created for and included in this patch) this shows better performance when retrieving the datagram size for larger datagrams, and the same performance as before for smaller datagrams (at the cost of 2048 - 1500 + 16 * 10 = 708 bytes extra stack space). Benchmarks: With changes: ********* Start testing of tst_QUdpSocket ********* Config: Using QtTest library 5.13.1, Qt 5.13.1 (x86_64-little_endian-llp64 shared (dynamic) release build; by MSVC 2019) PASS : tst_QUdpSocket::initTestCase() PASS : tst_QUdpSocket::pendingDatagramSize(52) RESULT : tst_QUdpSocket::pendingDatagramSize():"52": 0.0038 msecs per iteration (total: 63, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(1024) RESULT : tst_QUdpSocket::pendingDatagramSize():"1024": 0.0039 msecs per iteration (total: 64, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(2049) RESULT : tst_QUdpSocket::pendingDatagramSize():"2049": 0.0038 msecs per iteration (total: 63, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(4500) RESULT : tst_QUdpSocket::pendingDatagramSize():"4500": 0.0039 msecs per iteration (total: 64, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(4098) RESULT : tst_QUdpSocket::pendingDatagramSize():"4098": 0.0040 msecs per iteration (total: 66, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(8192) RESULT : tst_QUdpSocket::pendingDatagramSize():"8192": 0.0040 msecs per iteration (total: 67, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(12000) RESULT : tst_QUdpSocket::pendingDatagramSize():"12000": 0.010 msecs per iteration (total: 90, iterations: 8192) PASS : tst_QUdpSocket::pendingDatagramSize(25000) RESULT : tst_QUdpSocket::pendingDatagramSize():"25000": 0.021 msecs per iteration (total: 88, iterations: 4096) PASS : tst_QUdpSocket::pendingDatagramSize(32768) RESULT : tst_QUdpSocket::pendingDatagramSize():"32768": 0.033 msecs per iteration (total: 69, iterations: 2048) PASS : tst_QUdpSocket::pendingDatagramSize(64512) RESULT : tst_QUdpSocket::pendingDatagramSize():"64512": 0.088 msecs per iteration (total: 91, iterations: 1024) PASS : tst_QUdpSocket::cleanupTestCase() Totals: 12 passed, 0 failed, 0 skipped, 0 blacklisted, 3090ms ********* Finished testing of tst_QUdpSocket ********* Without changes: ********* Start testing of tst_QUdpSocket ********* Config: Using QtTest library 5.13.1, Qt 5.13.1 (x86_64-little_endian-llp64 shared (dynamic) release build; by MSVC 2019) PASS : tst_QUdpSocket::initTestCase() PASS : tst_QUdpSocket::pendingDatagramSize(52) RESULT : tst_QUdpSocket::pendingDatagramSize():"52": 0.0039 msecs per iteration (total: 65, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(1024) RESULT : tst_QUdpSocket::pendingDatagramSize():"1024": 0.0039 msecs per iteration (total: 65, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(2049) RESULT : tst_QUdpSocket::pendingDatagramSize():"2049": 0.0040 msecs per iteration (total: 66, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(4500) RESULT : tst_QUdpSocket::pendingDatagramSize():"4500": 0.0040 msecs per iteration (total: 67, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(4098) RESULT : tst_QUdpSocket::pendingDatagramSize():"4098": 0.0040 msecs per iteration (total: 67, iterations: 16384) PASS : tst_QUdpSocket::pendingDatagramSize(8192) RESULT : tst_QUdpSocket::pendingDatagramSize():"8192": 0.010 msecs per iteration (total: 90, iterations: 8192) PASS : tst_QUdpSocket::pendingDatagramSize(12000) RESULT : tst_QUdpSocket::pendingDatagramSize():"12000": 0.010 msecs per iteration (total: 90, iterations: 8192) PASS : tst_QUdpSocket::pendingDatagramSize(25000) RESULT : tst_QUdpSocket::pendingDatagramSize():"25000": 0.033 msecs per iteration (total: 69, iterations: 2048) PASS : tst_QUdpSocket::pendingDatagramSize(32768) RESULT : tst_QUdpSocket::pendingDatagramSize():"32768": 0.0502 msecs per iteration (total: 103, iterations: 2048) PASS : tst_QUdpSocket::pendingDatagramSize(64512) RESULT : tst_QUdpSocket::pendingDatagramSize():"64512": 0.13 msecs per iteration (total: 70, iterations: 512) PASS : tst_QUdpSocket::cleanupTestCase() Totals: 12 passed, 0 failed, 0 skipped, 0 blacklisted, 3192ms ********* Finished testing of tst_QUdpSocket ********* Fixes: QTBUG-78275 Change-Id: If86a226620244aa4e470600c6c1db4a7863b5617 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | tst_QAbstractItemView: cleanupChristian Ehrlicher2019-10-101-384/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QAbstractItemView autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override - replaced QCoreApplication::processEvents with QTRY_VERIFY/QTRY_COMPARE Change-Id: Iba91811db6fb925364fc88ec36357e758b937329 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>