summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Android: Skip focusProxy_QTBUG_51856() test case temporarilyTinja Paavoseppä2023-12-071-0/+3
| | | | | | | | | | | | | Running the test case leads to multiple calls to show the software keyboard, which due to Android QPA implementation leads to the keyboard being shown during subsequent test cases, leading to random failures. Skip it temporarily on Android until the Android QPA implementation is fixed. Task-number: QTBUG-119574 Change-Id: I29f234fe08cb33358cb5cb0f8e51b1cc0f8e8906 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* QtWidgets tests: port remaining users away from Q_FOREACHMarc Mutz2023-08-141-1/+2
| | | | | | | | | | | | | These are all trivial: all are over (already or newly-made) const local variables. As a drive-by, replace a QList legacy left-shift-based- with initializer_list-construction. Pick-to: 6.6 6.5 Task-number: QTBUG-115803 Change-Id: I453e24272c4c4b7dce5b91a0bd04481d833c50bb Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-031-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tests: skip tst_QGraphicsProxyWidget::bypassGraphicsProxyWidget() on WaylandLiang Qi2022-10-211-0/+3
| | | | | | | | | | | QWindow::requestActivate() is not supported. This function crashed very often in ci/coin when system is busy. Task-number: QTBUG-107153 Pick-to: 6.4 6.2 Change-Id: I82523080db40bddce9c9dc000433117d8ef74847 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* tests: skip tst_QGraphicsProxyWidget::scrollUpdate() on WaylandLiang Qi2022-10-211-0/+3
| | | | | | | | | | | QWindow::requestActivate() is not supported. This function failed in test vm in coin manually very often. Task-number: QTBUG-107153 Pick-to: 6.4 6.2 Change-Id: I013651b0e5e7618c29742effd85a091ca95a7414 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* tests: skip two tests in tst_QGraphicsProxyWidget on WaylandLiang Qi2022-10-071-0/+6
| | | | | | | | | QWindow::requestActivate() is not supported. Task-number: QTBUG-107153 Pick-to: 6.4 6.2 Change-Id: I41c0c24c73ea5add821109172470d37a9b6211a8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate QApplication::setActiveWindow() and mark as internalTor Arne Vestbø2022-08-271-22/+24
| | | | | | | | | | | | | | The function is used the internal window activation machinery and should not be called by user code. Many tests still use this function, and should be ported over to QWidget::activateWindow(). For now they are using the private helper in QApplicationPrivate, so that we can progress with the public API deprecation. Change-Id: I29f1575acf9efdcbae4c005ee9b2eb1bb0c8e5b5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QGraphicsProxyWidget: make tolerance in mapToGlobal test at least 4Volker Hilsheimer2022-07-151-1/+1
| | | | | | | | | | a61bf508e3c138c429e0a73498c745c3c0d3f0f7 reduced the tolerance from 4 to 3 in one case, making the test more rather than less flaky on systems with a device-pixel-ratio of 1. Pick-to: 6.4 6.3 6.2 Change-Id: I245443f0dcb1aa40176c127025501b63f12f161b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QGraphicsProxyWidget: make tolerance for errors depend on DPIVolker Hilsheimer2022-07-141-2/+3
| | | | | | | | | | The test already accepts an error margin for coordinate mapping. It is still flaky, so make that margin larger if the DPI of the widget >1. Pick-to: 6.4 6.3 6.2 Change-Id: I0a598e5e94ac82c551cbeb935e2fa08cad048f84 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Stabilize tst_QGraphicsProxyWidget::scrollUpdateVolker Hilsheimer2021-12-221-1/+1
| | | | | | | | | | | | | The test waits a bit hoping that all paint events are delivered after showing the widget so that we can count the rectangles that are getting updated when scrolling. Waiting for 20ms is too short unless the system is completely idle. Based on testing on a local VM, 150ms produces reliable results. Pick-to: 6.2 6.3 Change-Id: I7729e94eae41476be67291a2f664cff784f96c7d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Forward touchEvents to children inside QGraphicsProxyWidgetVolker Hilsheimer2021-09-061-68/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapplies the fix from 1ecf2212fae176b78c9951a37df9e33eb24d4f2d, using QApplication::translateRawTouchEvent to dispatch the touch event received by the QGraphicsProxyWidget to the relevant child widgets under each touch point. In addition, limit the implicit grabbing of each touch point before sending the event to those cases where we have to: touch pads, and if the target widget comes from a closest-widget matching. And don't call the QTouchEvent override of QEvent::setAccepted() on QTouchEvent instances in QGraphicsView classes, as this will override each event point's acceptance state. This way, we can identify which touch points have been accepted after event delivery, any only implicitly grab those points that were. Otherwise, touch points not accepted by a proxied widget hierarchy will still be part of an accepted event, and be grabbed by the viewport of the QGraphicsView. This would then lead to infinite recursion when the QGraphicsProxyWidget passes the TouchUpdate event on to each touch point's grabber. Re-activate the test case, and extend it with more combinations. Refactor touch-event recording to make it easier to test multi-touch scenarios. Task-number: QTBUG-45737 Fixes: QTBUG-67819 Pick-to: 6.2 Change-Id: Id5611f4feecb43b9367d9c2c71ad863b117efbcb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Revert "Forward touchEvents to children inside QGraphicsProxyWidget"Volker Hilsheimer2021-08-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 1ecf2212fae176b78c9951a37df9e33eb24d4f2d. The fix is not correct after all. TouchBegin goes to the correct widget with the fix, but following TouchUpdate and TouchEnd events now go to the viewport, as QApplication::translateRawTouchEvent always gives precedence to the widget that Qt recorded to be the touch grabber, which is the viewport. This results in infinite recursion, as the proxy widget trying to send the touch events to the embedded widget (expecting that translateRawTouchEvent will split it up) ends up sending the events back to the viewport. Leave the added test case as QEXPECT_FAIL, reactivate the (never run, hence unnoticed) test that the fix broke. Pick-to: 6.2 6.1 Task-number: QTBUG-45737 Task-number: QTBUG-67819 Change-Id: I4810affb3cd066743ae94ab7beb2f0c06b60d211 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Move QGraphicsProxyWidget test into correct test caseVolker Hilsheimer2021-08-301-0/+315
| | | | | | | | | | | | | | | The test case was previously disabled, so tests were added to the QGraphicsView test instead. With the QGraphicsProxyWidget test active again, move the test cases where they belong. Amends 1ecf2212fae176b78c9951a37df9e33eb24d4f2d, 01aeb5f7e4fd977e9698fffdc7650897664ecb82, and 06235d36ae9d00366215e748d80ff0faed3c2124 Pick-to: 6.2 Change-Id: I208b8a418653cf0640c2e7c9f716fa69538ad7e9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Reactivate QGraphics(Proxy)Widget unit testsVolker Hilsheimer2021-08-301-456/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | They were de-facto disabled in the qmake build system, and didn't make it into the cmake build system either. The dependency to the fusion style is not a build-time dependency since the test uses the QStyleFactory to create the style, and if that fails, tests can be skipped at runtime. As a consequence of not being executed in CI for a long time, many tests failed. Also, many tests were commented out or skipped as broken, ambivalent, or nonsensical. Remove that dead code. The QGraphicsWidget::initialShow test doesn't test anything that initialShow2 doesn't test, but makes incorrect assumptions, so remove it and rename initialShow2 to initialShow. Failing tests frequently left QWidget objects undeleted, causing all subsequent tests to fails as well. Fix that with std::unique_ptr. Some tests are still unstable and fail on some platforms, handle that using QEXPECT_FAIL. The forwardTouchEvent test fails due to a bug in Qt introduced recently. Skipping it for now. Pick-to: 6.2 Change-Id: I405122ea9d4d150bd1d505d40b83fe39604de0f9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-221-1/+1
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-071-6/+6
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Change QWidget::enterEvent signature to take a QEnterEventVolker Hilsheimer2020-09-051-1/+1
| | | | | | | | | | | | | | | | | | | This is a source incompatible change for widget implementors. Leaving the old enterEvent as a virtual overload is problematic due to shadowing. Best to make a clean cut, widget reimplementors will get a compile time warning if they mark their override as such, or if they try to call the parent class implementation. Addresses ### Qt 6 comment. [ChangeLog][QtWidgets][QWidget] The virtual enterEvent handler now receives a QEnterEvent, which contains information about mouse position and button states, rather than a plain QEvent. Change-Id: I233f594fd79c0c090983b3db8532913d00132fde Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in widgets testsJarek Kobus2020-06-251-5/+5
| | | | | | Task-number: QTBUG-84469 Change-Id: I490fdb237afad2d8a15954fe34d6b549a83fa4aa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce QInputDevice hierarchy; replace QTouchDeviceShawn Rutledge2020-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have seen during the Qt 5 series that QMouseEvent::source() does not provide enough information: if it is synthesized, it could have come from any device for which mouse events are synthesized, not only from a touchscreen. By providing in every QInputEvent as complete information about the actual source device as possible, we will enable very fine-tuned behavior in the object that handles each event. Further, we would like to support multiple keyboards, pointing devices, and named groups of devices that are known as "seats" in Wayland. In Qt 5, QPA plugins registered each touchscreen as it was discovered. Now we extend this pattern to all input devices. This new requirement can be implemented gradually; for now, if a QTWSI input event is received wtihout a device pointer, a default "core" device will be created on-the-fly, and a warning emitted. In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when multiple devices were in use simultaneously. Now that each event identifies the device it came from, this hack is no longer needed. A stub of the new QPointerEvent is added; it will be developed further in subsequent patches. [ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer to an instance of QInputDevice, or the subclass QPointingDevice in case of mouse, touch and tablet events. Each platform plugin is expected to create the device instances, register them, and provide valid pointers with all input events. If this is not done, warnings are emitted and default devices are created as necessary. When the device has accurate information, it provides the opportunity to fine-tune behavior depending on device type and capabilities: for example if a QMouseEvent is synthesized from a touchscreen, the recipient can see which touchscreen it came from. Each device also has a seatName to distinguish users on multi-user windowing systems. Touchpoint IDs are no longer unique on their own, but the combination of ID and device is. Fixes: QTBUG-46412 Fixes: QTBUG-72167 Task-number: QTBUG-69433 Task-number: QTBUG-52430 Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QGraphicsProxyWidget: fix handling of proxy focusGiuseppe D'Angelo2020-01-291-0/+70
| | | | | | | | | | | If a widget inside a QGPW has a proxy focus, the code would keep sending focus in events to the proxy even if the proxy was already focused. Amend the check in place to prevent this from happening. Change-Id: Id28d3bfe4f396da5c9477df713441ca7d506662f Fixes: QTBUG-51856 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove dead code from Qt 4 timesTor Arne Vestbø2019-08-201-3/+0
| | | | | | | | | | The benefit of keeping this code around was to inspire or inform changes in the areas to take into account possibly missing features in Qt 5, but at this point that benefit is questionable. We can always use the history to learn about missing pieces if needed. Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port users of get{Contents,Text}Margins() missed first time aroundMarc Mutz2019-08-011-6/+5
| | | | | | Done-with: Sona Kurazyan <sona.kurazyan@qt.io> Change-Id: I5b584cbe468429c53c2d661a0d7957d74e7ad691 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QPainter: mark obsolete RenderHints as deprecatedChristian Ehrlicher2019-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RenderHint::HighQualityAntialiasing and NonCosmeticDefaultPen are obsolete since Qt5 but not marked as such. Therefore add Q_DECL_ENUMERATOR_DEPRECATED_X now so those two enumerations can be removed with Qt6. [ChangeLog][QtGui][QPainter] HighQualityAntialiasing and NonCosmeticDefaultPen are marked as deprecated and don't have an effect anymore Change-Id: Ib0c966a078a1d23d492d0255288e2066c50e87b6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QGraphicsProxyWidget: Don't crash within setWidget() when a child proxy has ↵Christian Ehrlicher2018-11-221-0/+15
| | | | | | | | | | | | | | | no assigned widget QGraphicsProxyWidget::setWidget() is checking if the newly assigned widget is already assigned to a child proxy widget without checking if the child has a widget assigned at all which lead to a nullptr reference if it is not the case. Therefore check if the assigned widget is a valid pointer. Fixes: QTBUG-15442 Change-Id: I006877f99895ca01975bdcad071cfcf90bea22ad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* tests: port tst_QGraphicsProxyWidget to QTEST_QPA_MOUSE_HANDLINGGatis Paeglis2018-07-071-74/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and various other cleanups. This patch re-factors tests that relied on QCursor API (directly or indirectly via QTest::mouseMove widget overload) to use the QTEST_QPA_MOUSE_HANDLING code path. Misuse of QCursor API causes tests to be flaky. Removed Qt::X11BypassWindowManagerHint as it is not really needed. Based on the comment where this flag is used, it would be needed for all test functions that use mouse events. That assumption is not valid. A window is expected to have received its final position when QTest::qWaitForWindowActive() returns. There were issues with this on Unity, but those have been fixed. Un-QSKIP-ed QTBUG_6986_sendMouseEventToAlienWidget for Q_OS_WIN. Un-QSKIP-ed hoverEnterLeaveEvent for all platforms. Un-QSKIP-ed bypassGraphicsProxyWidget for Q_OS_MAC and Q_OS_WIN as the test passes on those platforms. According to QTBUG-33067 it used to crash with 5.2.0. Removed unnecessary mouseMove() and stray mouseRelease() in mouseDoubleClickEvent(). Removed unnecessary show()/setVisible() on items that are being added to the scene - items are visible by default. Among other randomly spotted issues, one worth mentioning is that when adding items to the scene after the view is already shown, we need to ensure that the scene is updated (e.g QSignalSpy + QGraphicsScene::changed) before interacting with it. As an example, mousePressReleaseEvent() only passed because of random luck that the invalid coordinates were still within the bounding rect of the button. This patch does not attempt to cleanup all instances of this anti-pattern. Task-number: QTBUG-52546 Task-number: QTBUG-26948 Task-number: QTBUG-33067 Change-Id: I2ccbc004c1cb4f5b31c70c8568ee591c458d8446 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* Stabilize tst_QGraphicsProxyWidget::tooltip_basic()Friedemann Kleint2018-03-291-13/+18
| | | | | | | | | | Use QTRY_VERIFY instead of hard-coded wait for the tooltip to appear. Also use QTRY_VERIFY to verify that no top level widgets are left over to account for tooltips and effect windows. Change-Id: Ia9835fdc480c6abb034f6fc4ad3d6b32751ee536 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* Port away from QRegion::rects()Marc Mutz2017-12-071-2/+11
| | | | | | | | | Use being()/end() instead. These were the last remaining uses of QRegion::rects() within qtbase. Change-Id: I264beb6f660968f40eecbbee2260341fca94ddb5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove references to obsolete platformsJake Petroules2017-11-051-3/+0
| | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Ensure result of all QTest::qWaitFor are verifiedTor Arne Vestbø2017-10-051-1/+1
| | | | | | | | | The qWaitFor functions themselves can not trigger a test failure, as that will not result in the test function exiting early, so every single call to qWaitFor needs to be wrapped in a QVERIFY. Change-Id: Id15a1549f31d06cdbf788e1d84ea431c28636ec8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Convert features.wheelevent to QT_CONFIGStephan Binner2017-06-281-5/+5
| | | | | Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* tests/auto/widgets: use QCOMPARE(., nullptr)Marc Mutz2016-11-301-2/+2
| | | | | | | | | | | | .. instead of manually casted 0s. QCOMPARE(., nullptr) was added for Qt 5.8. Make use of the new API. In tst_qwidget.cpp, as a drive-by, change qApp->focusWidget() -> QApplication::focusWidget() Change-Id: I1331b8916b026d48e01534d1ed0b3d72f3f3d50c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Change confusing Q_DEAD_CODE_FROM_QT4_FOO defineTor Arne Vestbø2016-10-141-1/+1
| | | | | | | | | | | | | | | | | | | Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code that the code in question was a left-over from Qt4, when we used Q_WS_ defines instead of Q_OS_ defines. This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually unconditionally included. To make this even clearer, the defines have been replaced by checks for 1 or 0, with a comment describing how the code used to look in Qt4. The use of constants in the check also makes it easier for editors to parse the condition and show visually that the code is defined out. Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-291-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cf53aa21bf0f8fbd13c0ce2d33ddf7bc63d0d76a and 3aaa5d6b32130d3eeac872a59a5a44bfb20dfd4a were reverted because of reconstruction in 5.7. defineTest(qtConfTest_checkCompiler) in configure.pri is smart enough to cover the case in a9474d1260a8c8cc9eae14f2984098919d9684e5. DirectWrite: Fix advances being scaled to 0 Since 131eee5cd, the stretch of a font can be 0, meaning "whatever the font provides". In combination with ec7fee96, this would cause advances in the DirectWrite engine to be scaled to 0, causing the QRawFont test to fail. Conflicts: configure mkspecs/features/uikit/device_destinations.sh mkspecs/features/uikit/xcodebuild.mk src/corelib/global/qglobal.cpp src/corelib/global/qnamespace.qdoc src/plugins/platforms/cocoa/qcocoamenuitem.h src/plugins/platforms/windows/qwindowsservices.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp src/widgets/kernel/qapplication.cpp tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
| * Auto tests: use Qt::AA_DontUseNativeDialogs where appropriateJ-P Nurmi2016-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | These auto tests were trying to not create native dialogs, but setting the QFileDialog::DontUseNativeDialog option is too late to control the creation of the platform helper. It is already created at construction time, unless Qt::AA_DontUseNativeDialogs is set. Task-number: QTBUG-55276 Task-number: QTBUG-55281 Change-Id: Icf474e97059ac03a5fa01bd3a17f07203da5770a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-101-1/+2
| |\ | | | | | | | | | Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
| | * Fix memory leak in tst_qgraphicsproxywidgetJędrzej Nowacki2016-08-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | QStyle was created but never removed Change-Id: I55011377afd475af28e4ce2cf657e435dd37c96a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | autotests: use QTest::createTouchDevice()Shawn Rutledge2016-06-101-3/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-44030 Change-Id: I514c1294a0ff6587b825982a8bb354104c214120 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-231-8/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/wince80colibri-armv7-msvc2012/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/tools/tools.pri src/network/ssl/qsslconfiguration_p.h src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/plugins/platforms/windows/windows.pri src/src.pro src/tools/bootstrap/bootstrap.pro src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/dialogs/qfilesystemmodel.cpp tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-8/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| | * QWidget::mapTo/FromGlobal(): Rewrite using a QTransform.Friedemann Kleint2016-05-141-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a function going up the widget hierarchy determining a QTransform for mapping the coordinates applying the transformations of any QGraphicsView instances found. In mapFromGlobal(), use the inverse of it. This fixes the case of widget hierarchies embedded into QGraphicsView with transformations. Increase fuzz in the tests due to float rounding errors. Task-number: QTBUG-41135 Task-number: QTBUG-50030 Task-number: QTBUG-50136 Task-number: QTBUG-52507 Change-Id: I507e0bccd546250fe9c2d1b74ef38657d61490b4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Remove tests/auto/qtest-config.h.Friedemann Kleint2016-04-121-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The header defined a macro QTEST_NO_CURSOR depending QT_NO_CURSOR or obsolete platforms Windows CE and Meego. Replace usages by QT_NO_CURSOR in the tests. Change-Id: I3edac88e684d1f932dd3b721bb1c1b3fe9144237 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | QtWidgets: Remove Windows CE.Friedemann Kleint2016-04-071-4/+1
|/ / | | | | | | | | | | | | | | | | Remove Windows CE-specific files, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: I102745aaca9d9737f2108fe7618111743d5ae980 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Check that window has been paintedMilla Pohjanheimo2016-03-311-1/+1
| | | | | | | | | | | | | | | | | | The test is preventing us to take RHEL 7.1 in the CI for Qt 5.7. Changed the paintEvent() test to be less strict about the paintCount. Task-number: QTBUG-51809 Change-Id: I84f797442e38c66dc23862e92eda6db08bcac368 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2016-01-261-1/+7
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-1/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| | * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-191-1/+7
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/common/atomic64/atomic64.cpp configure src/3rdparty/forkfd/forkfd.c src/corelib/io/forkfd_qt.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tools/configure/configureapp.cpp Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414