diff options
Diffstat (limited to 'tests/benchmarks/gui/text')
-rw-r--r-- | tests/benchmarks/gui/text/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/benchmarks/gui/text/qfontmetrics/main.cpp | 29 | ||||
-rw-r--r-- | tests/benchmarks/gui/text/qtext/CMakeLists.txt | 9 | ||||
-rw-r--r-- | tests/benchmarks/gui/text/qtext/main.cpp | 43 | ||||
-rw-r--r-- | tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/benchmarks/gui/text/qtextdocument/main.cpp | 29 |
7 files changed, 28 insertions, 101 deletions
diff --git a/tests/benchmarks/gui/text/CMakeLists.txt b/tests/benchmarks/gui/text/CMakeLists.txt index 630f01091d..052d49e03c 100644 --- a/tests/benchmarks/gui/text/CMakeLists.txt +++ b/tests/benchmarks/gui/text/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from text.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause add_subdirectory(qfontmetrics) add_subdirectory(qtext) diff --git a/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt b/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt index b580a6fd3d..4b9ae1e4c8 100644 --- a/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt +++ b/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from qfontmetrics.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_bench_QFontMetrics Binary: @@ -7,10 +8,7 @@ qt_internal_add_benchmark(tst_bench_QFontMetrics SOURCES main.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Test ) - -#### Keys ignored in scope 1:.:.:qfontmetrics.pro:<TRUE>: -# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/text/qfontmetrics/main.cpp b/tests/benchmarks/gui/text/qfontmetrics/main.cpp index 86c7cebfd4..8aafa809f8 100644 --- a/tests/benchmarks/gui/text/qfontmetrics/main.cpp +++ b/tests/benchmarks/gui/text/qfontmetrics/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> #include <QFont> diff --git a/tests/benchmarks/gui/text/qtext/CMakeLists.txt b/tests/benchmarks/gui/text/qtext/CMakeLists.txt index 5b154a431b..13cd6a2c3a 100644 --- a/tests/benchmarks/gui/text/qtext/CMakeLists.txt +++ b/tests/benchmarks/gui/text/qtext/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from qtext.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_bench_QText Binary: @@ -7,12 +8,8 @@ qt_internal_add_benchmark(tst_bench_QText SOURCES main.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::GuiPrivate Qt::Test ) - -#### Keys ignored in scope 1:.:.:qtext.pro:<TRUE>: -# TEMPLATE = "app" -# TESTDATA = "bidi.txt" diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp index ef88f64d8f..9a2740253c 100644 --- a/tests/benchmarks/gui/text/qtext/main.cpp +++ b/tests/benchmarks/gui/text/qtext/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QDebug> #include <QTextDocument> @@ -50,7 +25,9 @@ public: private slots: void loadHtml_data(); +#ifndef QT_NO_TEXTHTMLPARSER void loadHtml(); +#endif void shaping_data(); void shaping(); @@ -72,9 +49,11 @@ private slots: void paintLayoutToPixmap(); void paintLayoutToPixmap_painterFill(); +#ifndef QT_NO_TEXTHTMLPARSER void document(); void paintDocToPixmap(); void paintDocToPixmap_painterFill(); +#endif private: QSize setupTextLayout(QTextLayout *layout, bool wrap = true, int wrapWidth = 100); @@ -101,6 +80,7 @@ void tst_QText::loadHtml_data() + parag; } +#ifndef QT_NO_TEXTHTMLPARSER void tst_QText::loadHtml() { QFETCH(QString, source); @@ -109,6 +89,7 @@ void tst_QText::loadHtml() doc.setHtml(source); } } +#endif void tst_QText::shaping_data() { @@ -122,10 +103,10 @@ void tst_QText::shaping_data() QFile file(testFile); QVERIFY(file.open(QFile::ReadOnly)); QByteArray data = file.readAll(); - QVERIFY(data.count() > 1000); + QVERIFY(data.size() > 1000); QStringList list = QString::fromUtf8(data.data()).split(QLatin1Char('\n'), Qt::SkipEmptyParts); - QVERIFY(list.count() %2 == 0); // even amount as we have title and then content. - for (int i=0; i < list.count(); i+=2) { + QVERIFY(list.size() % 2 == 0); // even amount as we have title and then content. + for (int i = 0; i < list.size(); i += 2) { QTest::newRow(list.at(i).toLatin1()) << list.at(i+1); } } @@ -396,6 +377,7 @@ void tst_QText::paintLayoutToPixmap_painterFill() } } +#ifndef QT_NO_TEXTHTMLPARSER void tst_QText::document() { QTextDocument *doc = new QTextDocument; @@ -438,6 +420,7 @@ void tst_QText::paintDocToPixmap_painterFill() doc->drawContents(&p); } } +#endif QTEST_MAIN(tst_QText) diff --git a/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt b/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt index 9a9017c8e0..2a95411335 100644 --- a/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt +++ b/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from qtextdocument.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_bench_QTextDocument Binary: @@ -7,11 +8,8 @@ qt_internal_add_benchmark(tst_bench_QTextDocument SOURCES main.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::GuiPrivate Qt::Test ) - -#### Keys ignored in scope 1:.:.:qtextdocument.pro:<TRUE>: -# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/text/qtextdocument/main.cpp b/tests/benchmarks/gui/text/qtextdocument/main.cpp index 17fee3b2eb..7bdff95235 100644 --- a/tests/benchmarks/gui/text/qtextdocument/main.cpp +++ b/tests/benchmarks/gui/text/qtextdocument/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QDebug> #include <QTextDocument> |