summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/gui')
-rw-r--r--tests/benchmarks/gui/CMakeLists.txt2
-rw-r--r--tests/benchmarks/gui/animation/CMakeLists.txt2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/CMakeLists.txt2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyanimation.h2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyobject.cpp2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyobject.h2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/main.cpp2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/rectanimation.cpp2
-rw-r--r--tests/benchmarks/gui/animation/qanimation/rectanimation.h2
-rw-r--r--tests/benchmarks/gui/image/CMakeLists.txt2
-rw-r--r--tests/benchmarks/gui/image/blendbench/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/image/blendbench/main.cpp2
-rw-r--r--tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt6
-rw-r--r--tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp2
-rw-r--r--tests/benchmarks/gui/image/qimagereader/CMakeLists.txt10
-rw-r--r--tests/benchmarks/gui/image/qimagereader/tst_bench_qimagereader.cpp (renamed from tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp)64
-rw-r--r--tests/benchmarks/gui/image/qimagescale/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/image/qimagescale/tst_qimagescale.cpp2
-rw-r--r--tests/benchmarks/gui/image/qpixmap/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp2
-rw-r--r--tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp2
-rw-r--r--tests/benchmarks/gui/kernel/CMakeLists.txt2
-rw-r--r--tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp2
-rw-r--r--tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp2
-rw-r--r--tests/benchmarks/gui/math3d/CMakeLists.txt2
-rw-r--r--tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp2
-rw-r--r--tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp2
-rw-r--r--tests/benchmarks/gui/painting/CMakeLists.txt2
-rw-r--r--tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/painting/drawtexture/tst_drawtexture.cpp2
-rw-r--r--tests/benchmarks/gui/painting/lancebench/CMakeLists.txt7
-rw-r--r--tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp2
-rw-r--r--tests/benchmarks/gui/painting/qcolor/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/painting/qcolor/tst_qcolor.cpp2
-rw-r--r--tests/benchmarks/gui/painting/qpainter/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp57
-rw-r--r--tests/benchmarks/gui/painting/qregion/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/painting/qregion/main.cpp2
-rw-r--r--tests/benchmarks/gui/painting/qtbench/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/painting/qtbench/benchmarktests.h2
-rw-r--r--tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp9
-rw-r--r--tests/benchmarks/gui/painting/qtransform/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp2
-rw-r--r--tests/benchmarks/gui/text/CMakeLists.txt2
-rw-r--r--tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/text/qfontmetrics/main.cpp2
-rw-r--r--tests/benchmarks/gui/text/qtext/CMakeLists.txt6
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp10
-rw-r--r--tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/text/qtextdocument/main.cpp2
56 files changed, 138 insertions, 175 deletions
diff --git a/tests/benchmarks/gui/CMakeLists.txt b/tests/benchmarks/gui/CMakeLists.txt
index 803704241f..c8c805a2a7 100644
--- a/tests/benchmarks/gui/CMakeLists.txt
+++ b/tests/benchmarks/gui/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from gui.pro.
-
add_subdirectory(animation)
add_subdirectory(image)
add_subdirectory(kernel)
diff --git a/tests/benchmarks/gui/animation/CMakeLists.txt b/tests/benchmarks/gui/animation/CMakeLists.txt
index d966035556..7a014c2a7a 100644
--- a/tests/benchmarks/gui/animation/CMakeLists.txt
+++ b/tests/benchmarks/gui/animation/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from animation.pro.
-
if(TARGET Qt::Widgets)
add_subdirectory(qanimation)
endif()
diff --git a/tests/benchmarks/gui/animation/qanimation/CMakeLists.txt b/tests/benchmarks/gui/animation/qanimation/CMakeLists.txt
index 146679f463..0193551ee1 100644
--- a/tests/benchmarks/gui/animation/qanimation/CMakeLists.txt
+++ b/tests/benchmarks/gui/animation/qanimation/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qanimation.pro.
-
#####################################################################
## tst_bench_qanimation Binary:
#####################################################################
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp b/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp
index a36e3d9300..a877cca838 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/dummyanimation.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 "dummyanimation.h"
#include "dummyobject.h"
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyanimation.h b/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
index 331d66e151..5ac0e6431b 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
+++ b/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
@@ -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 <QtGui>
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp b/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp
index e8156e3c6b..a69c73a90b 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/dummyobject.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 "dummyobject.h"
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyobject.h b/tests/benchmarks/gui/animation/qanimation/dummyobject.h
index e860219d50..3bae6407ba 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyobject.h
+++ b/tests/benchmarks/gui/animation/qanimation/dummyobject.h
@@ -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 <QtGui>
diff --git a/tests/benchmarks/gui/animation/qanimation/main.cpp b/tests/benchmarks/gui/animation/qanimation/main.cpp
index d91fa2e358..26c188bb4a 100644
--- a/tests/benchmarks/gui/animation/qanimation/main.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/main.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 <QtWidgets>
#include <qtest.h>
diff --git a/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp b/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp
index 72ca25932b..ec2fc340cf 100644
--- a/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/rectanimation.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 "rectanimation.h"
#include "dummyobject.h"
diff --git a/tests/benchmarks/gui/animation/qanimation/rectanimation.h b/tests/benchmarks/gui/animation/qanimation/rectanimation.h
index f4a9f3017a..359c9a8a9b 100644
--- a/tests/benchmarks/gui/animation/qanimation/rectanimation.h
+++ b/tests/benchmarks/gui/animation/qanimation/rectanimation.h
@@ -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 <QtGui>
diff --git a/tests/benchmarks/gui/image/CMakeLists.txt b/tests/benchmarks/gui/image/CMakeLists.txt
index 787c374179..53768eda4c 100644
--- a/tests/benchmarks/gui/image/CMakeLists.txt
+++ b/tests/benchmarks/gui/image/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from image.pro.
-
add_subdirectory(blendbench)
add_subdirectory(qimageconversion)
add_subdirectory(qimagereader)
diff --git a/tests/benchmarks/gui/image/blendbench/CMakeLists.txt b/tests/benchmarks/gui/image/blendbench/CMakeLists.txt
index e6ec465a6f..88a47c894b 100644
--- a/tests/benchmarks/gui/image/blendbench/CMakeLists.txt
+++ b/tests/benchmarks/gui/image/blendbench/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from blendbench.pro.
-
#####################################################################
## tst_bench_blendbench Binary:
#####################################################################
@@ -14,6 +12,3 @@ qt_internal_add_benchmark(tst_bench_blendbench
Qt::Gui
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:blendbench.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/image/blendbench/main.cpp b/tests/benchmarks/gui/image/blendbench/main.cpp
index 23365bad47..4aaf89d029 100644
--- a/tests/benchmarks/gui/image/blendbench/main.cpp
+++ b/tests/benchmarks/gui/image/blendbench/main.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 <QtGui>
#include <QString>
diff --git a/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt b/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt
index 1e78edcc48..034ed28fcd 100644
--- a/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt
+++ b/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qimageconversion.pro.
-
#####################################################################
## tst_bench_imageConversion Binary:
#####################################################################
@@ -15,10 +13,6 @@ qt_internal_add_benchmark(tst_bench_imageConversion
Qt::Test
)
-#### Keys ignored in scope 1:.:.:qimageconversion.pro:<TRUE>:
-# QT_FOR_CONFIG = "gui-private"
-# TEMPLATE = "app"
-
## Scopes:
#####################################################################
diff --git a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
index a87d794c37..0c4243637c 100644
--- a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
+++ b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.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 <QImage>
diff --git a/tests/benchmarks/gui/image/qimagereader/CMakeLists.txt b/tests/benchmarks/gui/image/qimagereader/CMakeLists.txt
index 1adccd9c2d..ba3c2a7ec4 100644
--- a/tests/benchmarks/gui/image/qimagereader/CMakeLists.txt
+++ b/tests/benchmarks/gui/image/qimagereader/CMakeLists.txt
@@ -1,25 +1,19 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qimagereader.pro.
-
#####################################################################
## tst_bench_qimagereader Binary:
#####################################################################
qt_internal_add_benchmark(tst_bench_qimagereader
SOURCES
- tst_qimagereader.cpp
+ tst_bench_qimagereader.cpp
LIBRARIES
+ Qt::CorePrivate
Qt::Gui
Qt::Test
)
-#### Keys ignored in scope 1:.:.:qimagereader.pro:<TRUE>:
-# QT_FOR_CONFIG = "gui-private"
-# TEMPLATE = "app"
-# TESTDATA = "images/*"
-
## Scopes:
#####################################################################
diff --git a/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp b/tests/benchmarks/gui/image/qimagereader/tst_bench_qimagereader.cpp
index 76e3e919f3..9b23741405 100644
--- a/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/benchmarks/gui/image/qimagereader/tst_bench_qimagereader.cpp
@@ -1,7 +1,8 @@
// 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 <QBuffer>
#include <QDebug>
#include <QFile>
@@ -9,6 +10,8 @@
#include <QImageReader>
#include <QImageWriter>
#include <QPixmap>
+
+#include <QtCore/private/qfactoryloader_p.h>
#include <QSet>
#include <QTimer>
@@ -17,20 +20,20 @@ typedef QList<int> QIntList;
Q_DECLARE_METATYPE(QStringMap)
Q_DECLARE_METATYPE(QIntList)
-class tst_QImageReader : public QObject
+class tst_bench_QImageReader : public QObject
{
Q_OBJECT
public:
- tst_QImageReader();
- virtual ~tst_QImageReader();
+ tst_bench_QImageReader();
public slots:
void initTestCase();
- void init();
- void cleanup();
private slots:
+ void rawFactoryLoader_keyMap();
+ void rawFactoryLoader_instance();
+
void readImage_data();
void readImage();
@@ -46,9 +49,10 @@ private slots:
private:
QList< QPair<QString, QByteArray> > images; // filename, format
QString prefix;
+ QFactoryLoader m_loader{QImageIOHandlerFactoryInterface_iid, "/imageformats"};
};
-tst_QImageReader::tst_QImageReader()
+tst_bench_QImageReader::tst_bench_QImageReader()
{
images << QPair<QString, QByteArray>(QLatin1String("colorful.bmp"), QByteArray("bmp"));
images << QPair<QString, QByteArray>(QLatin1String("font.bmp"), QByteArray("bmp"));
@@ -75,26 +79,38 @@ tst_QImageReader::tst_QImageReader()
#endif
}
-tst_QImageReader::~tst_QImageReader()
-{
-}
-
-void tst_QImageReader::initTestCase()
+void tst_bench_QImageReader::initTestCase()
{
prefix = QFINDTESTDATA("images/");
if (prefix.isEmpty())
QFAIL("Can't find images directory!");
}
-void tst_QImageReader::init()
+void tst_bench_QImageReader::rawFactoryLoader_keyMap()
{
+ if (m_loader.keyMap().isEmpty())
+ QSKIP("No image plugins found.");
+
+ QBENCHMARK {
+ [[maybe_unused]] auto r = m_loader.keyMap();
+ }
}
-void tst_QImageReader::cleanup()
+void tst_bench_QImageReader::rawFactoryLoader_instance()
{
+ if (m_loader.keyMap().isEmpty())
+ QSKIP("No image plugins found.");
+
+ const auto numInstances = m_loader.keyMap().uniqueKeys().size();
+
+ QBENCHMARK {
+ for (int i = 0; i < numInstances; ++i)
+ delete m_loader.instance(i);
+ }
}
-void tst_QImageReader::readImage_data()
+
+void tst_bench_QImageReader::readImage_data()
{
QTest::addColumn<QString>("fileName");
QTest::addColumn<QByteArray>("format");
@@ -106,7 +122,7 @@ void tst_QImageReader::readImage_data()
}
}
-void tst_QImageReader::readImage()
+void tst_bench_QImageReader::readImage()
{
QFETCH(QString, fileName);
QFETCH(QByteArray, format);
@@ -118,7 +134,7 @@ void tst_QImageReader::readImage()
}
}
-void tst_QImageReader::setScaledSize_data()
+void tst_bench_QImageReader::setScaledSize_data()
{
QTest::addColumn<QString>("fileName");
QTest::addColumn<QByteArray>("format");
@@ -136,7 +152,7 @@ void tst_QImageReader::setScaledSize_data()
}
}
-void tst_QImageReader::setScaledSize()
+void tst_bench_QImageReader::setScaledSize()
{
QFETCH(QString, fileName);
QFETCH(QSize, newSize);
@@ -150,7 +166,7 @@ void tst_QImageReader::setScaledSize()
}
}
-void tst_QImageReader::setClipRect_data()
+void tst_bench_QImageReader::setClipRect_data()
{
QTest::addColumn<QString>("fileName");
QTest::addColumn<QByteArray>("format");
@@ -163,7 +179,7 @@ void tst_QImageReader::setClipRect_data()
}
}
-void tst_QImageReader::setClipRect()
+void tst_bench_QImageReader::setClipRect()
{
QFETCH(QString, fileName);
QFETCH(QRect, newRect);
@@ -177,12 +193,12 @@ void tst_QImageReader::setClipRect()
}
}
-void tst_QImageReader::setScaledClipRect_data()
+void tst_bench_QImageReader::setScaledClipRect_data()
{
setClipRect_data();
}
-void tst_QImageReader::setScaledClipRect()
+void tst_bench_QImageReader::setScaledClipRect()
{
QFETCH(QString, fileName);
QFETCH(QRect, newRect);
@@ -197,5 +213,5 @@ void tst_QImageReader::setScaledClipRect()
}
}
-QTEST_MAIN(tst_QImageReader)
-#include "tst_qimagereader.moc"
+QTEST_MAIN(tst_bench_QImageReader)
+#include "tst_bench_qimagereader.moc"
diff --git a/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt b/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt
index 8c5f36cc8f..74d5c8e470 100644
--- a/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt
+++ b/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qimagescale.pro.
-
#####################################################################
## tst_bench_imageScale Binary:
#####################################################################
@@ -14,6 +12,3 @@ qt_internal_add_benchmark(tst_bench_imageScale
Qt::Gui
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qimagescale.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/image/qimagescale/tst_qimagescale.cpp b/tests/benchmarks/gui/image/qimagescale/tst_qimagescale.cpp
index 3a52cd60ae..2819dc1c11 100644
--- a/tests/benchmarks/gui/image/qimagescale/tst_qimagescale.cpp
+++ b/tests/benchmarks/gui/image/qimagescale/tst_qimagescale.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 <QImage>
diff --git a/tests/benchmarks/gui/image/qpixmap/CMakeLists.txt b/tests/benchmarks/gui/image/qpixmap/CMakeLists.txt
index dfa6682f53..db0546390a 100644
--- a/tests/benchmarks/gui/image/qpixmap/CMakeLists.txt
+++ b/tests/benchmarks/gui/image/qpixmap/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qpixmap.pro.
-
#####################################################################
## tst_bench_qpixmap Binary:
#####################################################################
@@ -15,6 +13,3 @@ qt_internal_add_benchmark(tst_bench_qpixmap
Qt::GuiPrivate
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qpixmap.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
index c1fa79aeb4..7a6e4a2b3f 100644
--- a/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.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 <QBitmap>
diff --git a/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt b/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt
index 948f0273b2..f2939ab470 100644
--- a/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt
+++ b/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qpixmapcache.pro.
-
#####################################################################
## tst_bench_qpixmapcache Binary:
#####################################################################
@@ -14,6 +12,3 @@ qt_internal_add_benchmark(tst_bench_qpixmapcache
Qt::Gui
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qpixmapcache.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp b/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp
index 5b8c7465e7..0c93e6d2ec 100644
--- a/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp
+++ b/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.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 <QPixmapCache>
diff --git a/tests/benchmarks/gui/kernel/CMakeLists.txt b/tests/benchmarks/gui/kernel/CMakeLists.txt
index 92437d9444..1f79c7d99b 100644
--- a/tests/benchmarks/gui/kernel/CMakeLists.txt
+++ b/tests/benchmarks/gui/kernel/CMakeLists.txt
@@ -1,7 +1,5 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from kernel.pro.
-
add_subdirectory(qguimetatype)
add_subdirectory(qguivariant)
diff --git a/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt b/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt
index 98a8fa6eac..394706b078 100644
--- a/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt
+++ b/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qguimetatype.pro.
-
#####################################################################
## tst_bench_qguimetatype Binary:
#####################################################################
@@ -14,6 +12,3 @@ qt_internal_add_benchmark(tst_bench_qguimetatype
Qt::Gui
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qguimetatype.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index 46c82d3014..2f7d278e87 100644
--- a/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.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 <QtCore/qmetatype.h>
diff --git a/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt b/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt
index 5306c333c7..a8e3ec8ec6 100644
--- a/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt
+++ b/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qguivariant.pro.
-
#####################################################################
## tst_bench_qguivariant Binary:
#####################################################################
@@ -14,6 +12,3 @@ qt_internal_add_benchmark(tst_bench_qguivariant
Qt::Gui
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qguivariant.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp b/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
index 675f4eb1ef..9c49e467ce 100644
--- a/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
+++ b/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.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 <QtCore/qvariant.h>
diff --git a/tests/benchmarks/gui/math3d/CMakeLists.txt b/tests/benchmarks/gui/math3d/CMakeLists.txt
index fdea76a321..f8e6f7b16c 100644
--- a/tests/benchmarks/gui/math3d/CMakeLists.txt
+++ b/tests/benchmarks/gui/math3d/CMakeLists.txt
@@ -1,7 +1,5 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from math3d.pro.
-
add_subdirectory(qmatrix4x4)
add_subdirectory(qquaternion)
diff --git a/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt b/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt
index 32e2be0745..2929d2d46f 100644
--- a/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt
+++ b/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qmatrix4x4.pro.
-
#####################################################################
## tst_bench_qmatrix4x4 Binary:
#####################################################################
@@ -14,6 +12,3 @@ qt_internal_add_benchmark(tst_bench_qmatrix4x4
Qt::Gui
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qmatrix4x4.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp b/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
index b5905d5a64..ebc61495dd 100644
--- a/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
+++ b/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.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>
#include <QtGui/qmatrix4x4.h>
diff --git a/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt b/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt
index e913a13988..e5880c0916 100644
--- a/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt
+++ b/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qquaternion.pro.
-
#####################################################################
## tst_bench_qquaternion Binary:
#####################################################################
@@ -14,6 +12,3 @@ qt_internal_add_benchmark(tst_bench_qquaternion
Qt::Gui
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qquaternion.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp b/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp
index 7ff3ca0d51..07b47d6401 100644
--- a/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp
+++ b/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.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 <QQuaternion>
diff --git a/tests/benchmarks/gui/painting/CMakeLists.txt b/tests/benchmarks/gui/painting/CMakeLists.txt
index b06d7fb3d3..2313688038 100644
--- a/tests/benchmarks/gui/painting/CMakeLists.txt
+++ b/tests/benchmarks/gui/painting/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from painting.pro.
-
add_subdirectory(drawtexture)
add_subdirectory(qcolor)
add_subdirectory(qregion)
diff --git a/tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt b/tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt
index 687f0dc29c..1e9af29d7f 100644
--- a/tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt
+++ b/tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from drawtexture.pro.
-
#####################################################################
## tst_bench_drawtexture Binary:
#####################################################################
@@ -15,6 +13,3 @@ qt_internal_add_benchmark(tst_bench_drawtexture
Qt::GuiPrivate
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:drawtexture.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/drawtexture/tst_drawtexture.cpp b/tests/benchmarks/gui/painting/drawtexture/tst_drawtexture.cpp
index 530e11fef4..4ab0a2db1e 100644
--- a/tests/benchmarks/gui/painting/drawtexture/tst_drawtexture.cpp
+++ b/tests/benchmarks/gui/painting/drawtexture/tst_drawtexture.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2017 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 <QPainter>
diff --git a/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt b/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt
index da717431a5..bfdd4df1c9 100644
--- a/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt
+++ b/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from lancebench.pro.
-
#####################################################################
## tst_bench_lancebench Binary:
#####################################################################
@@ -63,11 +61,6 @@ qt_internal_add_resource(tst_bench_lancebench "images"
${images_resource_files}
)
-
-#### Keys ignored in scope 1:.:.:lancebench.pro:<TRUE>:
-# TEMPLATE = "app"
-# TESTDATA = "../../../../baseline/painting/scripts/*"
-
## Scopes:
#####################################################################
diff --git a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
index a16299250b..67bef8ebfe 100644
--- a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
+++ b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2018 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 "paintcommands.h"
diff --git a/tests/benchmarks/gui/painting/qcolor/CMakeLists.txt b/tests/benchmarks/gui/painting/qcolor/CMakeLists.txt
index 34815caf4f..a450c698bf 100644
--- a/tests/benchmarks/gui/painting/qcolor/CMakeLists.txt
+++ b/tests/benchmarks/gui/painting/qcolor/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qcolor.pro.
-
#####################################################################
## tst_bench_qcolor Binary:
#####################################################################
@@ -15,6 +13,3 @@ qt_internal_add_benchmark(tst_bench_qcolor
Qt::GuiPrivate
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qcolor.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/qcolor/tst_qcolor.cpp b/tests/benchmarks/gui/painting/qcolor/tst_qcolor.cpp
index 192ece2aff..02fe3f986e 100644
--- a/tests/benchmarks/gui/painting/qcolor/tst_qcolor.cpp
+++ b/tests/benchmarks/gui/painting/qcolor/tst_qcolor.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com>
-// 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 <QColor>
diff --git a/tests/benchmarks/gui/painting/qpainter/CMakeLists.txt b/tests/benchmarks/gui/painting/qpainter/CMakeLists.txt
index 8ecee0b8e1..13a99ecc1d 100644
--- a/tests/benchmarks/gui/painting/qpainter/CMakeLists.txt
+++ b/tests/benchmarks/gui/painting/qpainter/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qpainter.pro.
-
#####################################################################
## tst_bench_qpainter Binary:
#####################################################################
@@ -17,6 +15,3 @@ qt_internal_add_benchmark(tst_bench_qpainter
Qt::Widgets
Qt::WidgetsPrivate
)
-
-#### Keys ignored in scope 1:.:.:qpainter.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
index cccf9c703c..7954e964b3 100644
--- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
@@ -1,5 +1,7 @@
// 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
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include <qtest.h>
#include <QPainter>
@@ -195,6 +197,9 @@ private slots:
void drawTransformedSemiTransparentImage();
void drawTransformedFilledImage();
+ void drawPathExceedingDevice_data();
+ void drawPathExceedingDevice();
+
private:
void setupBrushes();
void createPrimitives();
@@ -1659,6 +1664,56 @@ void tst_QPainter::drawTransformedFilledImage()
}
}
+void tst_QPainter::drawPathExceedingDevice_data()
+{
+ QTest::addColumn<int>("dim");
+ QTest::addColumn<QPainterPath>("path");
+
+ const int dim = 512;
+ QPainterPath p;
+ const int ext = 10 * dim;
+ for (int i = 0; i < ext; i += (ext / 50)) {
+ p.lineTo(ext, i);
+ p.lineTo(0, dim);
+ p.moveTo(0, 0);
+ }
+
+ {
+ QPainterPath preClip;
+ preClip.addRect(0, 0, dim, dim);
+ QTest::newRow("devicesize") << dim << p.intersected(preClip);
+ }
+
+ {
+ QPainterPath preClip;
+ preClip.addRect(0, 0, 2*dim, 2*dim);
+ QTest::newRow("devicesizex2") << dim << p.intersected(preClip);
+ }
+
+ {
+ QPainterPath preClip;
+ preClip.addRect(0, 0, 5*dim, 5*dim);
+ QTest::newRow("devicesizex5") << dim << p.intersected(preClip);
+ }
+
+ QTest::newRow("devicesizex10") << dim << p;
+}
+
+void tst_QPainter::drawPathExceedingDevice()
+{
+ QFETCH(int, dim);
+ QFETCH(QPainterPath, path);
+
+ QImage img(dim, dim, QImage::Format_RGB32);
+ QPainter p(&img);
+ p.setRenderHint(QPainter::Antialiasing);
+ p.setPen(QPen(Qt::black, 3));
+ p.setBrush(Qt::NoBrush);
+
+ QBENCHMARK {
+ p.drawPath(path);
+ }
+}
QTEST_MAIN(tst_QPainter)
diff --git a/tests/benchmarks/gui/painting/qregion/CMakeLists.txt b/tests/benchmarks/gui/painting/qregion/CMakeLists.txt
index 253f838d17..c242a2f588 100644
--- a/tests/benchmarks/gui/painting/qregion/CMakeLists.txt
+++ b/tests/benchmarks/gui/painting/qregion/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qregion.pro.
-
#####################################################################
## tst_bench_qregion Binary:
#####################################################################
@@ -14,6 +12,3 @@ qt_internal_add_benchmark(tst_bench_qregion
Qt::Gui
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qregion.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/qregion/main.cpp b/tests/benchmarks/gui/painting/qregion/main.cpp
index b01956c08e..696972c140 100644
--- a/tests/benchmarks/gui/painting/qregion/main.cpp
+++ b/tests/benchmarks/gui/painting/qregion/main.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
// This file contains benchmarks for QRegion functions.
#include <QDebug>
diff --git a/tests/benchmarks/gui/painting/qtbench/CMakeLists.txt b/tests/benchmarks/gui/painting/qtbench/CMakeLists.txt
index de6719cd05..68fbf0984f 100644
--- a/tests/benchmarks/gui/painting/qtbench/CMakeLists.txt
+++ b/tests/benchmarks/gui/painting/qtbench/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qtbench.pro.
-
#####################################################################
## tst_bench_qtbench Binary:
#####################################################################
@@ -15,6 +13,3 @@ qt_internal_add_benchmark(tst_bench_qtbench
Qt::Test
Qt::Widgets
)
-
-#### Keys ignored in scope 1:.:.:qtbench.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
index 03fb01f177..9d890f1577 100644
--- a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
+++ b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
@@ -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
#ifndef BENCHMARKTESTS_H
#define BENCHMARKTESTS_H
diff --git a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
index f24c48c0e1..45b7045f94 100644
--- a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
+++ b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
@@ -1,5 +1,7 @@
// Copyright (C) 2020 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
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include <qtest.h>
@@ -107,9 +109,13 @@ class tst_QtBench : public QObject
{
Q_OBJECT
+ QList<Benchmark *> benchmarks;
+
private slots:
void qtBench();
void qtBench_data();
+
+ void cleanupTestCase() { qDeleteAll(benchmarks); }
};
QString makeString(int length)
@@ -159,7 +165,6 @@ void tst_QtBench::qtBench_data()
"i erat, sed pellentesque\n"
"mi. Curabitur sed.";
- QList<Benchmark *> benchmarks;
benchmarks << (new DrawText(shortString, DrawText::PainterMode));
benchmarks << (new DrawText(middleString, DrawText::PainterMode));
benchmarks << (new DrawText(longString, DrawText::PainterMode));
diff --git a/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt b/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt
index 2cbb9a9067..8915ca3eb7 100644
--- a/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt
+++ b/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qtransform.pro.
-
#####################################################################
## tst_bench_qtransform Binary:
#####################################################################
@@ -14,6 +12,3 @@ qt_internal_add_benchmark(tst_bench_qtransform
Qt::Gui
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qtransform.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
index 9892d53559..e6442d0dff 100644
--- a/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
+++ b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.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 <QTransform>
diff --git a/tests/benchmarks/gui/text/CMakeLists.txt b/tests/benchmarks/gui/text/CMakeLists.txt
index ae3269aadf..052d49e03c 100644
--- a/tests/benchmarks/gui/text/CMakeLists.txt
+++ b/tests/benchmarks/gui/text/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from text.pro.
-
add_subdirectory(qfontmetrics)
add_subdirectory(qtext)
add_subdirectory(qtextdocument)
diff --git a/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt b/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt
index 02c9b9e3a5..4b9ae1e4c8 100644
--- a/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt
+++ b/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qfontmetrics.pro.
-
#####################################################################
## tst_bench_QFontMetrics Binary:
#####################################################################
@@ -14,6 +12,3 @@ qt_internal_add_benchmark(tst_bench_QFontMetrics
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 b5bb1db0f3..8aafa809f8 100644
--- a/tests/benchmarks/gui/text/qfontmetrics/main.cpp
+++ b/tests/benchmarks/gui/text/qfontmetrics/main.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 <QObject>
#include <QFont>
diff --git a/tests/benchmarks/gui/text/qtext/CMakeLists.txt b/tests/benchmarks/gui/text/qtext/CMakeLists.txt
index fd119f6cac..13cd6a2c3a 100644
--- a/tests/benchmarks/gui/text/qtext/CMakeLists.txt
+++ b/tests/benchmarks/gui/text/qtext/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qtext.pro.
-
#####################################################################
## tst_bench_QText Binary:
#####################################################################
@@ -15,7 +13,3 @@ qt_internal_add_benchmark(tst_bench_QText
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 146b40676b..9a2740253c 100644
--- a/tests/benchmarks/gui/text/qtext/main.cpp
+++ b/tests/benchmarks/gui/text/qtext/main.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 <QDebug>
#include <QTextDocument>
@@ -25,7 +25,9 @@ public:
private slots:
void loadHtml_data();
+#ifndef QT_NO_TEXTHTMLPARSER
void loadHtml();
+#endif
void shaping_data();
void shaping();
@@ -47,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);
@@ -76,6 +80,7 @@ void tst_QText::loadHtml_data()
+ parag;
}
+#ifndef QT_NO_TEXTHTMLPARSER
void tst_QText::loadHtml()
{
QFETCH(QString, source);
@@ -84,6 +89,7 @@ void tst_QText::loadHtml()
doc.setHtml(source);
}
}
+#endif
void tst_QText::shaping_data()
{
@@ -371,6 +377,7 @@ void tst_QText::paintLayoutToPixmap_painterFill()
}
}
+#ifndef QT_NO_TEXTHTMLPARSER
void tst_QText::document()
{
QTextDocument *doc = new QTextDocument;
@@ -413,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 0e4b02adeb..2a95411335 100644
--- a/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt
+++ b/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qtextdocument.pro.
-
#####################################################################
## tst_bench_QTextDocument Binary:
#####################################################################
@@ -15,6 +13,3 @@ qt_internal_add_benchmark(tst_bench_QTextDocument
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 17036d96ca..7bdff95235 100644
--- a/tests/benchmarks/gui/text/qtextdocument/main.cpp
+++ b/tests/benchmarks/gui/text/qtextdocument/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net>
-// 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 <QDebug>
#include <QTextDocument>