summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp')
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index b8684610a8..fd74a7b3b9 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -5,7 +5,6 @@
#include <QGraphicsItem>
#include <QGraphicsScene>
#include <QGraphicsView>
-#include <QTextDocument>
class tst_QGraphicsItem : public QObject
{
@@ -34,8 +33,6 @@ private slots:
void shear();
void translate();
void createTextItem();
- void createTextItemZeroWidth();
- void createTextItemNoLayouting();
};
tst_QGraphicsItem::tst_QGraphicsItem()
@@ -219,39 +216,5 @@ void tst_QGraphicsItem::createTextItem()
}
}
-void tst_QGraphicsItem::createTextItemZeroWidth()
-{
- // Ensure QFontDatabase loaded the font beforehand
- QFontInfo(qApp->font()).family();
- const QString text = "This is some text";
- QBENCHMARK {
- QGraphicsTextItem item;
- item.document()->setTextWidth(0);
- // Prepare everything
- item.setPlainText(text);
- QTextOption option = item.document()->defaultTextOption();
- option.setAlignment(Qt::AlignHCenter);
- item.document()->setDefaultTextOption(option);
- // And (in a real app) set actual text width here
- }
-}
-
-void tst_QGraphicsItem::createTextItemNoLayouting()
-{
- // Ensure QFontDatabase loaded the font beforehand
- QFontInfo(qApp->font()).family();
- const QString text = "This is some text";
- QBENCHMARK {
- QGraphicsTextItem item;
- item.document()->setLayoutEnabled(false);
- // Prepare everything
- item.setPlainText(text);
- QTextOption option = item.document()->defaultTextOption();
- option.setAlignment(Qt::AlignHCenter);
- item.document()->setDefaultTextOption(option);
- // And (in a real app) enable layouting here
- }
-}
-
QTEST_MAIN(tst_QGraphicsItem)
#include "tst_qgraphicsitem.moc"