diff options
Diffstat (limited to 'tests/benchmarks/widgets/graphicsview/qgraphicsitem')
-rw-r--r-- | tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp | 20 |
2 files changed, 4 insertions, 24 deletions
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt index e5d19ceb24..0ab35585fb 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from qgraphicsitem.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_bench_qgraphicsitem Binary: @@ -7,11 +8,8 @@ qt_internal_add_benchmark(tst_bench_qgraphicsitem SOURCES tst_qgraphicsitem.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Test Qt::Widgets ) - -#### Keys ignored in scope 1:.:.:qgraphicsitem.pro:<TRUE>: -# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index b8684610a8..7556864ded 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qtest.h> #include <QGraphicsItem> @@ -34,7 +34,6 @@ private slots: void shear(); void translate(); void createTextItem(); - void createTextItemZeroWidth(); void createTextItemNoLayouting(); }; @@ -219,23 +218,6 @@ 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 |