summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* testlib selftest: include 'keyboard' test in generate_expected_output.pyTor Arne Vestbø2020-07-221-1/+1
| | | | | Change-Id: Ia1d759454b2931ca838942cf9b08f8b62dfd61ce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib selftest: Only warn about missing test expectation if none was foundTor Arne Vestbø2020-07-221-1/+4
| | | | | Change-Id: I55e19d0a7b9b58ceeee4f25612f4a1d9ec66eb76 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib: Defer signal dumper start until tests are ready to runTor Arne Vestbø2020-07-226-26/+3
| | | | | | | | | | | | | | | We don't want the signal dumper to pick up signals that our own test machinery produces, such as the ones emitted from the watchdog thread startup and shutdown. This would otherwise produce: tst_Signaldumper::initTestCase() Signal: QThread(7fc969e0d870) started () At startup, and at shutdown even more confusingly: tst_Signaldumper::UnknownTestFunc() Signal: QThread(7fc969e0d870) finished () Change-Id: I9e81fa168eaa92551d38d5576973bbf95ac23364 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testlib selftest: rebaseline benchlibcallgrind resultsTor Arne Vestbø2020-07-225-32/+0
| | | | | | | | | | | | The logic was changed in eb52d78e90ad8870a to only produce a single result for all the benchmark iterations, but only the plain text output was rebaselined. This was not caught by the test since we only run this test with the plain test logger. Regenerating the results with the python script however runs it with all loggers, so let's fix the baseline. Change-Id: I9ebe8a59ac3ab36694a739f98dbfffbae9a08552 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testlib selftest: check blacklisted test for test failuresTor Arne Vestbø2020-07-223-8/+7
| | | | | Change-Id: Ifcd1155f7627f6a9f8b379fb9e87425f9d9f2877 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib selftest: unify xml quoted asserts that include line numbersTor Arne Vestbø2020-07-223-3/+3
| | | | | Change-Id: If66303bab10c23dd212a6abcdff3f145630e2401 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib selftest: rebaseline tap results to not include line numbersTor Arne Vestbø2020-07-2225-462/+464
| | | | | Change-Id: I6271ac1984a3829ba1c8dcc9d6419940cb89c62b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Manual touch test: Add a settings dialog for windowsFriedemann Kleint2020-07-222-1/+86
| | | | | | | | | | Exercise the touch settings of the native interface. Task-number: QTBUG-41433 Task-number: QTBUG-48849 Task-number: QTBUG-83252 Change-Id: I5ae95a79c00b55236dbbed9d8549f4fdf5b10b8e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix the touch manual test to compileFriedemann Kleint2020-07-221-3/+2
| | | | | | Task-number: QTBUG-72167 Change-Id: I9074fc21ae8fccf66140fb38bfbd35e526506c36 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qnsview: don't active QWindows inside NSWindows that are not keyRichard Moe Gustavsen2020-07-222-0/+31
| | | | | | | | | | | | A QWindow should only become Active when it's inside an NSWindow that is Key. If the NSWindow is not key, we need to wait for it to be so, and handle window activation from QCocoaWindow::windowDidBecomeKey() instead. Otherwise Qt will report a QWindow as Active when, in reality, it is not. Change-Id: Ib7e63b374f26af527a668c7f7d863c4168a4446d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tst_QPluginLoader: Fix MachO stub testsTor Arne Vestbø2020-07-222-5/+12
| | | | | | | | | The -arch_blank argument to lipo is no longer supported. Pick-to: 5.15 Pick-to: 5.12 Change-Id: I47efcb3633f23b7a18d66211bc16d5c9dbc067c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTestlib: Enable comparing QList against initializer lists/arraysFriedemann Kleint2020-07-2111-190/+445
| | | | | | | | | | | | | | | | | | | | | It is unnecessary to create a QList container just for comparison. Split out helpers for comparing sequence sizes and sequences from qCompare(QList) and add a template for an array with a non-type template parameter for the size. One can then write something like: const int expected[] = {10, 12,...}; QCOMPARE(QFontDatabase.pointSizes(...), expected) Unfortunately, any commas in such an array will be misread by macro expansion as macro argument separators, so any expected array with more than one entry needs an extra macro expanding __VA_ARGS__. Change-Id: Ie7c8dc20bf669bbb25f6d7f8562455f8d03968c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tst_QLine: use qmath.h's constants instead of local versionsEdward Welbourne2020-07-211-15/+9
| | | | | Change-Id: I41313f7e7caf3c364ae900a0b100c661aafb290d Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix testlib/selftest generate_expected_output.pyTor Arne Vestbø2020-07-211-1/+1
| | | | | | | Amends 40bc8d51298adf9d342de8195d6ead81a9cc6bcb. Change-Id: Iacaabec0c620db84278656501e64fc2b765e052f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib selftest: Add README explaining how to run and debug testsTor Arne Vestbø2020-07-211-0/+71
| | | | | Change-Id: Ica08f7013933e9e6a7678c0ba1f5827efa6eff42 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib selftest: Properly print failing testsTor Arne Vestbø2020-07-211-2/+2
| | | | | | | | | We don't want to print the QString as represented by the debug operator, but instead want to expand line feeds and other character codes as normal. Change-Id: I7261d8f94e7b4382733f06eb22f9a740a5c0488f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Ensure styles always get to polish the application paletteTor Arne Vestbø2020-07-212-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 0a93db4d82c051164923a10e4382b12de9049b45 we would polish the application palette even when it was the default palette, as we always recreated the system palette each time a style was set. After the change we skipped polishing the palette unless it was set by the user, under the assumption that the style would set its own default palette if it wanted to override the system palette. This turned out to break the style's ability to slightly tweak the palette via polish (versus the more full on standardPalette approach). We now polish both the default palette and user palettes, and we do so as part of the normal palette update logic. This ensures that the style also gets a chance to polish the palette when the platform theme changes. The polish will not have an effect on the resolve mask of the palette, as the polish is conceptually the same as a base palette, and should not affect e.g. Qt::AA_SetPalette. Fixes: QTBUG-85469 Fixes: QTBUG-85188 Pick-to: 5.15 Change-Id: I869e9c442b177de4f1dc49eb75220709306f4d12 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Fix configuration of CMake tests in-build-treeAlexandru Croitor2020-07-201-0/+5
| | | | | | | | | | | | Qt6 package was not found the tests were configured in-tree as opposed to standalone tests. Use the same trick we do for building examples in-tree. Specify the path to the build tree packages, and don't create targets. Amends 96e3ee06598d00e7155f3f8574759ea658a134e5 Change-Id: Ia60de416ce0afff5bd40be8c0c6e3c7898fd7ebf Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* QCommandLineOption: purge deprecated APIEdward Welbourne2020-07-201-6/+0
| | | | | | | | Since 5.8: setHidden(), isHidden() Part of the QCommandLineParser test also used setHidden(). Change-Id: I05a1c63ff3beb1167ed75632c1b71d7fff17f09e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QUrl: purge deprecated APIEdward Welbourne2020-07-201-2/+0
| | | | | | | | Since 5.0: QUrl's image of the QUrlQuery API Remove deprecation-suppression from tst_qurl.cpp, too. Change-Id: Ide826283cb4e177fb34fb4080502f5a4620bd5d7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QChar: purge deprecated APIEdward Welbourne2020-07-201-4/+1
| | | | | | | | Since 5.3 joining() and old Joining type Replaced by JoiningType joiningType() Change-Id: Iefee50aaf94cec6d67b5fc004b3e68357b2015c5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix compiler warning in tst_qstringlistmodelLars Schmertmann2020-07-201-1/+1
| | | | | | | Warning: redundant move in return statement [-Wredundant-move] Change-Id: I426c8c41c52b43ae3863f5aaf86027cabb961388 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Styles manual test: show active, inactive and disabled palette colorsShawn Rutledge2020-07-171-13/+15
| | | | | Change-Id: I19c9648f3099ec299e0117748a2808d7a407a3e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testlib/selftests: Fix generate_expected_output.pyFriedemann Kleint2020-07-171-34/+22
| | | | | | | | | Hardcode the tests which were previously scanned from the source. See qtbase/24e83de8d1924b8003c84f1df05b7befea2c5120. Change-Id: I8fb05568977f86726b20948a9c2d1cfce5cba161 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* SSL: add an autotest for handling of illegal datetimes in certificatesGiuseppe D'Angelo2020-07-172-0/+43
| | | | | | | | | | At the moment it just exposes QTBUG-84676, that is, OpenSSL and non-OpenSSL backend act differently. Went a bit overkill in making it data-driven, so if someone wants to add more samples it should be easier to do so. Change-Id: I96538c9563d12d69c217415ba85e244dda5e0cd0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix handling of Suzhou numbering systemEdward Welbourne2020-07-171-15/+31
| | | | | | | | | | | | | | | | This only arises when the system locale tells us to use its zero as our zero digit, since no CLDR locale uses it by default. Adapt an MS-specific QLocale::system() test to use Suzhou numbering, so as to test this. While updating the locale-restoration code to also restore the digits being set in that test, add restore code for the long time format, where previously only the short time format was restored. Add a comment to make it less likely one of those shall be missed in future. Fixes: QTBUG-85409 Change-Id: I343324bb563ee0e455dfe77d4825bf8c3082ca30 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDomNode: Add namespaceURI parameter to browse methodsLinus Jahn2020-07-171-1/+66
| | | | | | | | | | | | | | | | | This adds a namespaceURI parameter to the following methods of QDomNode: firstChildElement(), lastChildElement(), nextChildElement() and previousChildElement() Those methods can now be used to filter for elements with a specific namespaceURI without the need to use QDomNodeList. [ChangeLog][QtXml][QDom] Added namespaceURI parameter to browse methods like firstChildElement() to filter for elements with certain namespaces without the need of QDomNodeList. Change-Id: Ic2cfe8c6d5d5f6b5fcf27165df15bce54ad0f23a Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* CMake: Get tests/auto/cmake tests workingAlexandru Croitor2020-07-1738-373/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests/auto/cmake project can be configured separately as a standalone project with qt-cmake, or as part of the overall qtbase standalone tests. To do that a bunch of things were done - Ported all Qt5 strings to Qt6 - Replaced in all projects the use of add_definitions and include_directories with a target based approach, except for 2 tests where we check that the old-style approach works, otherwise the tests would file - Removed some (possibly unneeded) EGL / OpenGL tests - Fixed some C++ code - Added setup code to tests/auto/cmake/CMakeLists.txt to figure out which modules are available and should be tested - Fixed Qt6CTestMacros.cmake to be loaded by Qt6Core - Removed the CMake tests to not be run in qmake builds of Qt because they would fail anyway - Enabled the CMake tests to be part of standalone tests - Disabled auto-passing of the C and CXX compiler cache vars when cross-compiling so that the tests can somewhat pass on boot2qt. This is the issue we encountered in e2b2cd9397c76e91ac1ebe493bcac7696767c02e - Ultimately disabled tests for boot2qt, because the -rpath-link flag is not generated by CMake for some reason. - Added code to setup the environment when running an executable that was built as part of the test, so that the proper Qt libraries are found. This handles both the standalone tests case and separate project case. The remaining unported tests are test_import_plugins which requires quite a bit of work to get some modules and plugins built that were done as part of the qmake .pro files, test_plugins that checks some Network plugins which I'm not sure about, and test_add_big_resource which doesn't work with namespaced builds and there's no good way of detecting those at the moment either. Change-Id: Ic8809c72817d1db81af6c6014c11df6473ad8c75 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Cover more properties in the QAction testVolker Hilsheimer2020-07-171-1/+120
| | | | | | | | | | | | Expand the getSetCheck to include all properties, and add a test to verify the fallback logic for the tooltip property. Use the meta object system to set and check properties in the tooltip-test to verify that things don't break when migrating to the new property system. Change-Id: I56355e8b436ede46701a124a9241ed26d2c706c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deprecate QTimeLine's curveShape in favor of its easingCurveEdward Welbourne2020-07-161-11/+11
| | | | | | | | | | | | | | QEasingCurve has a richer variety of curves and curveShape was already implemented by changing the easingCurve property. [ChangeLog][QtCore][QTimeLine] Deprecated QTimeLine's curveShape property in favor of the easingCurve property. Pick-to: 5.15 Change-Id: I7261c0f24d7e02bc94624f0b74d699df62de1a52 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QtGui/Windows: Move the QRegion conversion functions into QtGuiFriedemann Kleint2020-07-161-1/+23
| | | | | | Task-number: QTBUG-81876 Change-Id: I2297291a4157e7015f499b0a6127301d9cb58526 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Don't test for equality if types can't be comparedVolker Hilsheimer2020-07-151-0/+72
| | | | | | | | | For types that don't have an operator==(), always trigger the binding and the changed notification. Task-number: QTBUG-85578 Change-Id: I41374f6d13c88106f4de83864e82172f3a248150 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qtypeinfo: Improve container checkFabian Kosmale2020-07-141-0/+9
| | | | | | | | | | | | | Smart pointers like QSharedPointer<T> do have a value_type, but their equality does not depend on T being comparable. Therefore, instead of simply checking for T::value_type, test for a few other container requirements. This also required to add an additional check for std::optional, as that one has an unconstrained operator== on MSVC. Change-Id: Iefd048f7aa360f4713ecd79f80acd7dae72ee18c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* moc: allow wrapper generation for QProperty in pimpl classFabian Kosmale2020-07-141-0/+7
| | | | | | | | | | | Previously, only QNotifiedProperty was supported. As moc cannot determine by itself whether the backing property is a QProperty or a QNotifiedProperty, allow NOTIFY false to indicate that it is a plain QProperty. For symmetry, NOTIFY true is also allowed and means that the backing property is a QNotifiedProperty. Change-Id: I66f3105c976ef084198ce8658bc07499a3cb1cd8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Support digit-grouping correctlyEdward Welbourne2020-07-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Read three more values from CLDR and add a byte to the bit-fields at the end of QLocaleData, indicating the three group sizes. This adds three new parameters to various low-level formatting functions. At the same time, rename ThousandsGroup to GroupDigits, more faithfully expressing what this (internal) option means. This replaces commit 27d139128013c969a939779536485c1a80be977e with a fuller implementation that handles digit-grouping in any of the ways that CLDR supports. The formerly "Indian" formatting now also applies to at least some locales for Bangladesh, Bhutan and Sri Lanka. Fixed Costa Rica currency formatting test that wrongly put a separator after the first digit; the locale (in common with several Spanish locales) requires at least two digits before the first separator. [ChangeLog][QtCore][Important Behavior Changes] Some locales require more than one digit before the first grouping separator; others use group sizes other than three. The latter was partially supported (only for India) at 5.15 but is now systematically supported; the former is now also supported. Task-number: QTBUG-24301 Fixes: QTBUG-81050 Change-Id: I4ea4e331f3254d1f34801cddf51f3c65d3815573 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix floating-point 'g'-format's choice between 'e' and 'f' formsEdward Welbourne2020-07-141-7/+41
| | | | | | | | | | | | | | During review of a refactor (coming shortly), Thiago wondered what the magic numbers were. On closer examination, I concluded that they were wrong and wrote some tests to prove it. This commit adds those tests; replaces the misguided old code with something that passes them; and documents the reasons for the various parts of its decisions. In the process, tidy up QLocaleData::doubleToString() somewhat and rename some of its variables to conform to Qt coding style. Change-Id: Ibee43659b1bdb0707639cdb444cfe941c31d409f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtConcurrent: Get rid of multi-inheritance inside RunFunctionTaskBaseJarek Kobus2020-07-141-9/+9
| | | | | | | | Use aggregation instead. Prepare for using QPromise instead of QFutureInterface. Task-number: QTBUG-84702 Change-Id: Ic88564dca8c83a178a281cb843032292210a6d25 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Change QWindow/QWidget::map(To/From)(Global/Parent) to operate in floatFriedemann Kleint2020-07-142-0/+10
| | | | | | | | | | | | | | | Change the functions to operate in float and add the QPoint versions as overload calling them. This is more in-line with the event accessors using float and allows for removing some workarounds using a delta when converting touch points. Leave QPlatformWindow::map(To/From)Global() as is for now and add helpers for float. Change-Id: I2d46b8dbda8adff26539e358074b55073dc80b6f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix passing QDBusUnixFileDescriptors over peer-to-peer connectionsSteffen Kieß2020-07-131-2/+3
| | | | | | | | | | | | | | | | | | | Passing QDBusUnixFileDescriptors over peer-to-peer connections currently does not work, because QDBusConnectionPrivate::setPeer() does not set this->capabilities (unlike QDBusConnectionPrivate::setConnection() which is executed for bus connections). Keep track of whether the connection already has been authenticated, and once the connection does get authenticated, update this->capabilities. Note that sending a message directly after connecting (before any message has been received from the peer) might still fail if the message contains a QDBusUnixFileDescriptor. Pick-to: 5.15 Fixes: QTBUG-85396 Change-Id: Ib83213ebcd3255fb091c6faefb3618745b8d736c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* rhi: Allow null resources in srbLaszlo Agocs2020-07-131-4/+195
| | | | | | | | | | In this case the srb represents the layout only, and can still be used to create a pipeline. For setShaderResources() one will then need to use another, layout compatible, srb that references valid resources. Change-Id: I3ea5b63df3be8847540ca4c0c40fbd29dbed8fb7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* tst_QCollator: avoid an unused variable warningEdward Welbourne2020-07-131-0/+2
| | | | | Change-Id: Ib173df3e9b92f06935aa4de5a1d423118877ad22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QRegExp and its remaining mentions out of QtCoreSona Kurazyan2020-07-1315-2453/+1
| | | | | | Task-number: QTBUG-85235 Change-Id: Ibd6c98d952c1bb9916b64715c6430fb0d3fe3843 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Check returns of hex2int in get_hex_rgbRobert Loehning2020-07-131-0/+3
| | | | | | | | | | Avoids undefined behavior when trying to shift negative values. Fixes: oss-fuzz-21860 Fixes: oss-fuzz-23968 Pick-to: 5.15 5.12 Change-Id: I879c97624e3f8ba9cf01e0a3a682379cd8c4a199 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QVariant::setValue(): enable move semanticsGiuseppe D'Angelo2020-07-132-5/+5
| | | | | | | | | | | | Given we optimize for the case where the new value is of the same type of the one already stored in the variant, enable move assignment for that case. As a drive-by, avoid a path to detach() for data() if we know we're detached. Change-Id: I9abbdc10637ce77ebb747b49d83e1ef914d997bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix buffer overflowRobert Loehning2020-07-102-0/+9
| | | | | | | Fixes: oss-fuzz-23988 Pick-to: 5.15 5.12 Change-Id: I4efdbfc3c0a96917c0c8224642896088ade99f35 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move all the QProperty related code into one compilation unitLars Knoll2020-07-101-1/+0
| | | | | | | | | | | | | And mark some methods as inline. Performance is critical for our new property system. Compiling it in one unit makes it possible for the compiler to do a much better job at inlining and generating optimized code. Improves performance of binding evaluations by another 20%. Change-Id: I5a2aa93c74d2b68418b0a9d2e34d8199bb71e3ad Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Significantly improve performance of binding evaluationLars Knoll2020-07-101-3/+6
| | | | | | | | | | | | | | Avoid any QVariant or type dependent code in the cpp files. Instead, let the binding wrapper determine if the value has changed and return true/false accordingly. This required also some reworking of the guard mechanism for notified properties, where the guard function wrapper now calls first the binding evaluation function and then passes the result to the guard. Change-Id: I350d07a508ccc0c5db7054a0efa4f270b6a78ec3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Separate the error case when evaluating bindingsLars Knoll2020-07-101-8/+6
| | | | | | | | | | | | | | | | | | | | | There's no point in returning a usually empty error when evaluating bindings, adding overhead to the regular code path. Instead, the error can be set on the currently evaluating binding if required. This streamlines the functor used to wrap the binding and should thus expand to less code and execute faster in the regular case. To achieve this, expose a pointer to the currently evaluating binding in the private API (as QtQml needs it to be able to report errors). The error case now requires one additional TLS lookup, but we don't really care about performance in that case anyway. Change-Id: Iecb450e765244930a41d813fcf8eb4013957a6a3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Cleanup QPropertyBindingErrorLars Knoll2020-07-101-2/+1
| | | | | | | | | | | | Remove location(). The method would always return an empty value. If you need the location, the binding itself has it. Remove setDescription() and require that the description gets passed in the constructor. Never create a d pointer if type is NoError, so we can quickly check for it inline. Change-Id: I7eb8a94786281069d6ea2d82567c09aa50c52ef6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Refactor pointer event hierarchyShawn Rutledge2020-07-108-505/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some goals that have hopefully been achieved are: - make QPointerEvent and QEventPoint resemble their Qt Quick counterparts to such an extent that we can remove those wrappers and go back to delivering the original events in Qt Quick - make QEventPoint much smaller than QTouchEvent::TouchPoint, with no pimpl - remove most public setters - reduce the usage of complex constructors that take many arguments - don't repeat ourselves: move accessors and storage upwards rather than having redundant ones in subclasses - standardize the set of accessors in QPointerEvent - maintain source compatibility as much as possible: do not require modifying event-handling code in any QWidget subclass To avoid public setters we now introduce a few QMutable* subclasses. This is a bit like the Builder pattern except that it doesn't involve constructing a separate disposable object: the main event type can be cast to the mutable type at any time to enable modifications, iff the code is linked with gui-private. Therefore event classes can have less-"complete" constructors, because internal Qt code can use setters the same way it could use the ones in QTouchEvent before; and the event classes don't need many friends. Even some read-accessors can be kept private unless we are sure we want to expose them. Task-number: QTBUG-46266 Fixes: QTBUG-72173 Change-Id: I740e4e40165b7bc41223d38b200bbc2b403e07b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>