summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2022-09-23 10:31:32 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2022-09-23 20:08:56 +0200
commitce4c26c8d16fbc9fdafd8325b8a0b32bacd8cd93 (patch)
tree167f059436514772d8aa1f3cef389cdfb4b9837a /tests/auto/gui/text
parent9516823fce1d6f9bb7446fba8192396453af1557 (diff)
Revert "QTextLayout: fix maximumWidth() for a text containing line separator"
This reverts commit 013c346a8dcbd618febb07884c64c740daf9754d. It was determined to cause a regression in Qt Quick: QTBUG-106899. In order to unblock integrations, we need to revert the change. It can be re-committed later when the problem has been analyzed and addressed. Pick-to: 6.2 6.4 Fixes: QTBUG-106899 Task-number: QTBUG-89557 Task-number: QTBUG-104986 Change-Id: I04054587f68ab39fdb038b02fc69ebfa3dc7d197 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/gui/text')
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
index 25906ebf32..def7c88593 100644
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
@@ -125,7 +125,6 @@ private slots:
void softHyphens_data();
void softHyphens();
void min_maximumWidth();
- void min_maximumWidthWithLineSeparator();
private:
QFont testFont;
@@ -2684,32 +2683,5 @@ void tst_QTextLayout::min_maximumWidth()
}
}
-void tst_QTextLayout::min_maximumWidthWithLineSeparator()
-{
- QTextLayout referenceLayout("text", testFont);
-
- QString multilineText("text\ntext\ntext");
- multilineText.replace('\n', QChar::LineSeparator);
- QTextLayout layout(multilineText, testFont);
-
- for (int wrapMode = QTextOption::NoWrap; wrapMode <= QTextOption::WrapAtWordBoundaryOrAnywhere; ++wrapMode) {
- QTextOption opt;
- opt.setWrapMode((QTextOption::WrapMode)wrapMode);
-
- referenceLayout.setTextOption(opt);
- referenceLayout.beginLayout();
- while (referenceLayout.createLine().isValid()) { }
- referenceLayout.endLayout();
-
- layout.setTextOption(opt);
- layout.beginLayout();
- while (layout.createLine().isValid()) { }
- layout.endLayout();
-
- QCOMPARE(layout.minimumWidth(), referenceLayout.minimumWidth());
- QCOMPARE(layout.maximumWidth(), referenceLayout.maximumWidth());
- }
-}
-
QTEST_MAIN(tst_QTextLayout)
#include "tst_qtextlayout.moc"