summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2009-06-15 08:34:07 (GMT)
committermae <qt-info@nokia.com>2009-06-15 08:48:56 (GMT)
commitf34c2c3b1198afac23f9894a56c5ab2fae798f59 (patch)
tree6f78beb37879e1112ac653ad0f99f4232955028c
parent87598d2d8703fc18f89e11748d94ad4715e61f7c (diff)
downloadQt-f34c2c3b1198afac23f9894a56c5ab2fae798f59.zip
Qt-f34c2c3b1198afac23f9894a56c5ab2fae798f59.tar.gz
Qt-f34c2c3b1198afac23f9894a56c5ab2fae798f59.tar.bz2
Fix QPlainTextEdit auto test
Width 0 was used as magic value to optimize the widget's startup and initial resize. We now use the illegal value -1 as magic value insetad.
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index af11aa7..ca7dffd 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -761,7 +761,7 @@ void QPlainTextEditPrivate::init(const QString &txt)
// set a null page size initially to avoid any relayouting until the textedit
// is shown. relayoutDocument() will take care of setting the page size to the
// viewport dimensions later.
- doc->setTextWidth(0);
+ doc->setTextWidth(-1);
doc->documentLayout()->setPaintDevice(viewport);
doc->setDefaultFont(q->font());