diff options
Diffstat (limited to 'tests/benchmarks')
161 files changed, 2658 insertions, 152 deletions
diff --git a/tests/benchmarks/CMakeLists.txt b/tests/benchmarks/CMakeLists.txt new file mode 100644 index 0000000000..a59ba35e50 --- /dev/null +++ b/tests/benchmarks/CMakeLists.txt @@ -0,0 +1,19 @@ +# Generated from benchmarks.pro. + +add_subdirectory(corelib) +add_subdirectory(sql) +if(TARGET Qt::DBus) + add_subdirectory(dbus) +endif() +if(TARGET Qt::Gui) + add_subdirectory(gui) +endif() +if(TARGET Qt::Network) + add_subdirectory(network) +endif() +if(TARGET Qt::Test) + add_subdirectory(testlib) +endif() +if(TARGET Qt::Widgets) + add_subdirectory(widgets) +endif() diff --git a/tests/benchmarks/corelib/CMakeLists.txt b/tests/benchmarks/corelib/CMakeLists.txt new file mode 100644 index 0000000000..3414c39ef8 --- /dev/null +++ b/tests/benchmarks/corelib/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from corelib.pro. + +add_subdirectory(io) +add_subdirectory(json) +add_subdirectory(mimetypes) +add_subdirectory(kernel) +add_subdirectory(text) +add_subdirectory(thread) +add_subdirectory(time) +add_subdirectory(tools) +add_subdirectory(codecs) +add_subdirectory(plugin) diff --git a/tests/benchmarks/corelib/codecs/CMakeLists.txt b/tests/benchmarks/corelib/codecs/CMakeLists.txt new file mode 100644 index 0000000000..56f8edcc9e --- /dev/null +++ b/tests/benchmarks/corelib/codecs/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from codecs.pro. + +add_subdirectory(qtextcodec) diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt b/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt new file mode 100644 index 0000000000..ea6ed8519b --- /dev/null +++ b/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qtextcodec.pro. + +##################################################################### +## tst_bench_qtextcodec Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtextcodec + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qtextcodec.pro:<TRUE>: +# TESTDATA = "utf-8.txt" diff --git a/tests/benchmarks/corelib/io/CMakeLists.txt b/tests/benchmarks/corelib/io/CMakeLists.txt new file mode 100644 index 0000000000..3419c4a28c --- /dev/null +++ b/tests/benchmarks/corelib/io/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from io.pro. + +add_subdirectory(qdir) +add_subdirectory(qdiriterator) +add_subdirectory(qfile) +add_subdirectory(qfileinfo) +add_subdirectory(qiodevice) +add_subdirectory(qtemporaryfile) +add_subdirectory(qtextstream) +if(QT_FEATURE_process) + add_subdirectory(qprocess) +endif() diff --git a/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt b/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt index bcb10365fa..51f603b595 100644 --- a/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt +++ b/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_qdir_10000 SOURCES bench_qdir_10000.cpp) +# Generated from 10000.pro. + +##################################################################### +## tst_bench_qdir_10000 Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qdir_10000 + SOURCES + bench_qdir_10000.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:10000.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qdir/CMakeLists.txt b/tests/benchmarks/corelib/io/qdir/CMakeLists.txt new file mode 100644 index 0000000000..10185014fa --- /dev/null +++ b/tests/benchmarks/corelib/io/qdir/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from qdir.pro. + +add_subdirectory(10000) diff --git a/tests/benchmarks/corelib/io/qdir/tree/CMakeLists.txt b/tests/benchmarks/corelib/io/qdir/tree/CMakeLists.txt new file mode 100644 index 0000000000..e3102a3389 --- /dev/null +++ b/tests/benchmarks/corelib/io/qdir/tree/CMakeLists.txt @@ -0,0 +1,28 @@ +# Generated from tree.pro. + +##################################################################### +## bench_qdir_tree Binary: +##################################################################### + +add_qt_benchmark(bench_qdir_tree + SOURCES + bench_qdir_tree.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +# Resources: +set(bench_qdir_tree_resource_files + "4.6.0-list.txt" +) + +add_qt_resource(bench_qdir_tree "bench_qdir_tree" + PREFIX + "/" + FILES + ${bench_qdir_tree_resource_files} +) + + +#### Keys ignored in scope 1:.:.:tree.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qdiriterator/CMakeLists.txt b/tests/benchmarks/corelib/io/qdiriterator/CMakeLists.txt new file mode 100644 index 0000000000..b1e86861b6 --- /dev/null +++ b/tests/benchmarks/corelib/io/qdiriterator/CMakeLists.txt @@ -0,0 +1,21 @@ +# Generated from qdiriterator.pro. + +##################################################################### +## tst_bench_qdiriterator Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qdiriterator + SOURCES + main.cpp + qfilesystemiterator.cpp qfilesystemiterator.h + PUBLIC_LIBRARIES + Qt::Test +) + +## Scopes: +##################################################################### + +extend_target(tst_bench_qdiriterator CONDITION (QT_FEATURE_cxx17_filesystem) AND (GCC AND (QMAKE_GCC_MAJOR_VERSION LESS 9)) + LINK_OPTIONS + "-lstdc++fs" +) diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp index eae752d99a..5b10a4a689 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp +++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp @@ -44,9 +44,15 @@ #include "qfilesystemiterator.h" +#if QT_CONFIG(cxx17_filesystem) +#include <filesystem> +#endif + class tst_qdiriterator : public QObject { Q_OBJECT + + void data(); private slots: void posix(); void posix_data() { data(); } @@ -54,7 +60,8 @@ private slots: void diriterator_data() { data(); } void fsiterator(); void fsiterator_data() { data(); } - void data(); + void stdRecursiveDirectoryIterator(); + void stdRecursiveDirectoryIterator_data() { data(); } }; @@ -235,6 +242,28 @@ void tst_qdiriterator::fsiterator() qDebug() << count; } +void tst_qdiriterator::stdRecursiveDirectoryIterator() +{ +#if QT_CONFIG(cxx17_filesystem) + QFETCH(QByteArray, dirpath); + + int count = 0; + + QBENCHMARK { + int c = 0; + for (auto obj : std::filesystem::recursive_directory_iterator(dirpath.data())) { + if (obj.is_directory()) + continue; + c++; + } + count = c; + } + qDebug() << count; +#else + QSKIP("Not supported."); +#endif +} + QTEST_MAIN(tst_qdiriterator) #include "main.moc" diff --git a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro index 061b22a5d1..609a578321 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro +++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro @@ -3,6 +3,12 @@ TARGET = tst_bench_qdiriterator QT = core testlib CONFIG += release +# Enable c++17 support for std::filesystem +qtConfig(cxx17_filesystem) { + CONFIG += c++17 + gcc:lessThan(QMAKE_GCC_MAJOR_VERSION, 9): \ + QMAKE_LFLAGS += -lstdc++fs +} SOURCES += main.cpp qfilesystemiterator.cpp HEADERS += qfilesystemiterator.h diff --git a/tests/benchmarks/corelib/io/qfile/CMakeLists.txt b/tests/benchmarks/corelib/io/qfile/CMakeLists.txt new file mode 100644 index 0000000000..7d1e19d75a --- /dev/null +++ b/tests/benchmarks/corelib/io/qfile/CMakeLists.txt @@ -0,0 +1,24 @@ +# Generated from qfile.pro. + +##################################################################### +## tst_bench_qfile Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qfile + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qfile.pro:<TRUE>: +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +extend_target(tst_bench_qfile CONDITION WIN32 + DEFINES + _CRT_SECURE_NO_WARNINGS +) diff --git a/tests/benchmarks/corelib/io/qfileinfo/CMakeLists.txt b/tests/benchmarks/corelib/io/qfileinfo/CMakeLists.txt new file mode 100644 index 0000000000..195419f52e --- /dev/null +++ b/tests/benchmarks/corelib/io/qfileinfo/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qfileinfo.pro. + +##################################################################### +## tst_bench_qfileinfo Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qfileinfo + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qfileinfo.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qiodevice/CMakeLists.txt b/tests/benchmarks/corelib/io/qiodevice/CMakeLists.txt new file mode 100644 index 0000000000..7663bdb99d --- /dev/null +++ b/tests/benchmarks/corelib/io/qiodevice/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qiodevice.pro. + +##################################################################### +## tst_bench_qiodevice Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qiodevice + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qiodevice.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qprocess/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/CMakeLists.txt new file mode 100644 index 0000000000..d599539142 --- /dev/null +++ b/tests/benchmarks/corelib/io/qprocess/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from qprocess.pro. + +add_subdirectory(testProcessLoopback) +add_subdirectory(test) diff --git a/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt index a6c5ceebd3..00bbe74c2d 100644 --- a/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt +++ b/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt @@ -1,5 +1,13 @@ -add_qt_test(../tst_bench_qprocess SOURCES +# Generated from test.pro. + +##################################################################### +## tst_bench_qprocess Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qprocess + SOURCES ../tst_bench_qprocess.cpp - LIBRARIES + PUBLIC_LIBRARIES Qt::CorePrivate + Qt::Test ) diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt new file mode 100644 index 0000000000..44b18a4826 --- /dev/null +++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt @@ -0,0 +1,21 @@ +# Generated from testProcessLoopback.pro. + +##################################################################### +## testProcessLoopback Binary: +##################################################################### + +add_qt_benchmark(testProcessLoopback + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui +) + +## Scopes: +##################################################################### + +extend_target(testProcessLoopback CONDITION WINRT + LINK_OPTIONS + "/ENTRY:mainCRTStartup" +) diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/CMakeLists.txt b/tests/benchmarks/corelib/io/qtemporaryfile/CMakeLists.txt new file mode 100644 index 0000000000..82b885bb17 --- /dev/null +++ b/tests/benchmarks/corelib/io/qtemporaryfile/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qtemporaryfile.pro. + +##################################################################### +## tst_bench_qtemporaryfile Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtemporaryfile + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qtemporaryfile.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qtextstream/CMakeLists.txt b/tests/benchmarks/corelib/io/qtextstream/CMakeLists.txt new file mode 100644 index 0000000000..6dd11f1bbb --- /dev/null +++ b/tests/benchmarks/corelib/io/qtextstream/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qtextstream.pro. + +##################################################################### +## tst_bench_qtextstream Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtextstream + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qtextstream.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qurl/CMakeLists.txt b/tests/benchmarks/corelib/io/qurl/CMakeLists.txt new file mode 100644 index 0000000000..26d98b7eb4 --- /dev/null +++ b/tests/benchmarks/corelib/io/qurl/CMakeLists.txt @@ -0,0 +1,23 @@ +# Generated from qurl.pro. + +##################################################################### +## tst_qurl Binary: +##################################################################### + +add_qt_benchmark(tst_qurl + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qurl.pro:<TRUE>: +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +extend_target(tst_qurl CONDITION WIN32 + DEFINES + _CRT_SECURE_NO_WARNINGS +) diff --git a/tests/benchmarks/corelib/json/CMakeLists.txt b/tests/benchmarks/corelib/json/CMakeLists.txt new file mode 100644 index 0000000000..312cae8a45 --- /dev/null +++ b/tests/benchmarks/corelib/json/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from json.pro. + +##################################################################### +## tst_bench_qtbinaryjson Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtbinaryjson + SOURCES + tst_bench_qtbinaryjson.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:json.pro:<TRUE>: +# TESTDATA = "numbers.json" "test.json" diff --git a/tests/benchmarks/corelib/kernel/CMakeLists.txt b/tests/benchmarks/corelib/kernel/CMakeLists.txt new file mode 100644 index 0000000000..2b41ea30f7 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/CMakeLists.txt @@ -0,0 +1,11 @@ +# Generated from kernel.pro. + +add_subdirectory(events) +add_subdirectory(qmetatype) +add_subdirectory(qvariant) +add_subdirectory(qcoreapplication) +add_subdirectory(qtimer_vs_qmetaobject) +if(TARGET Qt::Widgets) + add_subdirectory(qmetaobject) + add_subdirectory(qobject) +endif() diff --git a/tests/benchmarks/corelib/kernel/events/CMakeLists.txt b/tests/benchmarks/corelib/kernel/events/CMakeLists.txt index cabe71e3d6..1e35891126 100644 --- a/tests/benchmarks/corelib/kernel/events/CMakeLists.txt +++ b/tests/benchmarks/corelib/kernel/events/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_events SOURCES main.cpp) +# Generated from events.pro. + +##################################################################### +## tst_bench_events Binary: +##################################################################### + +add_qt_benchmark(tst_bench_events + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:events.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt index 55d68f0372..173b3b9077 100644 --- a/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt +++ b/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_qcoreapplication SOURCES main.cpp) +# Generated from qcoreapplication.pro. + +##################################################################### +## tst_bench_qcoreapplication Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qcoreapplication + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qcoreapplication.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qmetaobject/CMakeLists.txt new file mode 100644 index 0000000000..e6da0721d3 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qmetaobject/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qmetaobject.pro. + +##################################################################### +## tst_bench_qmetaobject Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmetaobject + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qmetaobject.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt index 6bbaeee1e0..00ca47aadc 100644 --- a/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt +++ b/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_qmetatype SOURCES tst_qmetatype.cpp) +# Generated from qmetatype.pro. + +##################################################################### +## tst_bench_qmetatype Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmetatype + SOURCES + tst_qmetatype.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qmetatype.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qobject/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qobject/CMakeLists.txt new file mode 100644 index 0000000000..4644708b54 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qobject/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qobject.pro. + +##################################################################### +## tst_bench_qobject Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qobject + SOURCES + main.cpp + object.cpp object.h + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qobject.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/.prev_CMakeLists.txt b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/.prev_CMakeLists.txt new file mode 100644 index 0000000000..4160fe7e36 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/.prev_CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qtimer_vs_qmetaobject.pro. + +##################################################################### +## qtimer_vs_qmetaobject Binary: +##################################################################### + +add_qt_benchmark(qtimer_vs_qmetaobject + SOURCES + tst_qtimer_vs_qmetaobject.cpp + INCLUDE_DIRECTORIES + . + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qtimer_vs_qmetaobject.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/CMakeLists.txt new file mode 100644 index 0000000000..c76c4dca18 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qtimer_vs_qmetaobject.pro. + +##################################################################### +## qtimer_vs_qmetaobject Binary: +##################################################################### + +add_qt_benchmark(qtimer_vs_qmetaobject + SOURCES + tst_qtimer_vs_qmetaobject.cpp + INCLUDE_DIRECTORIES + . + PUBLIC_LIBRARIES + Qt::Test + Threads::Threads # special case +) + +#### Keys ignored in scope 1:.:.:qtimer_vs_qmetaobject.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt new file mode 100644 index 0000000000..5e5230566d --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt @@ -0,0 +1,21 @@ +# Generated from qvariant.pro. + +##################################################################### +## tst_bench_qvariant Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qvariant + SOURCES + tst_qvariant.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test +) + +## Scopes: +##################################################################### + +extend_target(tst_bench_qvariant CONDITION NOT TARGET Qt::Gui + PUBLIC_LIBRARIES + # Remove: gui +) diff --git a/tests/benchmarks/corelib/mimetypes/CMakeLists.txt b/tests/benchmarks/corelib/mimetypes/CMakeLists.txt new file mode 100644 index 0000000000..c825780e69 --- /dev/null +++ b/tests/benchmarks/corelib/mimetypes/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from mimetypes.pro. + +add_subdirectory(qmimedatabase) diff --git a/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt b/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt index ec0cf48255..7d6b6dc4f8 100644 --- a/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt +++ b/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt @@ -1 +1,12 @@ -add_qt_test(tst_bench_qmimedatabase SOURCES main.cpp) +# Generated from qmimedatabase.pro. + +##################################################################### +## tst_bench_qmimedatabase Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmimedatabase + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/plugin/CMakeLists.txt b/tests/benchmarks/corelib/plugin/CMakeLists.txt new file mode 100644 index 0000000000..3ae12b23f5 --- /dev/null +++ b/tests/benchmarks/corelib/plugin/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from plugin.pro. + +add_subdirectory(quuid) diff --git a/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt b/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt index e334bcb68a..2251914957 100644 --- a/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt +++ b/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_quuid SOURCES tst_quuid.cpp) +# Generated from quuid.pro. + +##################################################################### +## tst_bench_quuid Binary: +##################################################################### + +add_qt_benchmark(tst_bench_quuid + SOURCES + tst_quuid.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:quuid.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/text/CMakeLists.txt b/tests/benchmarks/corelib/text/CMakeLists.txt new file mode 100644 index 0000000000..8319d1bf3b --- /dev/null +++ b/tests/benchmarks/corelib/text/CMakeLists.txt @@ -0,0 +1,10 @@ +# Generated from text.pro. + +add_subdirectory(qbytearray) +add_subdirectory(qchar) +add_subdirectory(qlocale) +add_subdirectory(qstringbuilder) +add_subdirectory(qstringlist) +if(GCC) + add_subdirectory(qstring) +endif() diff --git a/tests/benchmarks/corelib/text/qbytearray/CMakeLists.txt b/tests/benchmarks/corelib/text/qbytearray/CMakeLists.txt new file mode 100644 index 0000000000..9c7fae62eb --- /dev/null +++ b/tests/benchmarks/corelib/text/qbytearray/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qbytearray.pro. + +##################################################################### +## tst_bench_qbytearray Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qbytearray + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qbytearray.pro:<TRUE>: +# TEMPLATE = "app" +# TESTDATA = "main.cpp" diff --git a/tests/benchmarks/corelib/text/qchar/CMakeLists.txt b/tests/benchmarks/corelib/text/qchar/CMakeLists.txt new file mode 100644 index 0000000000..ba99813d2b --- /dev/null +++ b/tests/benchmarks/corelib/text/qchar/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qchar.pro. + +##################################################################### +## tst_bench_qchar Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qchar + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/text/qlocale/CMakeLists.txt b/tests/benchmarks/corelib/text/qlocale/CMakeLists.txt new file mode 100644 index 0000000000..7e67472013 --- /dev/null +++ b/tests/benchmarks/corelib/text/qlocale/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qlocale.pro. + +##################################################################### +## tst_bench_qlocale Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qlocale + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/text/qregexp/CMakeLists.txt b/tests/benchmarks/corelib/text/qregexp/CMakeLists.txt new file mode 100644 index 0000000000..e1dcd5c131 --- /dev/null +++ b/tests/benchmarks/corelib/text/qregexp/CMakeLists.txt @@ -0,0 +1,46 @@ +# Generated from qregexp.pro. + +##################################################################### +## tst_bench_qregexp Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qregexp + EXCEPTIONS + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +# Resources: +set(qregexp_resource_files + "main.cpp" +) + +add_qt_resource(tst_bench_qregexp "qregexp" + PREFIX + "/" + FILES + ${qregexp_resource_files} +) + + +#### Keys ignored in scope 1:.:.:qregexp.pro:<TRUE>: +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +extend_target(tst_bench_qregexp CONDITION TARGET Qt::Script AND NOT pcre + DEFINES + HAVE_JSC + PUBLIC_LIBRARIES + Qt::Script +) + +extend_target(tst_bench_qregexp CONDITION (NOT QNX) AND (EXISTS _ss_[QT_SYSROOT]/usr/include/boost/regex.hpp) + DEFINES + HAVE_BOOST + PUBLIC_LIBRARIES + boost_regex +) diff --git a/tests/benchmarks/corelib/text/qstring/CMakeLists.txt b/tests/benchmarks/corelib/text/qstring/CMakeLists.txt new file mode 100644 index 0000000000..2999cb4682 --- /dev/null +++ b/tests/benchmarks/corelib/text/qstring/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qstring.pro. + +##################################################################### +## tst_bench_qstring Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qstring + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/text/qstringbuilder/CMakeLists.txt b/tests/benchmarks/corelib/text/qstringbuilder/CMakeLists.txt new file mode 100644 index 0000000000..e326414d7a --- /dev/null +++ b/tests/benchmarks/corelib/text/qstringbuilder/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qstringbuilder.pro. + +##################################################################### +## tst_bench_qstringbuilder Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qstringbuilder + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test + COMPILE_OPTIONS + -g +) + +#### Keys ignored in scope 1:.:.:qstringbuilder.pro:<TRUE>: +# QMAKE_CFLAGS = "-g" +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/text/qstringlist/CMakeLists.txt b/tests/benchmarks/corelib/text/qstringlist/CMakeLists.txt new file mode 100644 index 0000000000..a341f1aaa8 --- /dev/null +++ b/tests/benchmarks/corelib/text/qstringlist/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qstringlist.pro. + +##################################################################### +## tst_bench_qstringlist Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qstringlist + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/text/qstringlist/main.cpp b/tests/benchmarks/corelib/text/qstringlist/main.cpp index ae355a8b89..9f184d0cf5 100644 --- a/tests/benchmarks/corelib/text/qstringlist/main.cpp +++ b/tests/benchmarks/corelib/text/qstringlist/main.cpp @@ -41,6 +41,9 @@ private slots: void join() const; void join_data() const; + void removeDuplicates() const; + void removeDuplicates_data() const; + void split_qlist_qbytearray() const; void split_qlist_qbytearray_data() const { return split_data(); } @@ -116,6 +119,42 @@ void tst_QStringList::join_data() const << QString(); } +void tst_QStringList::removeDuplicates() const +{ + QFETCH(const QStringList, input); + + QBENCHMARK { + auto copy = input; + copy.removeDuplicates(); + } +} + +void tst_QStringList::removeDuplicates_data() const +{ + QTest::addColumn<QStringList>("input"); + + const QStringList s = {"one", "two", "three"}; + + QTest::addRow("empty") << QStringList(); + QTest::addRow("short-dup-0.00") << s; + QTest::addRow("short-dup-0.50") << (s + s); + QTest::addRow("short-dup-0.66") << (s + s + s); + QTest::addRow("short-dup-0.75") << (s + s + s + s); + + const QStringList l = []() { + QStringList result; + const int n = 1000; + result.reserve(n); + for (int i = 0; i < n; ++i) + result.push_back(QString::number(i)); + return result; + }(); + QTest::addRow("long-dup-0.00") << l; + QTest::addRow("long-dup-0.50") << (l + l); + QTest::addRow("long-dup-0.66") << (l + l + l); + QTest::addRow("long-dup-0.75") << (l + l + l + l); +} + void tst_QStringList::split_data() const { QTest::addColumn<QString>("input"); diff --git a/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro b/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro index 5803e7da0e..2e7ae058f7 100644 --- a/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro +++ b/tests/benchmarks/corelib/text/qstringlist/qstringlist.pro @@ -1,5 +1,6 @@ TARGET = tst_bench_qstringlist CONFIG -= debug CONFIG += release +CONFIG += benchmark QT = core testlib SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/thread/CMakeLists.txt b/tests/benchmarks/corelib/thread/CMakeLists.txt new file mode 100644 index 0000000000..dc257262a3 --- /dev/null +++ b/tests/benchmarks/corelib/thread/CMakeLists.txt @@ -0,0 +1,7 @@ +# Generated from thread.pro. + +add_subdirectory(qmutex) +add_subdirectory(qreadwritelock) +add_subdirectory(qthreadstorage) +add_subdirectory(qthreadpool) +add_subdirectory(qwaitcondition) diff --git a/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt index aef0da2565..71226282ab 100644 --- a/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt +++ b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_qmutex SOURCES tst_qmutex.cpp) +# Generated from qmutex.pro. + +##################################################################### +## tst_bench_qmutex Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmutex + SOURCES + tst_qmutex.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qmutex.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt b/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt new file mode 100644 index 0000000000..d582dba8db --- /dev/null +++ b/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qreadwritelock.pro. + +##################################################################### +## tst_bench_qreadwritelock Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qreadwritelock + SOURCES + tst_qreadwritelock.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qreadwritelock.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp index 1d47d98657..8f8e8300a1 100644 --- a/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp +++ b/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp @@ -30,7 +30,7 @@ #include <QtTest/QtTest> #include <QtCore/private/qmemory_p.h> #include <mutex> -#if QT_HAS_INCLUDE(<shared_mutex>) +#if __has_include(<shared_mutex>) #if __cplusplus > 201103L #include <shared_mutex> #endif diff --git a/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt index 55b03b9ad9..00dbc9c298 100644 --- a/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt +++ b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_qthreadpool SOURCES tst_qthreadpool.cpp) +# Generated from qthreadpool.pro. + +##################################################################### +## tst_bench_qthreadpool Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qthreadpool + SOURCES + tst_qthreadpool.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qthreadpool.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt index 0797d99625..ed60ec4495 100644 --- a/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt +++ b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_qthreadstorage SOURCES tst_qthreadstorage.cpp) +# Generated from qthreadstorage.pro. + +##################################################################### +## tst_bench_qthreadstorage Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qthreadstorage + SOURCES + tst_qthreadstorage.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qthreadstorage.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt index 94c4391c84..4de82d7cc9 100644 --- a/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt +++ b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_qwaitcondition SOURCES tst_qwaitcondition.cpp) +# Generated from qwaitcondition.pro. + +##################################################################### +## tst_bench_qwaitcondition Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qwaitcondition + SOURCES + tst_qwaitcondition.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qwaitcondition.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/time/CMakeLists.txt b/tests/benchmarks/corelib/time/CMakeLists.txt new file mode 100644 index 0000000000..086650edb6 --- /dev/null +++ b/tests/benchmarks/corelib/time/CMakeLists.txt @@ -0,0 +1,5 @@ +# Generated from time.pro. + +add_subdirectory(qdate) +add_subdirectory(qdatetime) +add_subdirectory(qtimezone) diff --git a/tests/benchmarks/corelib/time/qdate/CMakeLists.txt b/tests/benchmarks/corelib/time/qdate/CMakeLists.txt new file mode 100644 index 0000000000..7ae18a42f5 --- /dev/null +++ b/tests/benchmarks/corelib/time/qdate/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdate.pro. + +##################################################################### +## tst_bench_qdate Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qdate + SOURCES + tst_bench_qdate.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/time/qdatetime/CMakeLists.txt b/tests/benchmarks/corelib/time/qdatetime/CMakeLists.txt new file mode 100644 index 0000000000..b44f1a5bfc --- /dev/null +++ b/tests/benchmarks/corelib/time/qdatetime/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdatetime.pro. + +##################################################################### +## tst_bench_qdatetime Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qdatetime + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/time/qtimezone/CMakeLists.txt b/tests/benchmarks/corelib/time/qtimezone/CMakeLists.txt new file mode 100644 index 0000000000..60e8ceba13 --- /dev/null +++ b/tests/benchmarks/corelib/time/qtimezone/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qtimezone.pro. + +##################################################################### +## tst_bench_qtimezone Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtimezone + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/CMakeLists.txt b/tests/benchmarks/corelib/tools/CMakeLists.txt new file mode 100644 index 0000000000..6aed3d0f90 --- /dev/null +++ b/tests/benchmarks/corelib/tools/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from tools.pro. + +add_subdirectory(containers-associative) +add_subdirectory(containers-sequential) +add_subdirectory(qcontiguouscache) +add_subdirectory(qcryptographichash) +add_subdirectory(qlist) +add_subdirectory(qmap) +add_subdirectory(qrect) +add_subdirectory(qringbuffer) +add_subdirectory(qstack) +add_subdirectory(qvector) +add_subdirectory(qalgorithms) diff --git a/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt b/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt index 7495677c0a..0e2dace380 100644 --- a/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt +++ b/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_containers-associative SOURCES main.cpp) +# Generated from containers-associative.pro. + +##################################################################### +## tst_bench_containers-associative Binary: +##################################################################### + +add_qt_benchmark(tst_bench_containers-associative + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:containers-associative.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt b/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt index 6a22402a46..40f455752e 100644 --- a/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt +++ b/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt @@ -1 +1,15 @@ -add_qt_test(tst_bench_containers-sequential SOURCES main.cpp) +# Generated from containers-sequential.pro. + +##################################################################### +## tst_bench_containers-sequential Binary: +##################################################################### + +add_qt_benchmark(tst_bench_containers-sequential + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:containers-sequential.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt b/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt index 6cfb746934..99c6a7061d 100644 --- a/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt +++ b/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt @@ -1 +1,12 @@ -add_qt_test(tst_bench_qalgorithms SOURCES tst_qalgorithms.cpp) +# Generated from qalgorithms.pro. + +##################################################################### +## tst_bench_qalgorithms Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qalgorithms + SOURCES + tst_qalgorithms.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qcontiguouscache/CMakeLists.txt b/tests/benchmarks/corelib/tools/qcontiguouscache/CMakeLists.txt new file mode 100644 index 0000000000..126c0e7a50 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qcontiguouscache/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qcontiguouscache.pro. + +##################################################################### +## tst_bench_qcontiguouscache Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qcontiguouscache + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qcryptographichash/CMakeLists.txt b/tests/benchmarks/corelib/tools/qcryptographichash/CMakeLists.txt new file mode 100644 index 0000000000..1400027c1f --- /dev/null +++ b/tests/benchmarks/corelib/tools/qcryptographichash/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qcryptographichash.pro. + +##################################################################### +## tst_bench_qcryptographichash Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qcryptographichash + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt b/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt new file mode 100644 index 0000000000..5b3a0fe5f5 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qhash.pro. + +##################################################################### +## tst_hash Binary: +##################################################################### + +add_qt_benchmark(tst_hash + SOURCES + main.cpp + outofline.cpp + INCLUDE_DIRECTORIES + . + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt b/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt index 6e7dec7dfe..ba40760910 100644 --- a/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt +++ b/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt @@ -1 +1,12 @@ -add_qt_test(tst_bench_qlist SOURCES main.cpp) +# Generated from qlist.pro. + +##################################################################### +## tst_bench_qlist Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qlist + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qmap/CMakeLists.txt b/tests/benchmarks/corelib/tools/qmap/CMakeLists.txt new file mode 100644 index 0000000000..a98c7d7157 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qmap/CMakeLists.txt @@ -0,0 +1,14 @@ +# Generated from qmap.pro. + +##################################################################### +## tst_bench_qmap Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmap + SOURCES + main.cpp + INCLUDE_DIRECTORIES + . + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qmap/main.cpp b/tests/benchmarks/corelib/tools/qmap/main.cpp index ce415212e4..50cc853df6 100644 --- a/tests/benchmarks/corelib/tools/qmap/main.cpp +++ b/tests/benchmarks/corelib/tools/qmap/main.cpp @@ -59,6 +59,8 @@ private slots: void insertion_string_int2(); void insertion_string_int2_hint(); + + void insertMap(); }; @@ -269,6 +271,19 @@ void tst_QMap::insertion_string_int2_hint() } } +void tst_QMap::insertMap() +{ + QMap<int, int> map; + for (int i = 0; i < 100000; ++i) + map.insert(i * 4, 0); + QMap<int, int> map2; + for (int i = 0; i < 50000; ++i) + map2.insert(i * 7, 0); + QBENCHMARK_ONCE { + map.insert(map2); + } +} + QTEST_MAIN(tst_QMap) #include "main.moc" diff --git a/tests/benchmarks/corelib/tools/qrect/CMakeLists.txt b/tests/benchmarks/corelib/tools/qrect/CMakeLists.txt new file mode 100644 index 0000000000..4218092a88 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qrect/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qrect.pro. + +##################################################################### +## tst_bench_qrect Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qrect + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qrect.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/tools/qringbuffer/CMakeLists.txt b/tests/benchmarks/corelib/tools/qringbuffer/CMakeLists.txt new file mode 100644 index 0000000000..e0323b90db --- /dev/null +++ b/tests/benchmarks/corelib/tools/qringbuffer/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qringbuffer.pro. + +##################################################################### +## tst_bench_qringbuffer Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qringbuffer + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qringbuffer.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/tools/qset/CMakeLists.txt b/tests/benchmarks/corelib/tools/qset/CMakeLists.txt new file mode 100644 index 0000000000..40ee622f89 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qset/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qset.pro. + +##################################################################### +## tst_qset Binary: +##################################################################### + +add_qt_benchmark(tst_qset + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qstack/CMakeLists.txt b/tests/benchmarks/corelib/tools/qstack/CMakeLists.txt new file mode 100644 index 0000000000..530d55b19b --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstack/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from qstack.pro. + +##################################################################### +## tst_bench_stack Binary: +##################################################################### + +add_qt_benchmark(tst_bench_stack + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qvector/CMakeLists.txt b/tests/benchmarks/corelib/tools/qvector/CMakeLists.txt new file mode 100644 index 0000000000..0cc9b24236 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qvector/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qvector.pro. + +##################################################################### +## tst_bench_vector Binary: +##################################################################### + +add_qt_benchmark(tst_bench_vector + SOURCES + main.cpp + outofline.cpp + INCLUDE_DIRECTORIES + . + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h index 16a911c63a..9ad5f771bd 100644 --- a/tests/benchmarks/corelib/tools/qvector/qrawvector.h +++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h @@ -130,78 +130,9 @@ public: bool contains(const T &t) const; int count(const T &t) const; -#ifdef QT_STRICT_ITERATORS - class iterator { - public: - T *i; - typedef std::random_access_iterator_tag iterator_category; - typedef ptrdiff_t difference_type; - typedef T value_type; - typedef T *pointer; - typedef T &reference; - - inline iterator() : i(0) {} - inline iterator(T *n) : i(n) {} - inline iterator(const iterator &o): i(o.i){} - inline T &operator*() const { return *i; } - inline T *operator->() const { return i; } - inline T &operator[](int j) const { return *(i + j); } - inline bool operator==(const iterator &o) const { return i == o.i; } - inline bool operator!=(const iterator &o) const { return i != o.i; } - inline bool operator<(const iterator& other) const { return i < other.i; } - inline bool operator<=(const iterator& other) const { return i <= other.i; } - inline bool operator>(const iterator& other) const { return i > other.i; } - inline bool operator>=(const iterator& other) const { return i >= other.i; } - inline iterator &operator++() { ++i; return *this; } - inline iterator operator++(int) { T *n = i; ++i; return n; } - inline iterator &operator--() { i--; return *this; } - inline iterator operator--(int) { T *n = i; i--; return n; } - inline iterator &operator+=(int j) { i+=j; return *this; } - inline iterator &operator-=(int j) { i-=j; return *this; } - inline iterator operator+(int j) const { return iterator(i+j); } - inline iterator operator-(int j) const { return iterator(i-j); } - inline int operator-(iterator j) const { return i - j.i; } - }; - friend class iterator; - - class const_iterator { - public: - T *i; - typedef std::random_access_iterator_tag iterator_category; - typedef ptrdiff_t difference_type; - typedef T value_type; - typedef const T *pointer; - typedef const T &reference; - - inline const_iterator() : i(0) {} - inline const_iterator(T *n) : i(n) {} - inline const_iterator(const const_iterator &o): i(o.i) {} - inline explicit const_iterator(const iterator &o): i(o.i) {} - inline const T &operator*() const { return *i; } - inline const T *operator->() const { return i; } - inline const T &operator[](int j) const { return *(i + j); } - inline bool operator==(const const_iterator &o) const { return i == o.i; } - inline bool operator!=(const const_iterator &o) const { return i != o.i; } - inline bool operator<(const const_iterator& other) const { return i < other.i; } - inline bool operator<=(const const_iterator& other) const { return i <= other.i; } - inline bool operator>(const const_iterator& other) const { return i > other.i; } - inline bool operator>=(const const_iterator& other) const { return i >= other.i; } - inline const_iterator &operator++() { ++i; return *this; } - inline const_iterator operator++(int) { T *n = i; ++i; return n; } - inline const_iterator &operator--() { i--; return *this; } - inline const_iterator operator--(int) { T *n = i; i--; return n; } - inline const_iterator &operator+=(int j) { i+=j; return *this; } - inline const_iterator &operator-=(int j) { i+=j; return *this; } - inline const_iterator operator+(int j) const { return const_iterator(i+j); } - inline const_iterator operator-(int j) const { return const_iterator(i-j); } - inline int operator-(const_iterator j) const { return i - j.i; } - }; - friend class const_iterator; -#else // STL-style typedef T *iterator; typedef const T *const_iterator; -#endif inline iterator begin() { return m_begin; } inline const_iterator begin() const { return m_begin; } inline const_iterator constBegin() const { return m_begin; } @@ -280,11 +211,7 @@ private: } static Q_DECL_CONSTEXPR int alignOfTypedData() { -#ifdef Q_ALIGNOF - return Q_ALIGNOF(AlignmentDummy); -#else - return sizeof(void *); -#endif + return alignof(AlignmentDummy); } public: diff --git a/tests/benchmarks/dbus/CMakeLists.txt b/tests/benchmarks/dbus/CMakeLists.txt new file mode 100644 index 0000000000..cd246922a1 --- /dev/null +++ b/tests/benchmarks/dbus/CMakeLists.txt @@ -0,0 +1,6 @@ +# Generated from dbus.pro. + +add_subdirectory(qdbustype) +if(QT_FEATURE_process) + add_subdirectory(qdbusperformance) +endif() diff --git a/tests/benchmarks/dbus/qdbusperformance/CMakeLists.txt b/tests/benchmarks/dbus/qdbusperformance/CMakeLists.txt new file mode 100644 index 0000000000..5d79f36090 --- /dev/null +++ b/tests/benchmarks/dbus/qdbusperformance/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from qdbusperformance.pro. + +add_subdirectory(server) +add_subdirectory(test) diff --git a/tests/benchmarks/dbus/qdbusperformance/server/CMakeLists.txt b/tests/benchmarks/dbus/qdbusperformance/server/CMakeLists.txt new file mode 100644 index 0000000000..a3b5e98d4a --- /dev/null +++ b/tests/benchmarks/dbus/qdbusperformance/server/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from server.pro. + +##################################################################### +## server Binary: +##################################################################### + +add_qt_benchmark(server + GUI + OUTPUT_DIRECTORY "." + SOURCES + ../serverobject.h + server.cpp + PUBLIC_LIBRARIES + Qt::DBus +) diff --git a/tests/benchmarks/dbus/qdbusperformance/test/CMakeLists.txt b/tests/benchmarks/dbus/qdbusperformance/test/CMakeLists.txt new file mode 100644 index 0000000000..dadca9412c --- /dev/null +++ b/tests/benchmarks/dbus/qdbusperformance/test/CMakeLists.txt @@ -0,0 +1,14 @@ +# Generated from test.pro. + +##################################################################### +## tst_qdbusperformance Binary: +##################################################################### + +add_qt_benchmark(tst_qdbusperformance + SOURCES + ../serverobject.h + ../tst_qdbusperformance.cpp + PUBLIC_LIBRARIES + Qt::DBus + Qt::Test +) diff --git a/tests/benchmarks/dbus/qdbustype/CMakeLists.txt b/tests/benchmarks/dbus/qdbustype/CMakeLists.txt new file mode 100644 index 0000000000..fb250f9f00 --- /dev/null +++ b/tests/benchmarks/dbus/qdbustype/CMakeLists.txt @@ -0,0 +1,29 @@ +# Generated from qdbustype.pro. + +##################################################################### +## tst_bench_qdbustype Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qdbustype + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::DBusPrivate + Qt::Test +) + +## Scopes: +##################################################################### + +extend_target(tst_bench_qdbustype CONDITION QT_FEATURE_dbus_linked + DEFINES + QT_LINKED_LIBDBUS + PUBLIC_LIBRARIES + dbus-1 +) + +extend_target(tst_bench_qdbustype CONDITION NOT QT_FEATURE_dbus_linked + SOURCES + ../../../../src/dbus/qdbus_symbols.cpp +) diff --git a/tests/benchmarks/gui/CMakeLists.txt b/tests/benchmarks/gui/CMakeLists.txt new file mode 100644 index 0000000000..6af9d8e224 --- /dev/null +++ b/tests/benchmarks/gui/CMakeLists.txt @@ -0,0 +1,8 @@ +# Generated from gui.pro. + +add_subdirectory(animation) +add_subdirectory(image) +add_subdirectory(kernel) +add_subdirectory(math3d) +add_subdirectory(painting) +add_subdirectory(text) diff --git a/tests/benchmarks/gui/animation/CMakeLists.txt b/tests/benchmarks/gui/animation/CMakeLists.txt new file mode 100644 index 0000000000..6190f29a65 --- /dev/null +++ b/tests/benchmarks/gui/animation/CMakeLists.txt @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 0000000000..38b4c50db8 --- /dev/null +++ b/tests/benchmarks/gui/animation/qanimation/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qanimation.pro. + +##################################################################### +## tst_bench_qanimation Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qanimation + SOURCES + dummyanimation.cpp dummyanimation.h + dummyobject.cpp dummyobject.h + main.cpp + rectanimation.cpp rectanimation.h + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) diff --git a/tests/benchmarks/gui/image/CMakeLists.txt b/tests/benchmarks/gui/image/CMakeLists.txt new file mode 100644 index 0000000000..77cfeedc3e --- /dev/null +++ b/tests/benchmarks/gui/image/CMakeLists.txt @@ -0,0 +1,8 @@ +# Generated from image.pro. + +add_subdirectory(blendbench) +add_subdirectory(qimageconversion) +add_subdirectory(qimagereader) +add_subdirectory(qimagescale) +add_subdirectory(qpixmap) +add_subdirectory(qpixmapcache) diff --git a/tests/benchmarks/gui/image/blendbench/CMakeLists.txt b/tests/benchmarks/gui/image/blendbench/CMakeLists.txt index 24b2a79df1..3599a51371 100644 --- a/tests/benchmarks/gui/image/blendbench/CMakeLists.txt +++ b/tests/benchmarks/gui/image/blendbench/CMakeLists.txt @@ -1,3 +1,16 @@ -add_qt_test(tst_bench_blendbench SOURCES +# Generated from blendbench.pro. + +##################################################################### +## tst_bench_blendbench Binary: +##################################################################### + +add_qt_benchmark(tst_bench_blendbench + SOURCES main.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test ) + +#### Keys ignored in scope 1:.:.:blendbench.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt b/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt new file mode 100644 index 0000000000..d9b481ca46 --- /dev/null +++ b/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt @@ -0,0 +1,30 @@ +# Generated from qimageconversion.pro. + +##################################################################### +## tst_bench_imageConversion Binary: +##################################################################### + +add_qt_benchmark(tst_bench_imageConversion + SOURCES + tst_qimageconversion.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qimageconversion.pro:<TRUE>: +# QT_FOR_CONFIG = "gui-private" +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +extend_target(tst_bench_imageConversion CONDITION QT_FEATURE_gif + DEFINES + QTEST_HAVE_GIF +) + +extend_target(tst_bench_imageConversion CONDITION QT_FEATURE_jpeg + DEFINES + QTEST_HAVE_JPEG +) diff --git a/tests/benchmarks/gui/image/qimagereader/CMakeLists.txt b/tests/benchmarks/gui/image/qimagereader/CMakeLists.txt new file mode 100644 index 0000000000..be72a44187 --- /dev/null +++ b/tests/benchmarks/gui/image/qimagereader/CMakeLists.txt @@ -0,0 +1,31 @@ +# Generated from qimagereader.pro. + +##################################################################### +## tst_bench_qimagereader Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qimagereader + SOURCES + tst_qimagereader.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qimagereader.pro:<TRUE>: +# QT_FOR_CONFIG = "gui-private" +# TEMPLATE = "app" +# TESTDATA = "images/*" + +## Scopes: +##################################################################### + +extend_target(tst_bench_qimagereader CONDITION QT_FEATURE_gif + DEFINES + QTEST_HAVE_GIF +) + +extend_target(tst_bench_qimagereader CONDITION QT_FEATURE_jpeg + DEFINES + QTEST_HAVE_JPEG +) diff --git a/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt b/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt index 58b9159eba..cbf3e5459b 100644 --- a/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt +++ b/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt @@ -1,3 +1,16 @@ -add_qt_test(tst_bench_imageScale SOURCES +# Generated from qimagescale.pro. + +##################################################################### +## tst_bench_imageScale Binary: +##################################################################### + +add_qt_benchmark(tst_bench_imageScale + SOURCES tst_qimagescale.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test ) + +#### Keys ignored in scope 1:.:.:qimagescale.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/image/qpixmap/CMakeLists.txt b/tests/benchmarks/gui/image/qpixmap/CMakeLists.txt new file mode 100644 index 0000000000..e75703f33d --- /dev/null +++ b/tests/benchmarks/gui/image/qpixmap/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qpixmap.pro. + +##################################################################### +## tst_bench_qpixmap Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qpixmap + SOURCES + tst_qpixmap.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qpixmap.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt b/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt index e2aa20d75a..46347ef94a 100644 --- a/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt +++ b/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt @@ -1,3 +1,16 @@ -add_qt_test(tst_bench_qpixmapcache SOURCES +# Generated from qpixmapcache.pro. + +##################################################################### +## tst_bench_qpixmapcache Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qpixmapcache + SOURCES tst_qpixmapcache.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test ) + +#### Keys ignored in scope 1:.:.:qpixmapcache.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/kernel/CMakeLists.txt b/tests/benchmarks/gui/kernel/CMakeLists.txt new file mode 100644 index 0000000000..451b12388d --- /dev/null +++ b/tests/benchmarks/gui/kernel/CMakeLists.txt @@ -0,0 +1,4 @@ +# 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 025a6d15ed..cf250cdaf6 100644 --- a/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt +++ b/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt @@ -1,3 +1,16 @@ -add_qt_test(tst_bench_qguimetatype SOURCES +# Generated from qguimetatype.pro. + +##################################################################### +## tst_bench_qguimetatype Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qguimetatype + SOURCES tst_qguimetatype.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test ) + +#### Keys ignored in scope 1:.:.:qguimetatype.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt b/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt index f25c0a17d7..0a6ddda456 100644 --- a/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt +++ b/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt @@ -1,3 +1,16 @@ -add_qt_test(tst_bench_qguivariant SOURCES +# Generated from qguivariant.pro. + +##################################################################### +## tst_bench_qguivariant Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qguivariant + SOURCES tst_qguivariant.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test ) + +#### Keys ignored in scope 1:.:.:qguivariant.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/math3d/CMakeLists.txt b/tests/benchmarks/gui/math3d/CMakeLists.txt new file mode 100644 index 0000000000..53e56a83a3 --- /dev/null +++ b/tests/benchmarks/gui/math3d/CMakeLists.txt @@ -0,0 +1,4 @@ +# 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 7b6525bb63..8d594ef1e7 100644 --- a/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt +++ b/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt @@ -1,3 +1,16 @@ -add_qt_test(tst_bench_qmatrix4x4 SOURCES +# Generated from qmatrix4x4.pro. + +##################################################################### +## tst_bench_qmatrix4x4 Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmatrix4x4 + SOURCES tst_qmatrix4x4.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test ) + +#### Keys ignored in scope 1:.:.:qmatrix4x4.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt b/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt index a7ed4a2ab8..2409a6c43a 100644 --- a/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt +++ b/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt @@ -1,3 +1,16 @@ -add_qt_test(tst_bench_qquaternion SOURCES +# Generated from qquaternion.pro. + +##################################################################### +## tst_bench_qquaternion Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qquaternion + SOURCES tst_qquaternion.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test ) + +#### Keys ignored in scope 1:.:.:qquaternion.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/painting/CMakeLists.txt b/tests/benchmarks/gui/painting/CMakeLists.txt new file mode 100644 index 0000000000..080fe582f2 --- /dev/null +++ b/tests/benchmarks/gui/painting/CMakeLists.txt @@ -0,0 +1,11 @@ +# Generated from painting.pro. + +add_subdirectory(drawtexture) +add_subdirectory(qcolor) +add_subdirectory(qregion) +add_subdirectory(qtransform) +add_subdirectory(lancebench) +if(TARGET Qt::Widgets) + add_subdirectory(qpainter) + add_subdirectory(qtbench) +endif() diff --git a/tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt b/tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt new file mode 100644 index 0000000000..add15f25fb --- /dev/null +++ b/tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from drawtexture.pro. + +##################################################################### +## tst_bench_drawtexture Binary: +##################################################################### + +add_qt_benchmark(tst_bench_drawtexture + SOURCES + tst_drawtexture.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:drawtexture.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt b/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt new file mode 100644 index 0000000000..677a3d98d4 --- /dev/null +++ b/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt @@ -0,0 +1,157 @@ +# Generated from lancebench.pro. + +##################################################################### +## tst_bench_lancebench Binary: +##################################################################### + +add_qt_benchmark(tst_bench_lancebench + SOURCES + ../../../../auto/other/lancelot/paintcommands.cpp ../../../../auto/other/lancelot/paintcommands.h + tst_lancebench.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test +) + +# Resources: +set_source_files_properties("../../../../auto/other/lancelot/images/alpha.png" + PROPERTIES QT_RESOURCE_ALIAS "images/alpha.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/alpha2x2.png" + PROPERTIES QT_RESOURCE_ALIAS "images/alpha2x2.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/bitmap.png" + PROPERTIES QT_RESOURCE_ALIAS "images/bitmap.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/border.png" + PROPERTIES QT_RESOURCE_ALIAS "images/border.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/borderimage.png" + PROPERTIES QT_RESOURCE_ALIAS "images/borderimage.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/dome_argb32.png" + PROPERTIES QT_RESOURCE_ALIAS "images/dome_argb32.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/dome_indexed.png" + PROPERTIES QT_RESOURCE_ALIAS "images/dome_indexed.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/dome_indexed_mask.png" + PROPERTIES QT_RESOURCE_ALIAS "images/dome_indexed_mask.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/dome_mono.png" + PROPERTIES QT_RESOURCE_ALIAS "images/dome_mono.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/dome_mono_128.png" + PROPERTIES QT_RESOURCE_ALIAS "images/dome_mono_128.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/dome_mono_palette.png" + PROPERTIES QT_RESOURCE_ALIAS "images/dome_mono_palette.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/dome_rgb32.png" + PROPERTIES QT_RESOURCE_ALIAS "images/dome_rgb32.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/dot.png" + PROPERTIES QT_RESOURCE_ALIAS "images/dot.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/face.png" + PROPERTIES QT_RESOURCE_ALIAS "images/face.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/gam030.png" + PROPERTIES QT_RESOURCE_ALIAS "images/gam030.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/gam045.png" + PROPERTIES QT_RESOURCE_ALIAS "images/gam045.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/gam056.png" + PROPERTIES QT_RESOURCE_ALIAS "images/gam056.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/gam100.png" + PROPERTIES QT_RESOURCE_ALIAS "images/gam100.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/gam200.png" + PROPERTIES QT_RESOURCE_ALIAS "images/gam200.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/image.png" + PROPERTIES QT_RESOURCE_ALIAS "images/image.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/mask.png" + PROPERTIES QT_RESOURCE_ALIAS "images/mask.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/mask_100.png" + PROPERTIES QT_RESOURCE_ALIAS "images/mask_100.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/masked.png" + PROPERTIES QT_RESOURCE_ALIAS "images/masked.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/sign.png" + PROPERTIES QT_RESOURCE_ALIAS "images/sign.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/solid.png" + PROPERTIES QT_RESOURCE_ALIAS "images/solid.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/solid2x2.png" + PROPERTIES QT_RESOURCE_ALIAS "images/solid2x2.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/struct-image-01.jpg" + PROPERTIES QT_RESOURCE_ALIAS "images/struct-image-01.jpg" +) +set_source_files_properties("../../../../auto/other/lancelot/images/struct-image-01.png" + PROPERTIES QT_RESOURCE_ALIAS "images/struct-image-01.png" +) +set_source_files_properties("../../../../auto/other/lancelot/images/zebra.png" + PROPERTIES QT_RESOURCE_ALIAS "images/zebra.png" +) +set(images_resource_files + "images/alpha.png" + "images/alpha2x2.png" + "images/bitmap.png" + "images/border.png" + "images/borderimage.png" + "images/dome_argb32.png" + "images/dome_indexed.png" + "images/dome_indexed_mask.png" + "images/dome_mono.png" + "images/dome_mono_128.png" + "images/dome_mono_palette.png" + "images/dome_rgb32.png" + "images/dot.png" + "images/face.png" + "images/gam030.png" + "images/gam045.png" + "images/gam056.png" + "images/gam100.png" + "images/gam200.png" + "images/image.png" + "images/mask.png" + "images/mask_100.png" + "images/masked.png" + "images/sign.png" + "images/solid.png" + "images/solid2x2.png" + "images/struct-image-01.jpg" + "images/struct-image-01.png" + "images/zebra.png" +) + +add_qt_resource(tst_bench_lancebench "images" + PREFIX + "/" + BASE + "../../../../auto/other/lancelot" + FILES + ${images_resource_files} +) + + +#### Keys ignored in scope 1:.:.:lancebench.pro:<TRUE>: +# TEMPLATE = "app" +# TESTDATA = "../../../../auto/other/lancelot/scripts/*" + +## Scopes: +##################################################################### + +extend_target(tst_bench_lancebench CONDITION QT_FEATURE_opengl + PUBLIC_LIBRARIES + Qt::OpenGL +) diff --git a/tests/benchmarks/gui/painting/lancebench/lancebench.pro b/tests/benchmarks/gui/painting/lancebench/lancebench.pro index 6458c50861..5647d26de3 100644 --- a/tests/benchmarks/gui/painting/lancebench/lancebench.pro +++ b/tests/benchmarks/gui/painting/lancebench/lancebench.pro @@ -2,7 +2,7 @@ TEMPLATE = app TARGET = tst_bench_lancebench QT += testlib gui-private - +qtConfig(opengl): QT += opengl SOURCES += tst_lancebench.cpp diff --git a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp index d26ac016b9..bd0889bf4a 100644 --- a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp +++ b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp @@ -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/qcolor/CMakeLists.txt b/tests/benchmarks/gui/painting/qcolor/CMakeLists.txt new file mode 100644 index 0000000000..d5367704ae --- /dev/null +++ b/tests/benchmarks/gui/painting/qcolor/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qcolor.pro. + +##################################################################### +## tst_bench_qcolor Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qcolor + SOURCES + tst_qcolor.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qcolor.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/painting/qpainter/CMakeLists.txt b/tests/benchmarks/gui/painting/qpainter/CMakeLists.txt new file mode 100644 index 0000000000..a4e3242409 --- /dev/null +++ b/tests/benchmarks/gui/painting/qpainter/CMakeLists.txt @@ -0,0 +1,19 @@ +# Generated from qpainter.pro. + +##################################################################### +## tst_bench_qpainter Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qpainter + SOURCES + tst_qpainter.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::Widgets + Qt::WidgetsPrivate +) + +#### Keys ignored in scope 1:.:.:qpainter.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/painting/qregion/CMakeLists.txt b/tests/benchmarks/gui/painting/qregion/CMakeLists.txt new file mode 100644 index 0000000000..e864a1f61d --- /dev/null +++ b/tests/benchmarks/gui/painting/qregion/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qregion.pro. + +##################################################################### +## tst_bench_qregion Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qregion + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qregion.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/painting/qtbench/CMakeLists.txt b/tests/benchmarks/gui/painting/qtbench/CMakeLists.txt new file mode 100644 index 0000000000..009deeb528 --- /dev/null +++ b/tests/benchmarks/gui/painting/qtbench/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qtbench.pro. + +##################################################################### +## tst_bench_qtbench Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtbench + SOURCES + tst_qtbench.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qtbench.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt b/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt index 9dbfe8106a..aa24b4a19e 100644 --- a/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt +++ b/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt @@ -1,3 +1,16 @@ -add_qt_test(tst_bench_qtransform SOURCES +# Generated from qtransform.pro. + +##################################################################### +## tst_bench_qtransform Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtransform + SOURCES tst_qtransform.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test ) + +#### Keys ignored in scope 1:.:.:qtransform.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/text/CMakeLists.txt b/tests/benchmarks/gui/text/CMakeLists.txt new file mode 100644 index 0000000000..630f01091d --- /dev/null +++ b/tests/benchmarks/gui/text/CMakeLists.txt @@ -0,0 +1,5 @@ +# 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 44f5c09077..af42a93d27 100644 --- a/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt +++ b/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt @@ -1,3 +1,16 @@ -add_qt_test(tst_bench_QFontMetrics SOURCES +# Generated from qfontmetrics.pro. + +##################################################################### +## tst_bench_QFontMetrics Binary: +##################################################################### + +add_qt_benchmark(tst_bench_QFontMetrics + SOURCES main.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test ) + +#### Keys ignored in scope 1:.:.:qfontmetrics.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/gui/text/qtext/CMakeLists.txt b/tests/benchmarks/gui/text/qtext/CMakeLists.txt new file mode 100644 index 0000000000..b2380c8316 --- /dev/null +++ b/tests/benchmarks/gui/text/qtext/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qtext.pro. + +##################################################################### +## tst_bench_QText Binary: +##################################################################### + +add_qt_benchmark(tst_bench_QText + SOURCES + main.cpp + PUBLIC_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/qtextdocument/CMakeLists.txt b/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt new file mode 100644 index 0000000000..eb1f633d9b --- /dev/null +++ b/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qtextdocument.pro. + +##################################################################### +## tst_bench_QTextDocument Binary: +##################################################################### + +add_qt_benchmark(tst_bench_QTextDocument + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qtextdocument.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/network/CMakeLists.txt b/tests/benchmarks/network/CMakeLists.txt new file mode 100644 index 0000000000..8b1a7ac1ff --- /dev/null +++ b/tests/benchmarks/network/CMakeLists.txt @@ -0,0 +1,8 @@ +# Generated from network.pro. + +add_subdirectory(access) +add_subdirectory(kernel) +add_subdirectory(socket) +if(QT_FEATURE_openssl) + add_subdirectory(ssl) +endif() diff --git a/tests/benchmarks/network/access/CMakeLists.txt b/tests/benchmarks/network/access/CMakeLists.txt new file mode 100644 index 0000000000..58f72cd248 --- /dev/null +++ b/tests/benchmarks/network/access/CMakeLists.txt @@ -0,0 +1,6 @@ +# Generated from access.pro. + +add_subdirectory(qfile_vs_qnetworkaccessmanager) +add_subdirectory(qnetworkreply) +add_subdirectory(qnetworkreply_from_cache) +add_subdirectory(qnetworkdiskcache) diff --git a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/CMakeLists.txt b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/CMakeLists.txt new file mode 100644 index 0000000000..abfb0206d3 --- /dev/null +++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qfile_vs_qnetworkaccessmanager.pro. + +##################################################################### +## tst_bench_qfile_vs_qnetworkaccessmanager Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qfile_vs_qnetworkaccessmanager + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Network + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qfile_vs_qnetworkaccessmanager.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/network/access/qnetworkdiskcache/CMakeLists.txt b/tests/benchmarks/network/access/qnetworkdiskcache/CMakeLists.txt new file mode 100644 index 0000000000..d70d2756a9 --- /dev/null +++ b/tests/benchmarks/network/access/qnetworkdiskcache/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qnetworkdiskcache.pro. + +##################################################################### +## tst_bench_qnetworkdiskcache Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qnetworkdiskcache + SOURCES + tst_qnetworkdiskcache.cpp + PUBLIC_LIBRARIES + Qt::Network + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qnetworkdiskcache.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/network/access/qnetworkreply/CMakeLists.txt b/tests/benchmarks/network/access/qnetworkreply/CMakeLists.txt new file mode 100644 index 0000000000..c77f7b56f8 --- /dev/null +++ b/tests/benchmarks/network/access/qnetworkreply/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qnetworkreply.pro. + +##################################################################### +## tst_bench_qnetworkreply Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qnetworkreply + SOURCES + tst_qnetworkreply.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Network + Qt::NetworkPrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qnetworkreply.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp index 6dd7eaee6b..1a8c8de0c8 100644 --- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -479,7 +479,8 @@ private: void tst_qnetworkreply::initTestCase() { - QVERIFY(QtNetworkSettings::verifyTestNetworkSettings()); + if (!QtNetworkSettings::verifyTestNetworkSettings()) + QSKIP("No network test server available"); } void tst_qnetworkreply::httpLatency() @@ -536,7 +537,7 @@ void tst_qnetworkreply::echoPerformance() connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); QTestEventLoop::instance().enterLoop(5); QVERIFY(!QTestEventLoop::instance().timeout()); - QVERIFY(reply->error() == QNetworkReply::NoError); + QVERIFY(reply->networkError() == QNetworkReply::NoError); delete reply; } } @@ -561,7 +562,7 @@ void tst_qnetworkreply::preConnectEncrypted() QPair<QNetworkReply *, qint64> normalResult = runGetRequest(&manager, request); QNetworkReply *normalReply = normalResult.first; QVERIFY(!QTestEventLoop::instance().timeout()); - QVERIFY(normalReply->error() == QNetworkReply::NoError); + QVERIFY(normalReply->networkError() == QNetworkReply::NoError); qint64 normalElapsed = normalResult.second; // clear all caches again @@ -580,7 +581,7 @@ void tst_qnetworkreply::preConnectEncrypted() QPair<QNetworkReply *, qint64> preConnectResult = runGetRequest(&manager, request); QNetworkReply *preConnectReply = normalResult.first; QVERIFY(!QTestEventLoop::instance().timeout()); - QVERIFY(preConnectReply->error() == QNetworkReply::NoError); + QVERIFY(preConnectReply->networkError() == QNetworkReply::NoError); qint64 preConnectElapsed = preConnectResult.second; qDebug() << request.url().toString() << "full request:" << normalElapsed << "ms, pre-connect request:" << preConnectElapsed << "ms, difference:" @@ -635,7 +636,7 @@ void tst_qnetworkreply::uploadPerformance() QTimer::singleShot(5000, &generator, SLOT(stop())); QTestEventLoop::instance().enterLoop(30); - QCOMPARE(reply->error(), QNetworkReply::NoError); + QCOMPARE(reply->networkError(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); } @@ -661,7 +662,7 @@ void tst_qnetworkreply::httpUploadPerformance() reader.exit(); reader.wait(); QVERIFY(reply->isFinished()); - QCOMPARE(reply->error(), QNetworkReply::NoError); + QCOMPARE(reply->networkError(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); qDebug() << "tst_QNetworkReply::httpUploadPerformance" << elapsed << "msec, " @@ -722,7 +723,7 @@ void tst_qnetworkreply::httpDownloadPerformance() QTime time; time.start(); QTestEventLoop::instance().enterLoop(40); - QCOMPARE(reply->error(), QNetworkReply::NoError); + QCOMPARE(reply->networkError(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); qint64 elapsed = time.elapsed(); @@ -804,7 +805,7 @@ void tst_qnetworkreply::httpDownloadPerformanceDownloadBuffer() QBENCHMARK_ONCE { QTestEventLoop::instance().enterLoop(40); - QCOMPARE(reply->error(), QNetworkReply::NoError); + QCOMPARE(reply->networkError(), QNetworkReply::NoError); QVERIFY(reply->isFinished()); QVERIFY(!QTestEventLoop::instance().timeout()); } @@ -839,7 +840,7 @@ public slots: } QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender()); if (reply) { - QVERIFY(reply->error() == QNetworkReply::NoError); + QVERIFY(reply->networkError() == QNetworkReply::NoError); qDebug() << "time =" << timeOneRequest.elapsed() << "ms"; timeList.append(timeOneRequest.elapsed()); } @@ -894,7 +895,7 @@ void tst_qnetworkreply::runHttpsUploadRequest(const QByteArray &data, const QNet connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QTestEventLoop::instance().enterLoop(15); QVERIFY(!QTestEventLoop::instance().timeout()); - QCOMPARE(reply->error(), QNetworkReply::NoError); + QCOMPARE(reply->networkError(), QNetworkReply::NoError); reply->deleteLater(); } @@ -934,7 +935,7 @@ void tst_qnetworkreply::preConnect() QPair<QNetworkReply *, qint64> normalResult = runGetRequest(&manager, request); QNetworkReply *normalReply = normalResult.first; QVERIFY(!QTestEventLoop::instance().timeout()); - QVERIFY(normalReply->error() == QNetworkReply::NoError); + QVERIFY(normalReply->networkError() == QNetworkReply::NoError); qint64 normalElapsed = normalResult.second; // clear all caches again @@ -954,7 +955,7 @@ void tst_qnetworkreply::preConnect() QPair<QNetworkReply *, qint64> preConnectResult = runGetRequest(&manager, request); QNetworkReply *preConnectReply = normalResult.first; QVERIFY(!QTestEventLoop::instance().timeout()); - QVERIFY(preConnectReply->error() == QNetworkReply::NoError); + QVERIFY(preConnectReply->networkError() == QNetworkReply::NoError); qint64 preConnectElapsed = preConnectResult.second; qDebug() << request.url().toString() << "full request:" << normalElapsed << "ms, pre-connect request:" << preConnectElapsed << "ms, difference:" diff --git a/tests/benchmarks/network/access/qnetworkreply_from_cache/CMakeLists.txt b/tests/benchmarks/network/access/qnetworkreply_from_cache/CMakeLists.txt new file mode 100644 index 0000000000..57cfebb1ff --- /dev/null +++ b/tests/benchmarks/network/access/qnetworkreply_from_cache/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from qnetworkreply_from_cache.pro. + +##################################################################### +## tst_bench_qnetworkreply_from_cache Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qnetworkreply_from_cache + SOURCES + tst_qnetworkreply_from_cache.cpp + PUBLIC_LIBRARIES + Qt::Network + Qt::Test +) diff --git a/tests/benchmarks/network/kernel/CMakeLists.txt b/tests/benchmarks/network/kernel/CMakeLists.txt new file mode 100644 index 0000000000..13a7caecdb --- /dev/null +++ b/tests/benchmarks/network/kernel/CMakeLists.txt @@ -0,0 +1,5 @@ +# Generated from kernel.pro. + +if(QT_FEATURE_private_tests) + add_subdirectory(qhostinfo) +endif() diff --git a/tests/benchmarks/network/kernel/qhostinfo/CMakeLists.txt b/tests/benchmarks/network/kernel/qhostinfo/CMakeLists.txt new file mode 100644 index 0000000000..f234b5d7a4 --- /dev/null +++ b/tests/benchmarks/network/kernel/qhostinfo/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qhostinfo.pro. + +##################################################################### +## tst_bench_qhostinfo Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qhostinfo + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Network + Qt::NetworkPrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qhostinfo.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/network/socket/CMakeLists.txt b/tests/benchmarks/network/socket/CMakeLists.txt new file mode 100644 index 0000000000..6d54bc05f5 --- /dev/null +++ b/tests/benchmarks/network/socket/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from socket.pro. + +add_subdirectory(qtcpserver) +add_subdirectory(qudpsocket) diff --git a/tests/benchmarks/network/socket/qtcpserver/CMakeLists.txt b/tests/benchmarks/network/socket/qtcpserver/CMakeLists.txt new file mode 100644 index 0000000000..7e1eab88a9 --- /dev/null +++ b/tests/benchmarks/network/socket/qtcpserver/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qtcpserver.pro. + +##################################################################### +## tst_bench_qtcpserver Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtcpserver + SOURCES + tst_qtcpserver.cpp + PUBLIC_LIBRARIES + Qt::Network + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qtcpserver.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp index 109126790b..a9f8634129 100644 --- a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -81,7 +81,8 @@ void tst_QTcpServer::initTestCase_data() void tst_QTcpServer::initTestCase() { - QVERIFY(QtNetworkSettings::verifyTestNetworkSettings()); + if (!QtNetworkSettings::verifyTestNetworkSettings()) + QSKIP("No network test server available"); } void tst_QTcpServer::init() diff --git a/tests/benchmarks/network/socket/qudpsocket/CMakeLists.txt b/tests/benchmarks/network/socket/qudpsocket/CMakeLists.txt new file mode 100644 index 0000000000..58b4ab17d4 --- /dev/null +++ b/tests/benchmarks/network/socket/qudpsocket/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qudpsocket.pro. + +##################################################################### +## tst_bench_qudpsocket Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qudpsocket + SOURCES + tst_qudpsocket.cpp + PUBLIC_LIBRARIES + Qt::Network + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qudpsocket.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/network/ssl/CMakeLists.txt b/tests/benchmarks/network/ssl/CMakeLists.txt new file mode 100644 index 0000000000..bc469359f1 --- /dev/null +++ b/tests/benchmarks/network/ssl/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from ssl.pro. + +add_subdirectory(qsslsocket) diff --git a/tests/benchmarks/network/ssl/qsslsocket/CMakeLists.txt b/tests/benchmarks/network/ssl/qsslsocket/CMakeLists.txt new file mode 100644 index 0000000000..7a127b071d --- /dev/null +++ b/tests/benchmarks/network/ssl/qsslsocket/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qsslsocket.pro. + +##################################################################### +## tst_bench_qsslsocket Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qsslsocket + SOURCES + tst_qsslsocket.cpp + PUBLIC_LIBRARIES + Qt::Network + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qsslsocket.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp index c01c673604..afd0c720a2 100644 --- a/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -63,7 +63,8 @@ tst_QSslSocket::~tst_QSslSocket() void tst_QSslSocket::initTestCase() { - QVERIFY(QtNetworkSettings::verifyTestNetworkSettings()); + if (!QtNetworkSettings::verifyTestNetworkSettings()) + QSKIP("No network test server available"); } void tst_QSslSocket::init() diff --git a/tests/benchmarks/opengl/CMakeLists.txt b/tests/benchmarks/opengl/CMakeLists.txt new file mode 100644 index 0000000000..bbee072587 --- /dev/null +++ b/tests/benchmarks/opengl/CMakeLists.txt @@ -0,0 +1,22 @@ +# Generated from opengl.pro. + +##################################################################### +## tst_bench_opengl Binary: +##################################################################### + +add_qt_benchmark(tst_bench_opengl + SOURCES + main.cpp + DEFINES + QT_DISABLE_DEPRECATED_BEFORE=0 + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + Qt::OpenGL + Qt::OpenGLPrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:opengl.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/plugins/imageformats/jpeg/CMakeLists.txt b/tests/benchmarks/plugins/imageformats/jpeg/CMakeLists.txt new file mode 100644 index 0000000000..63262d19ce --- /dev/null +++ b/tests/benchmarks/plugins/imageformats/jpeg/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from jpeg.pro. + +##################################################################### +## jpeg Binary: +##################################################################### + +add_qt_benchmark(jpeg + SOURCES + jpeg.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test +) + +#### Keys ignored in scope 1:.:.:jpeg.pro:<TRUE>: +# TEMPLATE = "app" +# TESTDATA = "n900.jpeg" diff --git a/tests/benchmarks/sql/CMakeLists.txt b/tests/benchmarks/sql/CMakeLists.txt new file mode 100644 index 0000000000..c4d96e338d --- /dev/null +++ b/tests/benchmarks/sql/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from sql.pro. + +add_subdirectory(kernel) diff --git a/tests/benchmarks/sql/kernel/CMakeLists.txt b/tests/benchmarks/sql/kernel/CMakeLists.txt new file mode 100644 index 0000000000..86108db75d --- /dev/null +++ b/tests/benchmarks/sql/kernel/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from kernel.pro. + +add_subdirectory(qsqlquery) +add_subdirectory(qsqlrecord) diff --git a/tests/benchmarks/sql/kernel/qsqlquery/CMakeLists.txt b/tests/benchmarks/sql/kernel/qsqlquery/CMakeLists.txt new file mode 100644 index 0000000000..95e3aca221 --- /dev/null +++ b/tests/benchmarks/sql/kernel/qsqlquery/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qsqlquery.pro. + +##################################################################### +## tst_bench_qsqlquery Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qsqlquery + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Sql + Qt::SqlPrivate + Qt::Test +) diff --git a/tests/benchmarks/sql/kernel/qsqlrecord/CMakeLists.txt b/tests/benchmarks/sql/kernel/qsqlrecord/CMakeLists.txt new file mode 100644 index 0000000000..b55d46984f --- /dev/null +++ b/tests/benchmarks/sql/kernel/qsqlrecord/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qsqlrecord.pro. + +##################################################################### +## tst_bench_qsqlrecord Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qsqlrecord + SOURCES + tst_qsqlrecord.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Sql + Qt::SqlPrivate + Qt::Test +) diff --git a/tests/benchmarks/testlib/CMakeLists.txt b/tests/benchmarks/testlib/CMakeLists.txt new file mode 100644 index 0000000000..e7bd29b564 --- /dev/null +++ b/tests/benchmarks/testlib/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from testlib.pro. + +add_subdirectory(tostring) diff --git a/tests/benchmarks/testlib/tostring/CMakeLists.txt b/tests/benchmarks/testlib/tostring/CMakeLists.txt new file mode 100644 index 0000000000..76c0f1db1c --- /dev/null +++ b/tests/benchmarks/testlib/tostring/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from tostring.pro. + +##################################################################### +## tst_bench_tostring Binary: +##################################################################### + +add_qt_benchmark(tst_bench_tostring + SOURCES + tst_tostring.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/widgets/CMakeLists.txt b/tests/benchmarks/widgets/CMakeLists.txt new file mode 100644 index 0000000000..bf543e664d --- /dev/null +++ b/tests/benchmarks/widgets/CMakeLists.txt @@ -0,0 +1,7 @@ +# Generated from widgets.pro. + +add_subdirectory(graphicsview) +add_subdirectory(itemviews) +add_subdirectory(kernel) +add_subdirectory(styles) +add_subdirectory(widgets) diff --git a/tests/benchmarks/widgets/graphicsview/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/CMakeLists.txt new file mode 100644 index 0000000000..3928328a98 --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/CMakeLists.txt @@ -0,0 +1,10 @@ +# Generated from graphicsview.pro. + +add_subdirectory(functional) +add_subdirectory(qgraphicsanchorlayout) +add_subdirectory(qgraphicsitem) +add_subdirectory(qgraphicslayout) +add_subdirectory(qgraphicslinearlayout) +add_subdirectory(qgraphicsscene) +add_subdirectory(qgraphicsview) +add_subdirectory(qgraphicswidget) diff --git a/tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt new file mode 100644 index 0000000000..20e4286a6e --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt @@ -0,0 +1,2 @@ +# Generated from functional.pro. + diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt new file mode 100644 index 0000000000..8fac5c3497 --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt @@ -0,0 +1,367 @@ +# Generated from GraphicsViewBenchmark.pro. + +##################################################################### +## tst_GraphicsViewBenchmark Binary: +##################################################################### + +add_qt_benchmark(tst_GraphicsViewBenchmark + SOURCES + main.cpp + widgets/abstractitemcontainer.cpp widgets/abstractitemcontainer.h + widgets/abstractitemview.cpp widgets/abstractitemview.h + widgets/abstractscrollarea.cpp widgets/abstractscrollarea.h + widgets/abstractviewitem.cpp widgets/abstractviewitem.h + widgets/backgrounditem.cpp widgets/backgrounditem.h + widgets/button.cpp widgets/button.h + widgets/commandline.cpp widgets/commandline.h + widgets/dummydatagen.cpp widgets/dummydatagen.h + widgets/gvbwidget.cpp widgets/gvbwidget.h + widgets/iconitem.cpp widgets/iconitem.h + widgets/itemrecyclinglist.cpp widgets/itemrecyclinglist.h + widgets/itemrecyclinglistview.cpp widgets/itemrecyclinglistview.h + widgets/label.cpp widgets/label.h + widgets/listitem.cpp widgets/listitem.h + widgets/listitemcache.cpp widgets/listitemcache.h + widgets/listitemcontainer.cpp widgets/listitemcontainer.h + widgets/listmodel.cpp widgets/listmodel.h + widgets/listwidget.cpp widgets/listwidget.h + widgets/mainview.cpp widgets/mainview.h + widgets/menu.cpp widgets/menu.h + widgets/recycledlistitem.cpp widgets/recycledlistitem.h + widgets/scrollbar.cpp widgets/scrollbar.h + widgets/scroller.cpp widgets/scroller.h widgets/scroller_p.h + widgets/settings.cpp widgets/settings.h + widgets/simplelist.cpp widgets/simplelist.h + widgets/simplelistview.cpp widgets/simplelistview.h + widgets/theme.cpp widgets/theme.h + widgets/themeevent.cpp widgets/themeevent.h + widgets/topbar.cpp widgets/topbar.h + INCLUDE_DIRECTORIES + widgets + PUBLIC_LIBRARIES + Qt::Gui + Qt::Svg + Qt::Test +) + +# Resources: +set_source_files_properties("resources/blue_SVG/blue_background_360x640px.svg" + PROPERTIES QT_RESOURCE_ALIAS "background.svg" +) +set_source_files_properties("resources/blue_SVG/blue_background_horisontal_640x360px.svg" + PROPERTIES QT_RESOURCE_ALIAS "background_horisontal.svg" +) +set_source_files_properties("resources/blue_SVG/blue_contact_default_icon_52x52px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon.svg" +) +set_source_files_properties("resources/blue_SVG/blue_contact_list_divider_360x76px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_list_divider.svg" +) +set_source_files_properties("resources/blue_SVG/blue_contact_list_highlighter_360x76px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_list_highlighter.svg" +) +set_source_files_properties("resources/blue_SVG/blue_contact_status_idle_33x33px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_status_idle.svg" +) +set_source_files_properties("resources/blue_SVG/blue_contact_status_offline_33x33px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_status_offline.svg" +) +set_source_files_properties("resources/blue_SVG/blue_contact_status_online_33x33px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_status_online.svg" +) +set_source_files_properties("resources/blue_SVG/blue_scroll_16x80px.svg" + PROPERTIES QT_RESOURCE_ALIAS "scroll.svg" +) +set_source_files_properties("resources/blue_SVG/blue_scrollbar_7x14px.svg" + PROPERTIES QT_RESOURCE_ALIAS "scrollbar.svg" +) +set_source_files_properties("resources/blue_SVG/blue_status_field_left_14x24px.svg" + PROPERTIES QT_RESOURCE_ALIAS "status_field_left.svg" +) +set_source_files_properties("resources/blue_SVG/blue_status_field_middle_14x24px.svg" + PROPERTIES QT_RESOURCE_ALIAS "status_field_middle.svg" +) +set_source_files_properties("resources/blue_SVG/blue_status_field_right_14x24px.svg" + PROPERTIES QT_RESOURCE_ALIAS "status_field_right.svg" +) +set_source_files_properties("resources/blue_SVG/blue_topbar_356x96px.svg" + PROPERTIES QT_RESOURCE_ALIAS "topbar.svg" +) +set_source_files_properties("resources/blue_SVG/blue_topbar_horisontal_636x96px.svg" + PROPERTIES QT_RESOURCE_ALIAS "topbar_horisontal.svg" +) +set_source_files_properties("resources/blue_SVG/blue_user_default_icon_68x68px.svg" + PROPERTIES QT_RESOURCE_ALIAS "user_default_icon.svg" +) +set_source_files_properties("resources/blue_SVG/blue_user_status_idle_38x38px.svg" + PROPERTIES QT_RESOURCE_ALIAS "user_status_idle.svg" +) +set_source_files_properties("resources/blue_SVG/blue_user_status_offline_38x38px.svg" + PROPERTIES QT_RESOURCE_ALIAS "user_status_offline.svg" +) +set_source_files_properties("resources/blue_SVG/blue_user_status_online_38x38px.svg" + PROPERTIES QT_RESOURCE_ALIAS "user_status_online.svg" +) +set(GraphicsViewBenchmark_resource_files + "resources/blue_SVG/blue_background_360x640px.svg" + "resources/blue_SVG/blue_background_horisontal_640x360px.svg" + "resources/blue_SVG/blue_contact_default_icon_52x52px.svg" + "resources/blue_SVG/blue_contact_list_divider_360x76px.svg" + "resources/blue_SVG/blue_contact_list_highlighter_360x76px.svg" + "resources/blue_SVG/blue_contact_status_idle_33x33px.svg" + "resources/blue_SVG/blue_contact_status_offline_33x33px.svg" + "resources/blue_SVG/blue_contact_status_online_33x33px.svg" + "resources/blue_SVG/blue_scroll_16x80px.svg" + "resources/blue_SVG/blue_scrollbar_7x14px.svg" + "resources/blue_SVG/blue_status_field_left_14x24px.svg" + "resources/blue_SVG/blue_status_field_middle_14x24px.svg" + "resources/blue_SVG/blue_status_field_right_14x24px.svg" + "resources/blue_SVG/blue_topbar_356x96px.svg" + "resources/blue_SVG/blue_topbar_horisontal_636x96px.svg" + "resources/blue_SVG/blue_user_default_icon_68x68px.svg" + "resources/blue_SVG/blue_user_status_idle_38x38px.svg" + "resources/blue_SVG/blue_user_status_offline_38x38px.svg" + "resources/blue_SVG/blue_user_status_online_38x38px.svg" +) + +add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark" + PREFIX + "/themes/blue" + FILES + ${GraphicsViewBenchmark_resource_files} +) +set_source_files_properties("resources/blue_SVG/blue_contact_status_idle_33x33px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_status_idle.svg" +) +set_source_files_properties("resources/blue_SVG/blue_contact_status_offline_33x33px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_status_offline.svg" +) +set_source_files_properties("resources/blue_SVG/blue_contact_status_online_33x33px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_status_online.svg" +) +set_source_files_properties("resources/lime_SVG/lime_background_360x640px.svg" + PROPERTIES QT_RESOURCE_ALIAS "background.svg" +) +set_source_files_properties("resources/lime_SVG/lime_background_horisontal_640x360px.svg" + PROPERTIES QT_RESOURCE_ALIAS "background_horisontal.svg" +) +set_source_files_properties("resources/lime_SVG/lime_contact_default_icon_53x53px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon.svg" +) +set_source_files_properties("resources/lime_SVG/lime_contact_default_icon_highlight_53x53px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon_highlight.svg" +) +set_source_files_properties("resources/lime_SVG/lime_contact_list_divider_360x76px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_list_divider.svg" +) +set_source_files_properties("resources/lime_SVG/lime_contact_list_highlighter_357x80px.svg" + PROPERTIES QT_RESOURCE_ALIAS "contact_list_highlighter.svg" +) +set_source_files_properties("resources/lime_SVG/lime_scroll_5x80px.svg" + PROPERTIES QT_RESOURCE_ALIAS "scroll.svg" +) +set_source_files_properties("resources/lime_SVG/lime_scrollbar_5x14px.svg" + PROPERTIES QT_RESOURCE_ALIAS "scrollbar.svg" +) +set_source_files_properties("resources/lime_SVG/lime_status_field_left_14x24px.svg" + PROPERTIES QT_RESOURCE_ALIAS "status_field_left.svg" +) +set_source_files_properties("resources/lime_SVG/lime_status_field_middle_10x24px.svg" + PROPERTIES QT_RESOURCE_ALIAS "status_field_middle.svg" +) +set_source_files_properties("resources/lime_SVG/lime_status_field_right_14x24px.svg" + PROPERTIES QT_RESOURCE_ALIAS "status_field_right.svg" +) +set_source_files_properties("resources/lime_SVG/lime_topbar_356x96px.svg" + PROPERTIES QT_RESOURCE_ALIAS "topbar.svg" +) +set_source_files_properties("resources/lime_SVG/lime_topbar_horisontal_636x96px.svg" + PROPERTIES QT_RESOURCE_ALIAS "topbar_horisontal.svg" +) +set_source_files_properties("resources/lime_SVG/lime_user_default_icon_84x68px.svg" + PROPERTIES QT_RESOURCE_ALIAS "user_default_icon.svg" +) +set_source_files_properties("resources/lime_SVG/lime_user_status_idle_24x24px.svg" + PROPERTIES QT_RESOURCE_ALIAS "user_status_idle.svg" +) +set_source_files_properties("resources/lime_SVG/lime_user_status_offline_24x24px.svg" + PROPERTIES QT_RESOURCE_ALIAS "user_status_offline.svg" +) +set_source_files_properties("resources/lime_SVG/lime_user_status_online_24x24px.svg" + PROPERTIES QT_RESOURCE_ALIAS "user_status_online.svg" +) +set(GraphicsViewBenchmark1_resource_files + "resources/blue_SVG/blue_contact_status_idle_33x33px.svg" + "resources/blue_SVG/blue_contact_status_offline_33x33px.svg" + "resources/blue_SVG/blue_contact_status_online_33x33px.svg" + "resources/lime_SVG/lime_background_360x640px.svg" + "resources/lime_SVG/lime_background_horisontal_640x360px.svg" + "resources/lime_SVG/lime_contact_default_icon_53x53px.svg" + "resources/lime_SVG/lime_contact_default_icon_highlight_53x53px.svg" + "resources/lime_SVG/lime_contact_list_divider_360x76px.svg" + "resources/lime_SVG/lime_contact_list_highlighter_357x80px.svg" + "resources/lime_SVG/lime_scroll_5x80px.svg" + "resources/lime_SVG/lime_scrollbar_5x14px.svg" + "resources/lime_SVG/lime_status_field_left_14x24px.svg" + "resources/lime_SVG/lime_status_field_middle_10x24px.svg" + "resources/lime_SVG/lime_status_field_right_14x24px.svg" + "resources/lime_SVG/lime_topbar_356x96px.svg" + "resources/lime_SVG/lime_topbar_horisontal_636x96px.svg" + "resources/lime_SVG/lime_user_default_icon_84x68px.svg" + "resources/lime_SVG/lime_user_status_idle_24x24px.svg" + "resources/lime_SVG/lime_user_status_offline_24x24px.svg" + "resources/lime_SVG/lime_user_status_online_24x24px.svg" +) + +add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark1" + PREFIX + "/themes/lime" + FILES + ${GraphicsViewBenchmark1_resource_files} +) +set_source_files_properties("resources/avatars/avatar_man_001_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_001.png" +) +set_source_files_properties("resources/avatars/avatar_man_002_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_002.png" +) +set_source_files_properties("resources/avatars/avatar_man_003_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_003.png" +) +set_source_files_properties("resources/avatars/avatar_man_004_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_004.png" +) +set_source_files_properties("resources/avatars/avatar_man_005_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_005.png" +) +set_source_files_properties("resources/avatars/avatar_man_006_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_006.png" +) +set_source_files_properties("resources/avatars/avatar_man_007_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_007.png" +) +set_source_files_properties("resources/avatars/avatar_man_008_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_008.png" +) +set_source_files_properties("resources/avatars/avatar_man_009_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_009.png" +) +set_source_files_properties("resources/avatars/avatar_man_010_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_010.png" +) +set_source_files_properties("resources/avatars/avatar_picture_001_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_011.png" +) +set_source_files_properties("resources/avatars/avatar_picture_002_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_012.png" +) +set_source_files_properties("resources/avatars/avatar_picture_003_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_013.png" +) +set_source_files_properties("resources/avatars/avatar_picture_004_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_014.png" +) +set_source_files_properties("resources/avatars/avatar_picture_005_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_015.png" +) +set_source_files_properties("resources/avatars/avatar_woman_001_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_016.png" +) +set_source_files_properties("resources/avatars/avatar_woman_002_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_017.png" +) +set_source_files_properties("resources/avatars/avatar_woman_003_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_018.png" +) +set_source_files_properties("resources/avatars/avatar_woman_004_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_019.png" +) +set_source_files_properties("resources/avatars/avatar_woman_005_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_020.png" +) +set_source_files_properties("resources/avatars/avatar_woman_006_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_021.png" +) +set_source_files_properties("resources/avatars/avatar_woman_007_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_022.png" +) +set_source_files_properties("resources/avatars/avatar_woman_008_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_023.png" +) +set_source_files_properties("resources/avatars/avatar_woman_009_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_024.png" +) +set_source_files_properties("resources/avatars/avatar_woman_010_58x58.png" + PROPERTIES QT_RESOURCE_ALIAS "avatar_025.png" +) +set(GraphicsViewBenchmark2_resource_files + "resources/avatars/avatar_man_001_58x58.png" + "resources/avatars/avatar_man_002_58x58.png" + "resources/avatars/avatar_man_003_58x58.png" + "resources/avatars/avatar_man_004_58x58.png" + "resources/avatars/avatar_man_005_58x58.png" + "resources/avatars/avatar_man_006_58x58.png" + "resources/avatars/avatar_man_007_58x58.png" + "resources/avatars/avatar_man_008_58x58.png" + "resources/avatars/avatar_man_009_58x58.png" + "resources/avatars/avatar_man_010_58x58.png" + "resources/avatars/avatar_picture_001_58x58.png" + "resources/avatars/avatar_picture_002_58x58.png" + "resources/avatars/avatar_picture_003_58x58.png" + "resources/avatars/avatar_picture_004_58x58.png" + "resources/avatars/avatar_picture_005_58x58.png" + "resources/avatars/avatar_woman_001_58x58.png" + "resources/avatars/avatar_woman_002_58x58.png" + "resources/avatars/avatar_woman_003_58x58.png" + "resources/avatars/avatar_woman_004_58x58.png" + "resources/avatars/avatar_woman_005_58x58.png" + "resources/avatars/avatar_woman_006_58x58.png" + "resources/avatars/avatar_woman_007_58x58.png" + "resources/avatars/avatar_woman_008_58x58.png" + "resources/avatars/avatar_woman_009_58x58.png" + "resources/avatars/avatar_woman_010_58x58.png" +) + +add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark2" + PREFIX + "/avatars" + FILES + ${GraphicsViewBenchmark2_resource_files} +) +set_source_files_properties("resources/contacts/areacodes.txt" + PROPERTIES QT_RESOURCE_ALIAS "areacodes.txt" +) +set_source_files_properties("resources/contacts/firstnamesF.txt" + PROPERTIES QT_RESOURCE_ALIAS "firstnamesF.txt" +) +set_source_files_properties("resources/contacts/firstnamesM.txt" + PROPERTIES QT_RESOURCE_ALIAS "firstnamesM.txt" +) +set_source_files_properties("resources/contacts/lastnames.txt" + PROPERTIES QT_RESOURCE_ALIAS "lastnames.txt" +) +set(GraphicsViewBenchmark3_resource_files + "resources/contacts/areacodes.txt" + "resources/contacts/firstnamesF.txt" + "resources/contacts/firstnamesM.txt" + "resources/contacts/lastnames.txt" +) + +add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark3" + PREFIX + "/contact" + FILES + ${GraphicsViewBenchmark3_resource_files} +) + + +#### Keys ignored in scope 1:.:.:GraphicsViewBenchmark.pro:<TRUE>: +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +extend_target(tst_GraphicsViewBenchmark CONDITION TARGET Qt::OpenGL + PUBLIC_LIBRARIES + Qt::OpenGL +) diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h index 7e247b63a4..1212703ddb 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h @@ -37,7 +37,7 @@ class GvbWidget : public QGraphicsWidget public: - GvbWidget(QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0); + GvbWidget(QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = { }); ~GvbWidget(); virtual void keyPressEvent(QKeyEvent *event); }; diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt new file mode 100644 index 0000000000..4f526cc7b1 --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qgraphicsanchorlayout.pro. + +##################################################################### +## tst_bench_qgraphicsanchorlayout Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qgraphicsanchorlayout + SOURCES + tst_qgraphicsanchorlayout.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qgraphicsanchorlayout.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt new file mode 100644 index 0000000000..a63c37e323 --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qgraphicsitem.pro. + +##################################################################### +## tst_bench_qgraphicsitem Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qgraphicsitem + SOURCES + tst_qgraphicsitem.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qgraphicsitem.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicslayout/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicslayout/CMakeLists.txt new file mode 100644 index 0000000000..84f277df1b --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/qgraphicslayout/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qgraphicslayout.pro. + +##################################################################### +## tst_bench_qgraphicslayout Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qgraphicslayout + SOURCES + tst_qgraphicslayout.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qgraphicslayout.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp index caf5455a80..bd7899e671 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp +++ b/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp @@ -47,7 +47,7 @@ private slots: class RectWidget : public QGraphicsWidget { public: - RectWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0) : QGraphicsWidget(parent, wFlags), setGeometryCalls(0) {} + RectWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = { }) : QGraphicsWidget(parent, wFlags), setGeometryCalls(0) {} void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt new file mode 100644 index 0000000000..ab88de5bec --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qgraphicslinearlayout.pro. + +##################################################################### +## tst_bench_qgraphicslinearlayout Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qgraphicslinearlayout + SOURCES + tst_qgraphicslinearlayout.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qgraphicslinearlayout.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsscene/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsscene/CMakeLists.txt new file mode 100644 index 0000000000..0c72479efd --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsscene/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qgraphicsscene.pro. + +##################################################################### +## tst_bench_qgraphicsscene Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qgraphicsscene + SOURCES + tst_qgraphicsscene.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qgraphicsscene.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsview/CMakeLists.txt new file mode 100644 index 0000000000..d98e3dba19 --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/CMakeLists.txt @@ -0,0 +1,55 @@ +# Generated from qgraphicsview.pro. + +##################################################################### +## tst_bench_qgraphicsview Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qgraphicsview + SOURCES + chiptester/chip.cpp chiptester/chip.h + chiptester/chiptester.cpp chiptester/chiptester.h + tst_qgraphicsview.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +# Resources: +set(qgraphicsview_resource_files + "images/designer.png" + "images/wine-big.jpeg" + "images/wine.jpeg" + "random.data" +) + +add_qt_resource(tst_bench_qgraphicsview "qgraphicsview" + PREFIX + "/" + FILES + ${qgraphicsview_resource_files} +) +set(images_resource_files + "qt4logo.png" +) + +add_qt_resource(tst_bench_qgraphicsview "images" + PREFIX + "/" + BASE + "chiptester" + FILES + ${images_resource_files} +) + + +#### Keys ignored in scope 1:.:.:qgraphicsview.pro:<TRUE>: +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +extend_target(tst_bench_qgraphicsview CONDITION TARGET Qt::OpenGL + PUBLIC_LIBRARIES + Qt::OpenGL +) diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/CMakeLists.txt new file mode 100644 index 0000000000..e5e01a8434 --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/CMakeLists.txt @@ -0,0 +1,48 @@ +# Generated from chip.pro. + +##################################################################### +## chip Binary: +##################################################################### + +add_qt_benchmark(chip + GUI + SOURCES + chip.cpp chip.h + main.cpp + mainwindow.cpp mainwindow.h + view.cpp view.h + PUBLIC_LIBRARIES + Qt::Gui +) + +# Resources: +set(images_resource_files + "fileprint.png" + "qt4logo.png" + "rotateleft.png" + "rotateright.png" + "zoomin.png" + "zoomout.png" +) + +add_qt_resource(chip "images" + PREFIX + "/" + FILES + ${images_resource_files} +) + + +#### Keys ignored in scope 1:.:.:chip.pro:<TRUE>: +# INSTALLS = "target" "sources" +# sources.files = "$$SOURCES" "$$HEADERS" "$$RESOURCES" "*.png" "*.pro" "*.html" "*.doc" "images" +# sources.path = "$$[QT_INSTALL_EXAMPLES]/graphicsview/chip" +# target.path = "$$[QT_INSTALL_EXAMPLES]/graphicsview/chip" + +## Scopes: +##################################################################### + +extend_target(chip CONDITION TARGET Qt::OpenGL + PUBLIC_LIBRARIES + Qt::OpenGL +) diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp index 6e0ac445a6..60e8dd0032 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp @@ -187,7 +187,7 @@ void View::setupMatrix() { qreal scale = qPow(qreal(2), (zoomSlider->value() - 250) / qreal(50)); - QMatrix matrix; + QTransform matrix; matrix.scale(scale, scale); matrix.rotate(rotateSlider->value()); diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/CMakeLists.txt new file mode 100644 index 0000000000..ce86e56722 --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from moveItems.pro. + +##################################################################### +## moveItems Binary: +##################################################################### + +add_qt_benchmark(moveItems + GUI + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui +) diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/CMakeLists.txt new file mode 100644 index 0000000000..310fcd0622 --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from scrolltest.pro. + +##################################################################### +## scrolltest Binary: +##################################################################### + +add_qt_benchmark(scrolltest + GUI + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui +) diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp index dfa08b6869..1eaa5f6578 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp @@ -56,13 +56,6 @@ void ChipTester::setAntialias(bool enabled) setRenderHint(QPainter::Antialiasing, enabled); } -void ChipTester::setOpenGL(bool enabled) -{ -#ifndef QT_NO_OPENGL - setViewport(enabled ? new QGLWidget(QGLFormat(QGL::SampleBuffers)) : 0); -#endif -} - void ChipTester::setOperation(Operation operation) { this->operation = operation; diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h index d85686c94e..e4c9197142 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h @@ -51,7 +51,6 @@ public: ChipTester(QWidget *parent = 0); void setAntialias(bool enabled); - void setOpenGL(bool enabled); void runBenchmark(); void setOperation(Operation operation); diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 9bb5231528..25fc439883 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -382,31 +382,22 @@ void tst_QGraphicsView::mapRectFromScene() void tst_QGraphicsView::chipTester_data() { QTest::addColumn<bool>("antialias"); - QTest::addColumn<bool>("opengl"); QTest::addColumn<int>("operation"); - QTest::newRow("rotate, normal") << false << false << 0; - QTest::newRow("rotate, normal, antialias") << true << false << 0; - QTest::newRow("rotate, opengl") << false << true << 0; - QTest::newRow("rotate, opengl, antialias") << true << true << 0; - QTest::newRow("zoom, normal") << false << false << 1; - QTest::newRow("zoom, normal, antialias") << true << false << 1; - QTest::newRow("zoom, opengl") << false << true << 1; - QTest::newRow("zoom, opengl, antialias") << true << true << 1; - QTest::newRow("translate, normal") << false << false << 2; - QTest::newRow("translate, normal, antialias") << true << false << 2; - QTest::newRow("translate, opengl") << false << true << 2; - QTest::newRow("translate, opengl, antialias") << true << true << 2; + QTest::newRow("rotate") << false << 0; + QTest::newRow("rotate, antialias") << true << 0; + QTest::newRow("zoom") << false << 1; + QTest::newRow("zoom, antialias") << true << 1; + QTest::newRow("translate") << false << 2; + QTest::newRow("translate, antialias") << true << 2; } void tst_QGraphicsView::chipTester() { QFETCH(bool, antialias); - QFETCH(bool, opengl); QFETCH(int, operation); ChipTester tester; tester.setAntialias(antialias); - tester.setOpenGL(opengl); tester.setOperation(ChipTester::Operation(operation)); tester.show(); QVERIFY(QTest::qWaitForWindowExposed(&tester)); diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicswidget/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicswidget/CMakeLists.txt new file mode 100644 index 0000000000..ab16f7081e --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/qgraphicswidget/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qgraphicswidget.pro. + +##################################################################### +## tst_bench_qgraphicswidget Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qgraphicswidget + SOURCES + tst_qgraphicswidget.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qgraphicswidget.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/itemviews/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/CMakeLists.txt new file mode 100644 index 0000000000..76747b527d --- /dev/null +++ b/tests/benchmarks/widgets/itemviews/CMakeLists.txt @@ -0,0 +1,5 @@ +# Generated from itemviews.pro. + +add_subdirectory(qtableview) +add_subdirectory(qheaderview) +add_subdirectory(qlistview) diff --git a/tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt new file mode 100644 index 0000000000..6d616d2579 --- /dev/null +++ b/tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qheaderview.pro. + +##################################################################### +## tst_bench_qheaderview Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qheaderview + SOURCES + qheaderviewbench.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qheaderview.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt new file mode 100644 index 0000000000..58062db6c0 --- /dev/null +++ b/tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qlistview.pro. + +##################################################################### +## tst_bench_qlistview Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qlistview + SOURCES + tst_qlistview.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qlistview.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt new file mode 100644 index 0000000000..f0b47692d8 --- /dev/null +++ b/tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qtableview.pro. + +##################################################################### +## tst_bench_qtableview Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtableview + SOURCES + tst_qtableview.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qtableview.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/kernel/CMakeLists.txt b/tests/benchmarks/widgets/kernel/CMakeLists.txt new file mode 100644 index 0000000000..b55b31fe67 --- /dev/null +++ b/tests/benchmarks/widgets/kernel/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from kernel.pro. + +add_subdirectory(qapplication) +add_subdirectory(qwidget) diff --git a/tests/benchmarks/widgets/kernel/qapplication/CMakeLists.txt b/tests/benchmarks/widgets/kernel/qapplication/CMakeLists.txt new file mode 100644 index 0000000000..05bc480302 --- /dev/null +++ b/tests/benchmarks/widgets/kernel/qapplication/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qapplication.pro. + +##################################################################### +## tst_bench_qapplication Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qapplication + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qapplication.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/kernel/qwidget/CMakeLists.txt b/tests/benchmarks/widgets/kernel/qwidget/CMakeLists.txt new file mode 100644 index 0000000000..6165cba25a --- /dev/null +++ b/tests/benchmarks/widgets/kernel/qwidget/CMakeLists.txt @@ -0,0 +1,14 @@ +# Generated from qwidget.pro. + +##################################################################### +## tst_bench_qwidget Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qwidget + SOURCES + tst_qwidget.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) diff --git a/tests/benchmarks/widgets/styles/CMakeLists.txt b/tests/benchmarks/widgets/styles/CMakeLists.txt new file mode 100644 index 0000000000..74e57c5731 --- /dev/null +++ b/tests/benchmarks/widgets/styles/CMakeLists.txt @@ -0,0 +1,5 @@ +# Generated from styles.pro. + +if(TARGET Qt::Widgets) + add_subdirectory(qstylesheetstyle) +endif() diff --git a/tests/benchmarks/widgets/styles/qstylesheetstyle/CMakeLists.txt b/tests/benchmarks/widgets/styles/qstylesheetstyle/CMakeLists.txt new file mode 100644 index 0000000000..13aa6a1f62 --- /dev/null +++ b/tests/benchmarks/widgets/styles/qstylesheetstyle/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qstylesheetstyle.pro. + +##################################################################### +## tst_bench_qstylesheetstyle Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qstylesheetstyle + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qstylesheetstyle.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/widgets/CMakeLists.txt b/tests/benchmarks/widgets/widgets/CMakeLists.txt new file mode 100644 index 0000000000..81a8fccc05 --- /dev/null +++ b/tests/benchmarks/widgets/widgets/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from widgets.pro. + +add_subdirectory(qtextbrowser) diff --git a/tests/benchmarks/widgets/widgets/qtextbrowser/CMakeLists.txt b/tests/benchmarks/widgets/widgets/qtextbrowser/CMakeLists.txt new file mode 100644 index 0000000000..983d255787 --- /dev/null +++ b/tests/benchmarks/widgets/widgets/qtextbrowser/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qtextbrowser.pro. + +##################################################################### +## tst_bench_QTextBrowser Binary: +##################################################################### + +add_qt_benchmark(tst_bench_QTextBrowser + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qtextbrowser.pro:<TRUE>: +# TEMPLATE = "app" |