diff options
author | Dominik Holland <dominik.holland@nokia.com> | 2010-07-22 14:43:17 (GMT) |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2010-11-02 14:24:08 (GMT) |
commit | 978c1c612aacde31cc294f5ba2ad1af6feeae61c (patch) | |
tree | 93c078e14891eb55940291588e4a64c69d258ba1 /tests/auto/qtextedit/tst_qtextedit.cpp | |
parent | affe4a42dea9c72bf220e7e57d427a79b6fd099f (diff) | |
download | Qt-978c1c612aacde31cc294f5ba2ad1af6feeae61c.zip Qt-978c1c612aacde31cc294f5ba2ad1af6feeae61c.tar.gz Qt-978c1c612aacde31cc294f5ba2ad1af6feeae61c.tar.bz2 |
Fixed QTextEdit autotest, to use top level dummy widgets
Diffstat (limited to 'tests/auto/qtextedit/tst_qtextedit.cpp')
-rw-r--r-- | tests/auto/qtextedit/tst_qtextedit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qtextedit/tst_qtextedit.cpp b/tests/auto/qtextedit/tst_qtextedit.cpp index 101baa5..878579b 100644 --- a/tests/auto/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/qtextedit/tst_qtextedit.cpp @@ -2111,6 +2111,7 @@ void tst_QTextEdit::setDocumentPreservesPalette() QPalette whitePal = ed->palette(); whitePal.setColor(QPalette::Active, QPalette::Text, "white"); + QVERIFY(whitePal != ed->palette()); ed->setPalette(whitePal); QVERIFY(whitePal.color(QPalette::Active, QPalette::Text) @@ -2155,7 +2156,8 @@ void tst_QTextEdit::pasteFromQt3RichText() void tst_QTextEdit::noWrapBackgrounds() { - QTextEdit edit; + QWidget topLevel; + QTextEdit edit(&topLevel); edit.setLineWrapMode(QTextEdit::NoWrap); QTextFrame *root = edit.document()->rootFrame(); @@ -2169,6 +2171,7 @@ void tst_QTextEdit::noWrapBackgrounds() edit.textCursor().setBlockFormat(format); edit.insertPlainText(QLatin1String(" \n \n \n \n")); edit.setFixedSize(100, 200); + topLevel.show(); QImage img = QPixmap::grabWidget(edit.viewport()).toImage(); QCOMPARE(img, img.mirrored(true, false)); |