summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtextedit
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-11-05 16:35:28 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-05 16:35:28 (GMT)
commit58bac5551cbeed83a99e257226bb7b40d363bab9 (patch)
tree4c4f47fc20f53a29e4d5dcfa3e59b8e7d523dee3 /tests/auto/qtextedit
parentebecf192abe56c405409343acc2f97eaf9124fc3 (diff)
parent60b09b8915e2095b221eb0a16a76d49e5bb10391 (diff)
downloadQt-58bac5551cbeed83a99e257226bb7b40d363bab9.zip
Qt-58bac5551cbeed83a99e257226bb7b40d363bab9.tar.gz
Qt-58bac5551cbeed83a99e257226bb7b40d363bab9.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: mkspecs/features/symbian/symbian_building.prf src/network/access/qhttpnetworkconnectionchannel.cpp
Diffstat (limited to 'tests/auto/qtextedit')
-rw-r--r--tests/auto/qtextedit/tst_qtextedit.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qtextedit/tst_qtextedit.cpp b/tests/auto/qtextedit/tst_qtextedit.cpp
index 101baa5..321aa22 100644
--- a/tests/auto/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/qtextedit/tst_qtextedit.cpp
@@ -58,6 +58,7 @@
#include <qimagereader.h>
#include <qimagewriter.h>
#include <qcommonstyle.h>
+#include <qlayout.h>
#include <qabstracttextdocumentlayout.h>
#include <qtextdocumentfragment.h>
@@ -2111,6 +2112,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,6 +2157,9 @@ void tst_QTextEdit::pasteFromQt3RichText()
void tst_QTextEdit::noWrapBackgrounds()
{
+ QWidget topLevel;
+ QVBoxLayout *layout = new QVBoxLayout(&topLevel);
+
QTextEdit edit;
edit.setLineWrapMode(QTextEdit::NoWrap);
@@ -2170,6 +2175,11 @@ void tst_QTextEdit::noWrapBackgrounds()
edit.insertPlainText(QLatin1String(" \n \n \n \n"));
edit.setFixedSize(100, 200);
+ layout->addWidget(&edit);
+ topLevel.show();
+
+ QTest::qWait(1000);
+
QImage img = QPixmap::grabWidget(edit.viewport()).toImage();
QCOMPARE(img, img.mirrored(true, false));
}