summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/gui')
-rw-r--r--tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp22
-rw-r--r--tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp1
-rw-r--r--tests/benchmarks/gui/painting/qtbench/benchmarktests.h1
-rw-r--r--tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp1
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp2
5 files changed, 15 insertions, 12 deletions
diff --git a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
index d26ac016b9..1c17f86cf9 100644
--- a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
+++ b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
@@ -110,7 +110,7 @@ void tst_LanceBench::initTestCase()
QFile file(scriptsDir + fileName);
file.open(QFile::ReadOnly);
QByteArray cont = file.readAll();
- scripts.insert(fileName, QString::fromUtf8(cont).split(QLatin1Char('\n'), QString::SkipEmptyParts));
+ scripts.insert(fileName, QString::fromUtf8(cont).split(QLatin1Char('\n'), Qt::SkipEmptyParts));
}
}
@@ -305,17 +305,17 @@ void tst_LanceBench::runTestSuite(GraphicsEngine engine, QImage::Format format,
void tst_LanceBench::paint(QPaintDevice *device, GraphicsEngine engine, QImage::Format format, const QStringList &script, const QString &filePath)
{
+ PaintCommands pcmd(script, 800, 800, format);
+ switch (engine) {
+ case OpenGL:
+ pcmd.setType(OpenGLBufferType); // version/profile is communicated through the context's format()
+ break;
+ case Raster:
+ pcmd.setType(ImageType);
+ break;
+ }
+ pcmd.setFilePath(filePath);
QBENCHMARK {
- PaintCommands pcmd(script, 800, 800, format);
- switch (engine) {
- case OpenGL:
- pcmd.setType(OpenGLBufferType); // version/profile is communicated through the context's format()
- break;
- case Raster:
- pcmd.setType(ImageType);
- break;
- }
- pcmd.setFilePath(filePath);
QPainter p(device);
pcmd.setPainter(&p);
pcmd.runCommands();
diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
index 485306a8ac..82804a0977 100644
--- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
@@ -28,6 +28,7 @@
#include <qtest.h>
#include <QPainter>
+#include <QPainterPath>
#include <QPixmap>
#include <QImage>
#include <QPaintEngine>
diff --git a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
index b31b6823aa..6d388fcaad 100644
--- a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
+++ b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
@@ -37,6 +37,7 @@
#include <QDebug>
#include <QStaticText>
#include <QPainter>
+#include <QPainterPath>
#include <QRandomGenerator>
class Benchmark
diff --git a/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
index 12e85d4842..d28f9502d7 100644
--- a/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
+++ b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
@@ -28,6 +28,7 @@
#include <qtest.h>
#include <QTransform>
+#include <QPainterPath>
class tst_QTransform : public QObject
{
diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp
index ff92a15017..7cd4931ca2 100644
--- a/tests/benchmarks/gui/text/qtext/main.cpp
+++ b/tests/benchmarks/gui/text/qtext/main.cpp
@@ -123,7 +123,7 @@ void tst_QText::shaping_data()
QVERIFY(file.open(QFile::ReadOnly));
QByteArray data = file.readAll();
QVERIFY(data.count() > 1000);
- QStringList list = QString::fromUtf8(data.data()).split(QLatin1Char('\n'), QString::SkipEmptyParts);
+ 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) {
QTest::newRow(list.at(i).toLatin1()) << list.at(i+1);