summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure5
-rw-r--r--mkspecs/features/mac/default_post.prf4
-rw-r--r--src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp4
-rw-r--r--src/angle/patches/0018-ANGLE-d3d11-Do-not-register-windows-message-hooks-fo.patch45
-rw-r--r--src/corelib/time/qtimezoneprivate_tz.cpp33
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp150
-rw-r--r--tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro5
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/10000.pro6
-rw-r--r--tests/benchmarks/corelib/io/qdir/tree/tree.pro6
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro6
-rw-r--r--tests/benchmarks/corelib/io/qfile/qfile.pro3
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro6
-rw-r--r--tests/benchmarks/corelib/io/qiodevice/qiodevice.pro6
-rw-r--r--tests/benchmarks/corelib/io/qprocess/test/test.pro5
-rw-r--r--tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro4
-rw-r--r--tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro6
-rw-r--r--tests/benchmarks/corelib/io/qtextstream/qtextstream.pro6
-rw-r--r--tests/benchmarks/corelib/io/qurl/qurl.pro3
-rw-r--r--tests/benchmarks/corelib/json/json.pro3
-rw-r--r--tests/benchmarks/corelib/kernel/events/events.pro4
-rw-r--r--tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro4
-rw-r--r--tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro3
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro6
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/qobject.pro4
-rw-r--r--tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro11
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/qvariant.pro7
-rw-r--r--tests/benchmarks/corelib/mimetypes/qmimedatabase/qmimedatabase.pro2
-rw-r--r--tests/benchmarks/corelib/plugin/quuid/quuid.pro5
-rw-r--r--tests/benchmarks/corelib/text/qbytearray/qbytearray.pro6
-rw-r--r--tests/benchmarks/corelib/text/qchar/qchar.pro4
-rw-r--r--tests/benchmarks/corelib/text/qlocale/qlocale.pro3
-rw-r--r--tests/benchmarks/corelib/text/qregexp/qregexp.pro6
-rw-r--r--tests/benchmarks/corelib/text/qstring/qstring.pro5
-rw-r--r--tests/benchmarks/corelib/text/qstringbuilder/qstringbuilder.pro10
-rw-r--r--tests/benchmarks/corelib/text/qstringlist/qstringlist.pro5
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/qmutex.pro5
-rw-r--r--tests/benchmarks/corelib/thread/qreadwritelock/qreadwritelock.pro7
-rw-r--r--tests/benchmarks/corelib/thread/qthreadpool/qthreadpool.pro5
-rw-r--r--tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro5
-rw-r--r--tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro4
-rw-r--r--tests/benchmarks/corelib/time/qdate/qdate.pro3
-rw-r--r--tests/benchmarks/corelib/time/qdatetime/qdatetime.pro3
-rw-r--r--tests/benchmarks/corelib/time/qtimezone/qtimezone.pro3
-rw-r--r--tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro4
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro4
-rw-r--r--tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro4
-rw-r--r--tests/benchmarks/corelib/tools/qcontiguouscache/qcontiguouscache.pro9
-rw-r--r--tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro7
-rw-r--r--tests/benchmarks/corelib/tools/qhash/qhash.pro5
-rw-r--r--tests/benchmarks/corelib/tools/qlist/qlist.pro3
-rw-r--r--tests/benchmarks/corelib/tools/qmap/qmap.pro5
-rw-r--r--tests/benchmarks/corelib/tools/qrect/qrect.pro5
-rw-r--r--tests/benchmarks/corelib/tools/qringbuffer/qringbuffer.pro5
-rw-r--r--tests/benchmarks/corelib/tools/qset/qset.pro5
-rw-r--r--tests/benchmarks/corelib/tools/qstack/qstack.pro5
-rw-r--r--tests/benchmarks/corelib/tools/qvector/qvector.pro7
56 files changed, 275 insertions, 219 deletions
diff --git a/configure b/configure
index 6657870e4b..b6c9b462f2 100755
--- a/configure
+++ b/configure
@@ -271,12 +271,9 @@ macSDKify()
val=$(echo $sdk_val $(echo $val | cut -s -d ' ' -f 2-))
echo "$var=$val"
;;
- QMAKE_CFLAGS=*|QMAKE_CXXFLAGS=*)
+ QMAKE_CFLAGS=*|QMAKE_CXXFLAGS=*|QMAKE_LFLAGS=*)
echo "$line -isysroot $sysroot $version_min_flag"
;;
- QMAKE_LFLAGS=*)
- echo "$line -Wl,-syslibroot,$sysroot $version_min_flag"
- ;;
*)
echo "$line"
;;
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index ba163efc18..92a9112bca 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -198,7 +198,7 @@ macx-xcode {
-isysroot$$xcodeSDKInfo(Path, $$sdk)
QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \
-Xarch_$${arch} \
- -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk)
+ -isysroot$$xcodeSDKInfo(Path, $$sdk)
QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch})
QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch})
@@ -222,7 +222,7 @@ macx-xcode {
version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
QMAKE_CFLAGS += -isysroot $$sysroot_path $$version_min_flag
QMAKE_CXXFLAGS += -isysroot $$sysroot_path $$version_min_flag
- QMAKE_LFLAGS += -Wl,-syslibroot,$$sysroot_path $$version_min_flag
+ QMAKE_LFLAGS += -isysroot $$sysroot_path $$version_min_flag
}
# Enable precompiled headers for multiple architectures
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
index 5394e3d3e7..f5e6c93813 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
@@ -168,7 +168,7 @@ HRESULT NativeWindow11Win32::createSwapChain(ID3D11Device *device,
nullptr, nullptr, &swapChain1);
if (SUCCEEDED(result))
{
- factory2->MakeWindowAssociation(getNativeWindow(), DXGI_MWA_NO_ALT_ENTER);
+ factory2->MakeWindowAssociation(getNativeWindow(), DXGI_MWA_NO_WINDOW_CHANGES);
*swapChain = static_cast<IDXGISwapChain *>(swapChain1);
}
SafeRelease(factory2);
@@ -196,7 +196,7 @@ HRESULT NativeWindow11Win32::createSwapChain(ID3D11Device *device,
HRESULT result = factory->CreateSwapChain(device, &swapChainDesc, swapChain);
if (SUCCEEDED(result))
{
- factory->MakeWindowAssociation(getNativeWindow(), DXGI_MWA_NO_ALT_ENTER);
+ factory->MakeWindowAssociation(getNativeWindow(), DXGI_MWA_NO_WINDOW_CHANGES);
}
return result;
}
diff --git a/src/angle/patches/0018-ANGLE-d3d11-Do-not-register-windows-message-hooks-fo.patch b/src/angle/patches/0018-ANGLE-d3d11-Do-not-register-windows-message-hooks-fo.patch
new file mode 100644
index 0000000000..03529c6531
--- /dev/null
+++ b/src/angle/patches/0018-ANGLE-d3d11-Do-not-register-windows-message-hooks-fo.patch
@@ -0,0 +1,45 @@
+From 3d23de2ad72968d0bf43dac4a9a0f237cc9e03e2 Mon Sep 17 00:00:00 2001
+From: Oliver Wolff <oliver.wolff@qt.io>
+Date: Wed, 1 Apr 2020 14:48:48 +0200
+Subject: [PATCH] ANGLE: d3d11: Do not register windows message hooks for d3d11
+ windows
+
+These message hooks are used to handle ALT+ENTER to enter/exit fullscreen
+mode and PRINTSCREEN to take screenshots. Qt is implementing these
+functionalities itself so we do not have to register these hooks.
+
+If too many of these hooks are registered, callbacks are no longer called
+and Qt's message queue is no longer handling messages. By saving these
+hooks we can make sure that more Qt windows at the same time are possible
+without getting unresponsive due to too many hooks being registered.
+
+Change-Id: I5354f91f08cbfeda5e8dc3ad7f824fbd5b3b2932
+---
+ .../src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
+index 5394e3d..f5e6c93 100644
+--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
++++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
+@@ -168,7 +168,7 @@ HRESULT NativeWindow11Win32::createSwapChain(ID3D11Device *device,
+ nullptr, nullptr, &swapChain1);
+ if (SUCCEEDED(result))
+ {
+- factory2->MakeWindowAssociation(getNativeWindow(), DXGI_MWA_NO_ALT_ENTER);
++ factory2->MakeWindowAssociation(getNativeWindow(), DXGI_MWA_NO_WINDOW_CHANGES);
+ *swapChain = static_cast<IDXGISwapChain *>(swapChain1);
+ }
+ SafeRelease(factory2);
+@@ -196,7 +196,7 @@ HRESULT NativeWindow11Win32::createSwapChain(ID3D11Device *device,
+ HRESULT result = factory->CreateSwapChain(device, &swapChainDesc, swapChain);
+ if (SUCCEEDED(result))
+ {
+- factory->MakeWindowAssociation(getNativeWindow(), DXGI_MWA_NO_ALT_ENTER);
++ factory->MakeWindowAssociation(getNativeWindow(), DXGI_MWA_NO_WINDOW_CHANGES);
+ }
+ return result;
+ }
+--
+2.7.4.windows.1
+
diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp
index c451f95a0e..09a04767bf 100644
--- a/src/corelib/time/qtimezoneprivate_tz.cpp
+++ b/src/corelib/time/qtimezoneprivate_tz.cpp
@@ -1123,15 +1123,15 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
{
// Check TZ env var first, if not populated try find it
QByteArray ianaId = qgetenv("TZ");
- if (!ianaId.isEmpty() && ianaId.at(0) == ':')
- ianaId = ianaId.mid(1);
// The TZ value can be ":/etc/localtime" which libc considers
// to be a "default timezone", in which case it will be read
// by one of the blocks below, so unset it here so it is not
// considered as a valid/found ianaId
- if (ianaId == "/etc/localtime")
+ if (ianaId == ":/etc/localtime")
ianaId.clear();
+ else if (ianaId.startsWith(':'))
+ ianaId = ianaId.mid(1);
// On most distros /etc/localtime is a symlink to a real file so extract name from the path
if (ianaId.isEmpty()) {
@@ -1150,15 +1150,12 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
}
}
- // On Debian Etch up to Jessie, /etc/localtime is a regular file while the actual name is in /etc/timezone
+ // On Debian Etch up to Jessie, /etc/localtime is a copy of the relevant
+ // zoneinfo file, whose name is recorded in /etc/timezone:
if (ianaId.isEmpty()) {
QFile tzif(QStringLiteral("/etc/timezone"));
- if (tzif.open(QIODevice::ReadOnly)) {
- // TODO QTextStream inefficient, replace later
- QTextStream ts(&tzif);
- if (!ts.atEnd())
- ianaId = ts.readLine().toUtf8();
- }
+ if (tzif.open(QIODevice::ReadOnly))
+ ianaId = tzif.readAll().trimmed();
}
// On some Red Hat distros /etc/localtime is real file with name held in /etc/sysconfig/clock
@@ -1166,16 +1163,12 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
if (ianaId.isEmpty()) {
QFile tzif(QStringLiteral("/etc/sysconfig/clock"));
if (tzif.open(QIODevice::ReadOnly)) {
- // TODO QTextStream inefficient, replace later
- QTextStream ts(&tzif);
- QString line;
- while (ianaId.isEmpty() && !ts.atEnd() && ts.status() == QTextStream::Ok) {
- line = ts.readLine();
- if (line.startsWith(QLatin1String("ZONE="))) {
- ianaId = line.midRef(6, line.size() - 7).toUtf8();
- } else if (line.startsWith(QLatin1String("TIMEZONE="))) {
- ianaId = line.midRef(10, line.size() - 11).toUtf8();
- }
+ while (ianaId.isEmpty() && !tzif.atEnd()) {
+ const QByteArray line(tzif.readLine().trimmed());
+ if (line.startsWith("ZONE="))
+ ianaId = line.mid(6, line.length() - 7);
+ else if (line.startsWith("TIMEZONE="))
+ ianaId = line.mid(10, line.length() - 11);
}
}
}
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 8a5eff3fac..fa448a9593 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -93,7 +93,11 @@ private slots:
void quitOnLastWindowClosed();
void closeAllWindows();
void testDeleteLater();
- void testDeleteLaterProcessEvents();
+ void testDeleteLaterProcessEvents1();
+ void testDeleteLaterProcessEvents2();
+ void testDeleteLaterProcessEvents3();
+ void testDeleteLaterProcessEvents4();
+ void testDeleteLaterProcessEvents5();
#if QT_CONFIG(library)
void libraryPaths();
@@ -1333,10 +1337,8 @@ public slots:
}
};
-void tst_QApplication::testDeleteLaterProcessEvents()
+void tst_QApplication::testDeleteLaterProcessEvents1()
{
- int argc = 0;
-
// Calling processEvents() with no event dispatcher does nothing.
QObject *object = new QObject;
QPointer<QObject> p(object);
@@ -1344,75 +1346,85 @@ void tst_QApplication::testDeleteLaterProcessEvents()
QApplication::processEvents();
QVERIFY(p);
delete object;
+}
- {
- QApplication app(argc, nullptr);
- // If you call processEvents() with an event dispatcher present, but
- // outside any event loops, deferred deletes are not processed unless
- // sendPostedEvents(0, DeferredDelete) is called.
- object = new QObject;
- p = object;
- object->deleteLater();
- QCoreApplication::processEvents();
- QVERIFY(p);
- QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
- QVERIFY(!p);
-
- // If you call deleteLater() on an object when there is no parent
- // event loop, and then enter an event loop, the object will get
- // deleted.
- object = new QObject;
- p = object;
- object->deleteLater();
- QEventLoop loop;
- QTimer::singleShot(1000, &loop, &QEventLoop::quit);
- loop.exec();
- QVERIFY(!p);
- }
- {
- // When an object is in an event loop, then calls deleteLater() and enters
- // an event loop recursively, it should not die until the parent event
- // loop continues.
- QApplication app(argc, nullptr);
- QEventLoop loop;
- EventLoopNester *nester = new EventLoopNester;
- p = nester;
- QTimer::singleShot(3000, &loop, &QEventLoop::quit);
- QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndEnterLoop);
-
- loop.exec();
- QVERIFY(!p);
- }
-
- {
- // When the event loop that calls deleteLater() is exited
- // immediately, the object should die when returning to the
- // parent event loop
- QApplication app(argc, nullptr);
- QEventLoop loop;
- EventLoopNester *nester = new EventLoopNester;
- p = nester;
- QTimer::singleShot(3000, &loop, &QEventLoop::quit);
- QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndExitLoop);
+void tst_QApplication::testDeleteLaterProcessEvents2()
+{
+ int argc = 0;
+ QApplication app(argc, nullptr);
+ // If you call processEvents() with an event dispatcher present, but
+ // outside any event loops, deferred deletes are not processed unless
+ // sendPostedEvents(0, DeferredDelete) is called.
+ auto object = new QObject;
+ QPointer<QObject> p(object);
+ object->deleteLater();
+ QCoreApplication::processEvents();
+ QVERIFY(p);
+ QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
+ QVERIFY(!p);
+
+ // If you call deleteLater() on an object when there is no parent
+ // event loop, and then enter an event loop, the object will get
+ // deleted.
+ QEventLoop loop;
+ object = new QObject;
+ connect(object, &QObject::destroyed, &loop, &QEventLoop::quit);
+ p = object;
+ object->deleteLater();
+ QTimer::singleShot(1000, &loop, &QEventLoop::quit);
+ loop.exec();
+ QVERIFY(!p);
+}
- loop.exec();
- QVERIFY(!p);
- }
+void tst_QApplication::testDeleteLaterProcessEvents3()
+{
+ int argc = 0;
+ // When an object is in an event loop, then calls deleteLater() and enters
+ // an event loop recursively, it should not die until the parent event
+ // loop continues.
+ QApplication app(argc, nullptr);
+ QEventLoop loop;
+ EventLoopNester *nester = new EventLoopNester;
+ QPointer<QObject> p(nester);
+ QTimer::singleShot(3000, &loop, &QEventLoop::quit);
+ QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndEnterLoop);
+
+ loop.exec();
+ QVERIFY(!p);
+}
- {
- // when the event loop that calls deleteLater() also calls
- // processEvents() immediately afterwards, the object should
- // not die until the parent loop continues
- QApplication app(argc, nullptr);
- QEventLoop loop;
- EventLoopNester *nester = new EventLoopNester();
- p = nester;
- QTimer::singleShot(3000, &loop, &QEventLoop::quit);
- QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndProcessEvents);
+void tst_QApplication::testDeleteLaterProcessEvents4()
+{
+ int argc = 0;
+ // When the event loop that calls deleteLater() is exited
+ // immediately, the object should die when returning to the
+ // parent event loop
+ QApplication app(argc, nullptr);
+ QEventLoop loop;
+ EventLoopNester *nester = new EventLoopNester;
+ QPointer<QObject> p(nester);
+ QTimer::singleShot(3000, &loop, &QEventLoop::quit);
+ QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndExitLoop);
+
+ loop.exec();
+ QVERIFY(!p);
+}
- loop.exec();
- QVERIFY(!p);
- }
+void tst_QApplication::testDeleteLaterProcessEvents5()
+{
+ // when the event loop that calls deleteLater() also calls
+ // processEvents() immediately afterwards, the object should
+ // not die until the parent loop continues
+ int argc = 0;
+ QApplication app(argc, nullptr);
+ QEventLoop loop;
+ EventLoopNester *nester = new EventLoopNester();
+ QPointer<QObject> p(nester);
+ QTimer::singleShot(3000, &loop, &QEventLoop::quit);
+ QTimer::singleShot(0, nester, &EventLoopNester::deleteLaterAndProcessEvents);
+
+ loop.exec();
+ QVERIFY(!p);
}
/*
diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro b/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro
index 5ee577c256..7d29c6bfdd 100644
--- a/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro
+++ b/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro
@@ -1,6 +1,7 @@
-TARGET = tst_bench_qtextcodec
+CONFIG += benchmark
QT = core testlib
+
+TARGET = tst_bench_qtextcodec
SOURCES += main.cpp
TESTDATA = utf-8.txt
-
diff --git a/tests/benchmarks/corelib/io/qdir/10000/10000.pro b/tests/benchmarks/corelib/io/qdir/10000/10000.pro
index 2e83dad071..52325f314f 100644
--- a/tests/benchmarks/corelib/io/qdir/10000/10000.pro
+++ b/tests/benchmarks/corelib/io/qdir/10000/10000.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_qdir_10000
+CONFIG += benchmark
+QT = core testlib
+TARGET = tst_bench_qdir_10000
SOURCES += bench_qdir_10000.cpp
-
-QT = core testlib
diff --git a/tests/benchmarks/corelib/io/qdir/tree/tree.pro b/tests/benchmarks/corelib/io/qdir/tree/tree.pro
index 2998a13b57..90ddd23345 100644
--- a/tests/benchmarks/corelib/io/qdir/tree/tree.pro
+++ b/tests/benchmarks/corelib/io/qdir/tree/tree.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
-TARGET = bench_qdir_tree
+CONFIG += benchmark
+QT = core testlib
+TARGET = bench_qdir_tree
SOURCES += bench_qdir_tree.cpp
RESOURCES += bench_qdir_tree.qrc
-
-QT = core testlib
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
index 061b22a5d1..b332cda84b 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
+++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
@@ -1,8 +1,6 @@
-TARGET = tst_bench_qdiriterator
-
+CONFIG += benchmark
QT = core testlib
-CONFIG += release
-
+TARGET = tst_bench_qdiriterator
SOURCES += main.cpp qfilesystemiterator.cpp
HEADERS += qfilesystemiterator.h
diff --git a/tests/benchmarks/corelib/io/qfile/qfile.pro b/tests/benchmarks/corelib/io/qfile/qfile.pro
index 5f7b9af73f..a882c4ea61 100644
--- a/tests/benchmarks/corelib/io/qfile/qfile.pro
+++ b/tests/benchmarks/corelib/io/qfile/qfile.pro
@@ -1,6 +1,7 @@
TEMPLATE = app
-TARGET = tst_bench_qfile
+CONFIG += benchmark
QT = core core-private testlib
win32: DEFINES+= _CRT_SECURE_NO_WARNINGS
+TARGET = tst_bench_qfile
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro b/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro
index 42e8708b02..9c97bfc84a 100644
--- a/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro
+++ b/tests/benchmarks/corelib/io/qfileinfo/qfileinfo.pro
@@ -1,9 +1,7 @@
TEMPLATE = app
-TARGET = tst_bench_qfileinfo
-
+CONFIG += benchmark
QT -= gui
QT += core-private testlib
-CONFIG += release
-
+TARGET = tst_bench_qfileinfo
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro
index 7937436e13..febe6e87f9 100644
--- a/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro
+++ b/tests/benchmarks/corelib/io/qiodevice/qiodevice.pro
@@ -1,8 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_qiodevice
-
+CONFIG += benchmark
QT = core testlib
-CONFIG += release
-
+TARGET = tst_bench_qiodevice
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/io/qprocess/test/test.pro b/tests/benchmarks/corelib/io/qprocess/test/test.pro
index b665525b17..e7e8e01aef 100644
--- a/tests/benchmarks/corelib/io/qprocess/test/test.pro
+++ b/tests/benchmarks/corelib/io/qprocess/test/test.pro
@@ -1,4 +1,5 @@
+CONFIG += benchmark
+QT = core core-private testlib
+
TARGET = ../tst_bench_qprocess
SOURCES += ../tst_bench_qprocess.cpp
-
-QT = core core-private testlib
diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
index a0230e1cb8..1f56ad6ee6 100644
--- a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
+++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
@@ -1,5 +1,7 @@
-SOURCES = main.cpp
+CONFIG += benchmark
CONFIG -= qt
CONFIG += cmdline
winrt: QMAKE_LFLAGS += /ENTRY:mainCRTStartup
+
+SOURCES = main.cpp
DESTDIR = ./
diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro b/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro
index 758930c139..b6064e1f91 100644
--- a/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro
+++ b/tests/benchmarks/corelib/io/qtemporaryfile/qtemporaryfile.pro
@@ -1,8 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_qtemporaryfile
-
+CONFIG += benchmark
QT = core testlib
-CONFIG += release
-
+TARGET = tst_bench_qtemporaryfile
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro b/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro
index e8170319f2..fb45d05bc9 100644
--- a/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro
+++ b/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro
@@ -1,8 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_qtextstream
-
+CONFIG += benchmark
QT = core testlib
-CONFIG += release
-
+TARGET = tst_bench_qtextstream
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/io/qurl/qurl.pro b/tests/benchmarks/corelib/io/qurl/qurl.pro
index 52f7bdc8b6..0e10e32a22 100644
--- a/tests/benchmarks/corelib/io/qurl/qurl.pro
+++ b/tests/benchmarks/corelib/io/qurl/qurl.pro
@@ -1,6 +1,7 @@
TEMPLATE = app
-TARGET = tst_qurl
+CONFIG += benchmark
QT = core testlib
win32: DEFINES+= _CRT_SECURE_NO_WARNINGS
+TARGET = tst_qurl
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/json/json.pro b/tests/benchmarks/corelib/json/json.pro
index 004f4b123e..8f9e515cb9 100644
--- a/tests/benchmarks/corelib/json/json.pro
+++ b/tests/benchmarks/corelib/json/json.pro
@@ -1,7 +1,8 @@
-TARGET = tst_bench_qtbinaryjson
QT = core testlib
+CONFIG += benchmark
CONFIG -= app_bundle
+TARGET = tst_bench_qtbinaryjson
SOURCES += tst_bench_qtbinaryjson.cpp
TESTDATA = numbers.json test.json
diff --git a/tests/benchmarks/corelib/kernel/events/events.pro b/tests/benchmarks/corelib/kernel/events/events.pro
index 798a880e5b..1381bb001e 100644
--- a/tests/benchmarks/corelib/kernel/events/events.pro
+++ b/tests/benchmarks/corelib/kernel/events/events.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_events
-
+CONFIG += benchmark
QT = core testlib
+TARGET = tst_bench_events
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro b/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro
index 8bf8487a5f..5572f06924 100644
--- a/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro
+++ b/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro
@@ -1,6 +1,6 @@
+TEMPLATE = app
+CONFIG += benchmark
QT = core testlib
-TEMPLATE = app
TARGET = tst_bench_qcoreapplication
-
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro b/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro
index 47d2acb9b1..0d595ed4da 100644
--- a/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro
+++ b/tests/benchmarks/corelib/kernel/qmetaobject/qmetaobject.pro
@@ -1,5 +1,6 @@
TEMPLATE = app
+CONFIG += benchmark
QT += widgets testlib
-TARGET = tst_bench_qmetaobject
+TARGET = tst_bench_qmetaobject
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro b/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro
index 83d0708b60..ffd36ad202 100644
--- a/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro
+++ b/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro
@@ -1,6 +1,6 @@
-QT = core testlib
TEMPLATE = app
-TARGET = tst_bench_qmetatype
+CONFIG += benchmark
+QT = core testlib
+TARGET = tst_bench_qmetatype
SOURCES += tst_qmetatype.cpp
-
diff --git a/tests/benchmarks/corelib/kernel/qobject/qobject.pro b/tests/benchmarks/corelib/kernel/qobject/qobject.pro
index e611eff0a2..eb1d8a2daa 100644
--- a/tests/benchmarks/corelib/kernel/qobject/qobject.pro
+++ b/tests/benchmarks/corelib/kernel/qobject/qobject.pro
@@ -1,7 +1,7 @@
+TEMPLATE = app
+CONFIG += benchmark
QT += widgets testlib
-TEMPLATE = app
TARGET = tst_bench_qobject
-
HEADERS += object.h
SOURCES += main.cpp object.cpp
diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro
index e127ba1934..3d4e48e76c 100644
--- a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro
+++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/qtimer_vs_qmetaobject.pro
@@ -1,10 +1,7 @@
TEMPLATE = app
-TARGET = qtimer_vs_qmetaobject
-INCLUDEPATH += .
-
-CONFIG += release
-#CONFIG += debug
-
+CONFIG += benchmark
+QT = core testlib
+INCLUDEPATH += .
+TARGET = qtimer_vs_qmetaobject
SOURCES += tst_qtimer_vs_qmetaobject.cpp
-QT = core testlib
diff --git a/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro
index 8a8e9f25d3..2616ae78ea 100644
--- a/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro
+++ b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro
@@ -1,9 +1,6 @@
-TARGET = tst_bench_qvariant
+CONFIG += benchmark
QT += testlib
!qtHaveModule(gui): QT -= gui
-CONFIG += release
-#CONFIG += debug
-
-
+TARGET = tst_bench_qvariant
SOURCES += tst_qvariant.cpp
diff --git a/tests/benchmarks/corelib/mimetypes/qmimedatabase/qmimedatabase.pro b/tests/benchmarks/corelib/mimetypes/qmimedatabase/qmimedatabase.pro
index fe55b98e54..3d218554d3 100644
--- a/tests/benchmarks/corelib/mimetypes/qmimedatabase/qmimedatabase.pro
+++ b/tests/benchmarks/corelib/mimetypes/qmimedatabase/qmimedatabase.pro
@@ -1,5 +1,5 @@
+CONFIG += benchmark
QT = core testlib
TARGET = tst_bench_qmimedatabase
SOURCES = main.cpp
-
diff --git a/tests/benchmarks/corelib/plugin/quuid/quuid.pro b/tests/benchmarks/corelib/plugin/quuid/quuid.pro
index 8f88bb85b4..5179c0cc40 100644
--- a/tests/benchmarks/corelib/plugin/quuid/quuid.pro
+++ b/tests/benchmarks/corelib/plugin/quuid/quuid.pro
@@ -1,5 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_quuid
+CONFIG += benchmark
+QT = core testlib
+TARGET = tst_bench_quuid
SOURCES += tst_quuid.cpp
-QT = core testlib
diff --git a/tests/benchmarks/corelib/text/qbytearray/qbytearray.pro b/tests/benchmarks/corelib/text/qbytearray/qbytearray.pro
index cf28b0247f..25af9512d4 100644
--- a/tests/benchmarks/corelib/text/qbytearray/qbytearray.pro
+++ b/tests/benchmarks/corelib/text/qbytearray/qbytearray.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
-TARGET = tst_bench_qbytearray
-
+CONFIG += benchmark
QT = core testlib
-TESTDATA += main.cpp
+TARGET = tst_bench_qbytearray
SOURCES += main.cpp
+TESTDATA += main.cpp
diff --git a/tests/benchmarks/corelib/text/qchar/qchar.pro b/tests/benchmarks/corelib/text/qchar/qchar.pro
index 80a9861f48..902acbb831 100644
--- a/tests/benchmarks/corelib/text/qchar/qchar.pro
+++ b/tests/benchmarks/corelib/text/qchar/qchar.pro
@@ -1,3 +1,5 @@
-TARGET = tst_bench_qchar
+CONFIG += benchmark
QT = core testlib
+
+TARGET = tst_bench_qchar
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/text/qlocale/qlocale.pro b/tests/benchmarks/corelib/text/qlocale/qlocale.pro
index e56bbe0341..a39a20a677 100644
--- a/tests/benchmarks/corelib/text/qlocale/qlocale.pro
+++ b/tests/benchmarks/corelib/text/qlocale/qlocale.pro
@@ -1,4 +1,5 @@
-TARGET = tst_bench_qlocale
+CONFIG += benchmark
QT = core testlib
+TARGET = tst_bench_qlocale
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/text/qregexp/qregexp.pro b/tests/benchmarks/corelib/text/qregexp/qregexp.pro
index f64ae781a2..c04c13060b 100644
--- a/tests/benchmarks/corelib/text/qregexp/qregexp.pro
+++ b/tests/benchmarks/corelib/text/qregexp/qregexp.pro
@@ -1,8 +1,9 @@
TEMPLATE = app
-TARGET = tst_bench_qregexp
+CONFIG += benchmark
+CONFIG += exceptions
QT = core testlib
-CONFIG += release exceptions
+TARGET = tst_bench_qregexp
SOURCES += main.cpp
RESOURCES += qregexp.qrc
@@ -17,4 +18,3 @@ qtHaveModule(script):!pcre {
LIBS += -lboost_regex
}
}
-
diff --git a/tests/benchmarks/corelib/text/qstring/qstring.pro b/tests/benchmarks/corelib/text/qstring/qstring.pro
index 9f5e34b915..e25431b983 100644
--- a/tests/benchmarks/corelib/text/qstring/qstring.pro
+++ b/tests/benchmarks/corelib/text/qstring/qstring.pro
@@ -1,5 +1,6 @@
-TARGET = tst_bench_qstring
+CONFIG += benchmark
QT -= gui
QT += core testlib
-SOURCES += main.cpp
+TARGET = tst_bench_qstring
+SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/text/qstringbuilder/qstringbuilder.pro b/tests/benchmarks/corelib/text/qstringbuilder/qstringbuilder.pro
index fa4cbe3c13..91421b3b2c 100644
--- a/tests/benchmarks/corelib/text/qstringbuilder/qstringbuilder.pro
+++ b/tests/benchmarks/corelib/text/qstringbuilder/qstringbuilder.pro
@@ -1,11 +1,9 @@
TEMPLATE = app
-TARGET = tst_bench_qstringbuilder
+CONFIG += benchmark
+QT = core testlib
QMAKE_CXXFLAGS += -g
QMAKE_CFLAGS += -g
-QT = core testlib
-
-CONFIG += release
-
-SOURCES += main.cpp
+TARGET = tst_bench_qstringbuilder
+SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro b/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro
index 2e7ae058f7..a27bf0a6ab 100644
--- a/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro
+++ b/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro
@@ -1,6 +1,5 @@
-TARGET = tst_bench_qstringlist
-CONFIG -= debug
-CONFIG += release
CONFIG += benchmark
QT = core testlib
+
+TARGET = tst_bench_qstringlist
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/thread/qmutex/qmutex.pro b/tests/benchmarks/corelib/thread/qmutex/qmutex.pro
index ec87f60919..a0b2ddeaa9 100644
--- a/tests/benchmarks/corelib/thread/qmutex/qmutex.pro
+++ b/tests/benchmarks/corelib/thread/qmutex/qmutex.pro
@@ -1,5 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_qmutex
+CONFIG += benchmark
QT = core testlib
-SOURCES += tst_qmutex.cpp
+TARGET = tst_bench_qmutex
+SOURCES += tst_qmutex.cpp
diff --git a/tests/benchmarks/corelib/thread/qreadwritelock/qreadwritelock.pro b/tests/benchmarks/corelib/thread/qreadwritelock/qreadwritelock.pro
index a1827d0276..7c36067cb7 100644
--- a/tests/benchmarks/corelib/thread/qreadwritelock/qreadwritelock.pro
+++ b/tests/benchmarks/corelib/thread/qreadwritelock/qreadwritelock.pro
@@ -1,7 +1,8 @@
TEMPLATE = app
-TARGET = tst_bench_qreadwritelock
-QT = core-private testlib
-SOURCES += tst_qreadwritelock.cpp
+CONFIG += benchmark
CONFIG += c++14 # for std::shared_timed_mutex
CONFIG += c++1z # for std::shared_mutex
+QT = core-private testlib
+TARGET = tst_bench_qreadwritelock
+SOURCES += tst_qreadwritelock.cpp
diff --git a/tests/benchmarks/corelib/thread/qthreadpool/qthreadpool.pro b/tests/benchmarks/corelib/thread/qthreadpool/qthreadpool.pro
index 47e16e8b4d..303b3cef69 100644
--- a/tests/benchmarks/corelib/thread/qthreadpool/qthreadpool.pro
+++ b/tests/benchmarks/corelib/thread/qthreadpool/qthreadpool.pro
@@ -1,5 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_qthreadpool
+CONFIG += benchmark
+QT = core testlib
+TARGET = tst_bench_qthreadpool
SOURCES += tst_qthreadpool.cpp
-QT = core testlib
diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro b/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro
index 95afc951bc..3f62c4eb3c 100644
--- a/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro
+++ b/tests/benchmarks/corelib/thread/qthreadstorage/qthreadstorage.pro
@@ -1,5 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_qthreadstorage
+CONFIG += benchmark
+QT = core testlib
+TARGET = tst_bench_qthreadstorage
SOURCES += tst_qthreadstorage.cpp
-QT = core testlib
diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro b/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro
index 43c7921a93..cc801bdc13 100644
--- a/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro
+++ b/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro
@@ -1,4 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_qwaitcondition
+CONFIG += benchmark
QT = core testlib
+
+TARGET = tst_bench_qwaitcondition
SOURCES += tst_qwaitcondition.cpp
diff --git a/tests/benchmarks/corelib/time/qdate/qdate.pro b/tests/benchmarks/corelib/time/qdate/qdate.pro
index a655917135..ecb229dfda 100644
--- a/tests/benchmarks/corelib/time/qdate/qdate.pro
+++ b/tests/benchmarks/corelib/time/qdate/qdate.pro
@@ -1,4 +1,5 @@
-TARGET = tst_bench_qdate
+CONFIG += benchmark
QT = core testlib
+TARGET = tst_bench_qdate
SOURCES += tst_bench_qdate.cpp
diff --git a/tests/benchmarks/corelib/time/qdatetime/qdatetime.pro b/tests/benchmarks/corelib/time/qdatetime/qdatetime.pro
index a85e7346c6..7133834ffc 100644
--- a/tests/benchmarks/corelib/time/qdatetime/qdatetime.pro
+++ b/tests/benchmarks/corelib/time/qdatetime/qdatetime.pro
@@ -1,4 +1,5 @@
-TARGET = tst_bench_qdatetime
+CONFIG += benchmark
QT = core testlib
+TARGET = tst_bench_qdatetime
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/time/qtimezone/qtimezone.pro b/tests/benchmarks/corelib/time/qtimezone/qtimezone.pro
index d0531b568b..6ebee0faf3 100644
--- a/tests/benchmarks/corelib/time/qtimezone/qtimezone.pro
+++ b/tests/benchmarks/corelib/time/qtimezone/qtimezone.pro
@@ -1,4 +1,5 @@
-TARGET = tst_bench_qtimezone
+CONFIG += benchmark
QT = core testlib
+TARGET = tst_bench_qtimezone
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro b/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro
index 49edcbee70..89da01b02e 100644
--- a/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro
+++ b/tests/benchmarks/corelib/tools/containers-associative/containers-associative.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_containers-associative
-
+CONFIG += benchmark
QT = core testlib
+TARGET = tst_bench_containers-associative
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro b/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro
index 6f731cb6d8..509da95d22 100644
--- a/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro
+++ b/tests/benchmarks/corelib/tools/containers-sequential/containers-sequential.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_containers-sequential
-
+CONFIG += benchmark
QT = core testlib
+TARGET = tst_bench_containers-sequential
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro
index f54f8320d4..0bde3ac66a 100644
--- a/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro
+++ b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro
@@ -1,3 +1,5 @@
-TARGET = tst_bench_qalgorithms
+CONFIG += benchmark
QT = core testlib
+
+TARGET = tst_bench_qalgorithms
SOURCES = tst_qalgorithms.cpp
diff --git a/tests/benchmarks/corelib/tools/qcontiguouscache/qcontiguouscache.pro b/tests/benchmarks/corelib/tools/qcontiguouscache/qcontiguouscache.pro
index fe74dafef4..59adad6bbc 100644
--- a/tests/benchmarks/corelib/tools/qcontiguouscache/qcontiguouscache.pro
+++ b/tests/benchmarks/corelib/tools/qcontiguouscache/qcontiguouscache.pro
@@ -1,7 +1,6 @@
-TARGET = tst_bench_qcontiguouscache
-
-SOURCES += main.cpp
-
+CONFIG += benchmark
CONFIG += parallel_test
-
QT = core testlib
+
+TARGET = tst_bench_qcontiguouscache
+SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro b/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro
index cf9d640f7e..025c70c2d9 100644
--- a/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro
+++ b/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro
@@ -1,5 +1,6 @@
-TARGET = tst_bench_qcryptographichash
-CONFIG -= debug
-CONFIG += release cmdline
+CONFIG += benchmark
+CONFIG += cmdline
QT = core testlib
+
+TARGET = tst_bench_qcryptographichash
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/tools/qhash/qhash.pro b/tests/benchmarks/corelib/tools/qhash/qhash.pro
index 40f661c116..f9a873d096 100644
--- a/tests/benchmarks/corelib/tools/qhash/qhash.pro
+++ b/tests/benchmarks/corelib/tools/qhash/qhash.pro
@@ -1,5 +1,6 @@
-TARGET = tst_hash
+CONFIG += benchmark
QT = core testlib
+
INCLUDEPATH += .
+TARGET = tst_hash
SOURCES += main.cpp outofline.cpp
-CONFIG += release
diff --git a/tests/benchmarks/corelib/tools/qlist/qlist.pro b/tests/benchmarks/corelib/tools/qlist/qlist.pro
index c83bc455d2..98767c3250 100644
--- a/tests/benchmarks/corelib/tools/qlist/qlist.pro
+++ b/tests/benchmarks/corelib/tools/qlist/qlist.pro
@@ -1,4 +1,5 @@
-TARGET = tst_bench_qlist
+CONFIG += benchmark
QT = core testlib
+TARGET = tst_bench_qlist
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/tools/qmap/qmap.pro b/tests/benchmarks/corelib/tools/qmap/qmap.pro
index 6c9bf5e8d6..0e06493c79 100644
--- a/tests/benchmarks/corelib/tools/qmap/qmap.pro
+++ b/tests/benchmarks/corelib/tools/qmap/qmap.pro
@@ -1,5 +1,6 @@
-TARGET = tst_bench_qmap
+CONFIG += benchmark
QT = core testlib
+
INCLUDEPATH += .
+TARGET = tst_bench_qmap
SOURCES += main.cpp
-CONFIG += release
diff --git a/tests/benchmarks/corelib/tools/qrect/qrect.pro b/tests/benchmarks/corelib/tools/qrect/qrect.pro
index 42cfcd8924..211cdc5bcc 100644
--- a/tests/benchmarks/corelib/tools/qrect/qrect.pro
+++ b/tests/benchmarks/corelib/tools/qrect/qrect.pro
@@ -1,7 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_qrect
-
QT = core testlib
-CONFIG += release
+CONFIG += benchmark
+TARGET = tst_bench_qrect
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/tools/qringbuffer/qringbuffer.pro b/tests/benchmarks/corelib/tools/qringbuffer/qringbuffer.pro
index 21b50e10e5..69750865b5 100644
--- a/tests/benchmarks/corelib/tools/qringbuffer/qringbuffer.pro
+++ b/tests/benchmarks/corelib/tools/qringbuffer/qringbuffer.pro
@@ -1,7 +1,6 @@
TEMPLATE = app
-TARGET = tst_bench_qringbuffer
-
+CONFIG += benchmark
QT = core-private testlib
-CONFIG += release
+TARGET = tst_bench_qringbuffer
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/tools/qset/qset.pro b/tests/benchmarks/corelib/tools/qset/qset.pro
index 8fb8bcfa0b..e448683e94 100644
--- a/tests/benchmarks/corelib/tools/qset/qset.pro
+++ b/tests/benchmarks/corelib/tools/qset/qset.pro
@@ -1,4 +1,5 @@
-TARGET = tst_qset
+CONFIG += benchmark
QT = core testlib
+
+TARGET = tst_qset
SOURCES += main.cpp
-CONFIG += release
diff --git a/tests/benchmarks/corelib/tools/qstack/qstack.pro b/tests/benchmarks/corelib/tools/qstack/qstack.pro
index 7d8a839610..17b7ebd486 100644
--- a/tests/benchmarks/corelib/tools/qstack/qstack.pro
+++ b/tests/benchmarks/corelib/tools/qstack/qstack.pro
@@ -1,4 +1,5 @@
-TARGET = tst_bench_stack
+CONFIG += benchmark
QT = core testlib core-private
+
+TARGET = tst_bench_stack
SOURCES += main.cpp
-CONFIG += release
diff --git a/tests/benchmarks/corelib/tools/qvector/qvector.pro b/tests/benchmarks/corelib/tools/qvector/qvector.pro
index 24a65d8ee8..fce8a6cd78 100644
--- a/tests/benchmarks/corelib/tools/qvector/qvector.pro
+++ b/tests/benchmarks/corelib/tools/qvector/qvector.pro
@@ -1,5 +1,6 @@
-TARGET = tst_bench_vector
+CONFIG += benchmark
QT = core testlib core-private
+
INCLUDEPATH += .
-SOURCES += main.cpp outofline.cpp
-CONFIG += release
+TARGET = tst_bench_vector
+SOURCES += main.cpp outofline.cpp