diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2021-06-25 11:38:37 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-12 11:03:56 +0000 |
commit | fb1d80b3210d7ebedc6865b57d61f2260e87b2f0 (patch) | |
tree | 0fe1781922867bee45d133081e79bc63eec3d640 /tests | |
parent | 4576e34c255ae8a435ae06d5b0cc7b35edd05c44 (diff) |
Revert "ToolTip: use contentWidth of Text contentItem to account for newlines"
This reverts commit a063cd0be5e8f108a0084831856f4af8c0e9159c.
It causes QTBUG-94764.
Task-number: QTBUG-83630
Task-number: QTBUG-94764
Change-Id: Ib27d827e25d4e4cea805d0f8e3c32b8aa843ec6a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 009a0262bc0436d4822a3438fc99e02ed15dfc69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/quickcontrols2/controls/data/tst_tooltip.qml | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/auto/quickcontrols2/controls/data/tst_tooltip.qml b/tests/auto/quickcontrols2/controls/data/tst_tooltip.qml index 2f98a5f3d2..b4e992a46a 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_tooltip.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_tooltip.qml @@ -75,11 +75,6 @@ TestCase { SignalSpy { } } - Component { - id: itemComponent - Item {} - } - QtObject { id: object } @@ -451,19 +446,6 @@ TestCase { verify(item.ToolTip.toolTip.contentItem.width < item.ToolTip.toolTip.contentItem.implicitWidth) } - // QTBUG-83630: Test that newlines are accounted for in the implicit contentWidth. - function test_newLines() { - var item = createTemporaryObject(itemComponent, testCase) - verify(item) - - item.ToolTip.show("This is one line of text\nThis is another line of text") - - // The implicitWidth of the Text item for the text above will be larger than - // its contentWidth. ToolTip's implicitWidth uses contentWidth in its calculation, - // so we check that it's less than the Text's implicitWidth. - verify(item.ToolTip.toolTip.implicitWidth < item.ToolTip.toolTip.contentItem.implicitWidth) - } - function test_timeoutAfterOpened() { let control = createTemporaryObject(toolTipWithExitTransition, testCase, { timeout: 1, exit: null }) verify(control) |