From 4fe9374589aa36129c8275c2c207bd09b7df0ba5 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 20 May 2022 11:44:36 +0200 Subject: Fix crash in tst_qquicktext::implicitSize This reverts commit 1e938c348b936328fafbcaae4c0c7d91003143e5 and bb2f4d08d9d138e4f70d6d6db46e24e34500becc. bb2f4d08d9d causes the crash, but 1e938c348b93 amends it, so this reverts both. When the cause of the crash has been determined and mitigated, the patches can be recreated. Fixes: QTBUG-103719 Change-Id: Ifc36b3771a96f6c85387a5306a0402d4c508d006 Reviewed-by: David Faure --- tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/auto/widgets') diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp index 72d2cc7aa7..bc533df48a 100644 --- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp @@ -1194,9 +1194,8 @@ void tst_QTextEdit::undoRedoShouldRepositionTextEditCursor() void tst_QTextEdit::lineWrapModes() { ed->setLineWrapMode(QTextEdit::NoWrap); - // NoWrap at the same time as having all lines that are all left aligned means we optimize to - // only layout once. The effect is that the width is always -1 - QCOMPARE(ed->document()->pageSize().width(), qreal(-1)); + // NoWrap at the same time as having all lines that are all left aligned means we optimize to only layout once. The effect is that the width is always 0 + QCOMPARE(ed->document()->pageSize().width(), qreal(0)); QTextCursor cursor = QTextCursor(ed->document()); cursor.insertText(QString("A simple line")); -- cgit v1.2.3