From 4dae8c1aff6a4d83fdabe366c6711df7ff867887 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Mon, 23 Jan 2012 16:34:33 +1000 Subject: Remove QTextControl and QLineControl. QtWidgets and QtDeclarative now both have their own versions of these so there's no need to keep them around any longer. Change-Id: I9c2201c8495a0a0816e2af16c8f647fcad991479 Reviewed-by: Lars Knoll --- tests/benchmarks/gui/text/qtext/main.cpp | 63 -------------------------------- 1 file changed, 63 deletions(-) (limited to 'tests/benchmarks/gui') diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp index 0cbb38aed3..a5e27cff0f 100644 --- a/tests/benchmarks/gui/text/qtext/main.cpp +++ b/tests/benchmarks/gui/text/qtext/main.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -73,7 +72,6 @@ private slots: void odfWriting_text(); void odfWriting_images(); - void constructControl(); void constructDocument(); void newLineReplacement(); @@ -90,10 +88,6 @@ private slots: void paintDocToPixmap(); void paintDocToPixmap_painterFill(); - void control(); - void paintControlToPixmap(); - void paintControlToPixmap_painterFill(); - private: QSize setupTextLayout(QTextLayout *layout, bool wrap = true, int wrapWidth = 100); @@ -255,17 +249,6 @@ QSize tst_QText::setupTextLayout(QTextLayout *layout, bool wrap, int wrapWidth) return QSize(qCeil(widthUsed), height); } -void tst_QText::constructControl() -{ - QTextControl *control = new QTextControl; - delete control; - - QBENCHMARK { - QTextControl *control = new QTextControl; - delete control; - } -} - void tst_QText::constructDocument() { QTextDocument *doc = new QTextDocument; @@ -441,52 +424,6 @@ void tst_QText::paintDocToPixmap_painterFill() } } -void tst_QText::control() -{ - QTextControl *control = new QTextControl(m_shortLorem); - Q_UNUSED(control); - - QBENCHMARK { - QTextControl *control = new QTextControl; - QTextDocument *doc = control->document(); - doc->setHtml(m_shortLorem); - } -} - -void tst_QText::paintControlToPixmap() -{ - QTextControl *control = new QTextControl; - QTextDocument *doc = control->document(); - doc->setHtml(m_shortLorem); - doc->setTextWidth(300); - QSize size = doc->size().toSize(); - - QBENCHMARK { - QPixmap img(size); - img.fill(Qt::transparent); - QPainter p(&img); - control->drawContents(&p, QRectF(QPointF(0, 0), QSizeF(size))); - } -} - -void tst_QText::paintControlToPixmap_painterFill() -{ - QTextControl *control = new QTextControl; - QTextDocument *doc = control->document(); - doc->setHtml(m_shortLorem); - doc->setTextWidth(300); - QSize size = doc->size().toSize(); - - QBENCHMARK { - QPixmap img(size); - QPainter p(&img); - p.setCompositionMode(QPainter::CompositionMode_Source); - p.fillRect(0, 0, img.width(), img.height(), Qt::transparent); - p.setCompositionMode(QPainter::CompositionMode_SourceOver); - control->drawContents(&p, QRectF(QPointF(0, 0), QSizeF(size))); - } -} - QTEST_MAIN(tst_QText) #include "main.moc" -- cgit v1.2.3