diff options
Diffstat (limited to 'tests/benchmarks')
167 files changed, 2665 insertions, 570 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 new file mode 100644 index 0000000000..51f603b595 --- /dev/null +++ b/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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/4.6.0-list.txt b/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt index b915320e9e..707a597361 100644 --- a/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt +++ b/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt @@ -8150,8 +8150,6 @@ qdatetime_p.h qeasingcurve.cpp qeasingcurve.h - qharfbuzz.cpp - qharfbuzz_p.h qhash.cpp qhash.h qiterator.h 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 b332cda84b..0921b8424e 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro +++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro @@ -1,6 +1,13 @@ CONFIG += benchmark QT = core testlib +# Enable c++17 support for std::filesystem +qtConfig(cxx17_filesystem) { + CONFIG += c++17 + gcc:lessThan(QMAKE_GCC_MAJOR_VERSION, 9): \ + QMAKE_LFLAGS += -lstdc++fs +} + TARGET = tst_bench_qdiriterator 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 new file mode 100644 index 0000000000..00bbe74c2d --- /dev/null +++ b/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from test.pro. + +##################################################################### +## tst_bench_qprocess Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qprocess + SOURCES + ../tst_bench_qprocess.cpp + 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 new file mode 100644 index 0000000000..1e35891126 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/events/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 0000000000..173b3b9077 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 0000000000..00ca47aadc --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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/qobject/main.cpp b/tests/benchmarks/corelib/kernel/qobject/main.cpp index 04ca69ad3b..918227f74e 100644 --- a/tests/benchmarks/corelib/kernel/qobject/main.cpp +++ b/tests/benchmarks/corelib/kernel/qobject/main.cpp @@ -51,8 +51,55 @@ private slots: void connect_disconnect_benchmark_data(); void connect_disconnect_benchmark(); void receiver_destroyed_benchmark(); + + void stdAllocator(); }; +class QObjectUsingStandardAllocator : public QObject +{ + Q_OBJECT +public: + QObjectUsingStandardAllocator() + { + } +}; + +template<class T> +inline void allocator() +{ + // We need to allocate certain amount of objects otherwise the new implementation + // may re-use the previous allocation, hiding the somehow high cost of allocation. It + // also helps us to reduce the noise ratio, which is high for memory allocation. + // + // The check depends on memory allocation performance, which is quite non-deterministic. + // When a new memory is requested, the new operator, depending on implementation, is trying + // to re-use existing, already allocated for the process memory. If there is not enough, it + // asks OS to give more. Of course the first case is faster then the second. In the same + // time, from an application perspective the first is also more likely. + // + // As a result, depending on which use-case one wants to test, it may be recommended to run this + // test in separation from others, to "force" expensive code path in the memory allocation. + // + // The time based results are heavily affected by background noise. One really needs to + // prepare OS (no other tasks, CPU and RAM reservations) to run this test, or use + // instruction counting which seems to be less fragile. + + const int count = 256 * 1024; + + QScopedPointer<T> objects[count]; + QBENCHMARK_ONCE { + for (int i = 0; i < count; ++i) + objects[i].reset(new T); + for (int i = 0; i < count; ++i) + objects[i].reset(); + } +} + +void QObjectBenchmark::stdAllocator() +{ + allocator<QObjectUsingStandardAllocator>(); +} + struct Functor { void operator()(){} }; 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 new file mode 100644 index 0000000000..7d6b6dc4f8 --- /dev/null +++ b/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 0000000000..2251914957 --- /dev/null +++ b/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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/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 new file mode 100644 index 0000000000..71226282ab --- /dev/null +++ b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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/qthreadpool/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt new file mode 100644 index 0000000000..00dbc9c298 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 0000000000..ed60ec4495 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 0000000000..4de82d7cc9 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 0000000000..0e2dace380 --- /dev/null +++ b/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 0000000000..40f455752e --- /dev/null +++ b/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 0000000000..99c6a7061d --- /dev/null +++ b/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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/qchar/CMakeLists.txt b/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt new file mode 100644 index 0000000000..c51e2a0059 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qchar SOURCES main.cpp) 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/qdatetime/CMakeLists.txt b/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt new file mode 100644 index 0000000000..6875fdd613 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qdatetime SOURCES main.cpp) 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 new file mode 100644 index 0000000000..ba40760910 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt @@ -0,0 +1,12 @@ +# 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/qlocale/CMakeLists.txt b/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt new file mode 100644 index 0000000000..b8a23bc757 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qlocale SOURCES main.cpp) 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/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/qstring/CMakeLists.txt b/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt new file mode 100644 index 0000000000..1dd6678e8e --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qstring SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt b/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt new file mode 100644 index 0000000000..3947ae1c5e --- /dev/null +++ b/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qtimezone SOURCES main.cpp) 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/outofline.cpp b/tests/benchmarks/corelib/tools/qvector/outofline.cpp index 76a4edaa10..7182a43008 100644 --- a/tests/benchmarks/corelib/tools/qvector/outofline.cpp +++ b/tests/benchmarks/corelib/tools/qvector/outofline.cpp @@ -54,7 +54,7 @@ QVector<double> mixedvector_fill_and_return_helper() std::vector<double> v(N); for (int i = 0; i != N; ++i) v[i] = i; - return QVector<double>::fromStdVector(v); + return QVector<double>(v.begin(), v.end()); } 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 new file mode 100644 index 0000000000..3599a51371 --- /dev/null +++ b/tests/benchmarks/gui/image/blendbench/CMakeLists.txt @@ -0,0 +1,16 @@ +# 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 new file mode 100644 index 0000000000..cbf3e5459b --- /dev/null +++ b/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt @@ -0,0 +1,16 @@ +# 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 new file mode 100644 index 0000000000..46347ef94a --- /dev/null +++ b/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt @@ -0,0 +1,16 @@ +# 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 new file mode 100644 index 0000000000..cf250cdaf6 --- /dev/null +++ b/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt @@ -0,0 +1,16 @@ +# 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 new file mode 100644 index 0000000000..0a6ddda456 --- /dev/null +++ b/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt @@ -0,0 +1,16 @@ +# 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 new file mode 100644 index 0000000000..8d594ef1e7 --- /dev/null +++ b/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt @@ -0,0 +1,16 @@ +# 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 new file mode 100644 index 0000000000..2409a6c43a --- /dev/null +++ b/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt @@ -0,0 +1,16 @@ +# 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/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 new file mode 100644 index 0000000000..aa24b4a19e --- /dev/null +++ b/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt @@ -0,0 +1,16 @@ +# 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 new file mode 100644 index 0000000000..af42a93d27 --- /dev/null +++ b/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt @@ -0,0 +1,16 @@ +# 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..4175518f34 --- /dev/null +++ b/tests/benchmarks/network/CMakeLists.txt @@ -0,0 +1,23 @@ +# Generated from network.pro. + +# special case begin +# SSL library include path is not propagated with private tests which results in +# test not being able to find the ssl header when they are not in the standard +# include paths +if (QT_FEATURE_private_tests) + if (QT_FEATURE_openssl AND QT_FEATURE_openssl_linked AND QT_FEATURE_ssl) + include_directories($<TARGET_PROPERTY:OpenSSL::SSL,INTERFACE_INCLUDE_DIRECTORIES>) + endif() + + if (QT_FEATURE_openssl AND QT_FEATURE_ssl AND NOT QT_FEATURE_openssl_linked) + include_directories($<TARGET_PROPERTY:${INSTALL_CMAKE_NAMESPACE}::SSL_nolink,INTERFACE_INCLUDE_DIRECTORIES>) + endif() +endif() +# special case end + +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/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp index 46bb1791b4..1f3f38eaaf 100644 --- a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp +++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp @@ -105,7 +105,7 @@ void qfile_vs_qnetworkaccessmanager::qnamFileRead() } qint64 elapsed = t.elapsed(); - qDebug() << endl << "Finished!"; + qDebug() << Qt::endl << "Finished!"; qDebug() << "Bytes:" << size; qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; } @@ -138,7 +138,7 @@ void qfile_vs_qnetworkaccessmanager::qnamImmediateFileRead() } qint64 elapsed = t.elapsed(); - qDebug() << endl << "Finished!"; + qDebug() << Qt::endl << "Finished!"; qDebug() << "Bytes:" << size; qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; } @@ -167,7 +167,7 @@ void qfile_vs_qnetworkaccessmanager::qfileFileRead() } qint64 elapsed = t.elapsed(); - qDebug() << endl << "Finished!"; + qDebug() << Qt::endl << "Finished!"; qDebug() << "Bytes:" << size; qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec"; } 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 bcd354ebee..95ee094f00 100644 --- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -545,15 +545,10 @@ void tst_qnetworkreply::echoPerformance() void tst_qnetworkreply::preConnectEncrypted() { QFETCH(int, sleepTime); - QFETCH(QSslConfiguration, sslConfiguration); - bool spdyEnabled = !sslConfiguration.isNull(); - QString hostName = QLatin1String("www.google.com"); QNetworkAccessManager manager; QNetworkRequest request(QUrl("https://" + hostName)); - if (spdyEnabled) - request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true); // make sure we have a full request including // DNS lookup, TCP and SSL handshakes @@ -579,12 +574,7 @@ void tst_qnetworkreply::preConnectEncrypted() manager.clearAccessCache(); // now try to make the connection beforehand - if (spdyEnabled) { - request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true); - manager.connectToHostEncrypted(hostName, 443, sslConfiguration); - } else { - manager.connectToHostEncrypted(hostName); - } + manager.connectToHostEncrypted(hostName); QTestEventLoop::instance().enterLoopMSecs(sleepTime); // now make another request and hopefully use the existing connection @@ -592,8 +582,6 @@ void tst_qnetworkreply::preConnectEncrypted() QNetworkReply *preConnectReply = normalResult.first; QVERIFY(!QTestEventLoop::instance().timeout()); QVERIFY(preConnectReply->error() == QNetworkReply::NoError); - bool spdyWasUsed = preConnectReply->attribute(QNetworkRequest::SpdyWasUsedAttribute).toBool(); - QCOMPARE(spdyEnabled, spdyWasUsed); qint64 preConnectElapsed = preConnectResult.second; qDebug() << request.url().toString() << "full request:" << normalElapsed << "ms, pre-connect request:" << preConnectElapsed << "ms, difference:" @@ -606,27 +594,11 @@ void tst_qnetworkreply::preConnectEncrypted_data() { #ifndef QT_NO_OPENSSL QTest::addColumn<int>("sleepTime"); - QTest::addColumn<QSslConfiguration>("sslConfiguration"); - // start a new normal request after preconnecting is done - QTest::newRow("HTTPS-2secs") << 2000 << QSslConfiguration(); + QTest::newRow("HTTPS-2secs") << 2000; // start a new normal request while preconnecting is in-flight - QTest::newRow("HTTPS-100ms") << 100 << QSslConfiguration(); - - QSslConfiguration spdySslConf = QSslConfiguration::defaultConfiguration(); - QList<QByteArray> nextProtocols = QList<QByteArray>() - << QSslConfiguration::NextProtocolSpdy3_0 - << QSslConfiguration::NextProtocolHttp1_1; - spdySslConf.setAllowedNextProtocols(nextProtocols); - -#if defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) && OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG) - // start a new SPDY request while preconnecting is done - QTest::newRow("SPDY-2secs") << 2000 << spdySslConf; - - // start a new SPDY request while preconnecting is in-flight - QTest::newRow("SPDY-100ms") << 100 << spdySslConf; -#endif // defined (QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) ... + QTest::newRow("HTTPS-100ms") << 100; #endif // QT_NO_OPENSSL } 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/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/opengl/main.cpp b/tests/benchmarks/opengl/main.cpp deleted file mode 100644 index 0886c0e55b..0000000000 --- a/tests/benchmarks/opengl/main.cpp +++ /dev/null @@ -1,412 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include <QtGui> -#include <QtOpenGL> - -#include <qtest.h> - -#include <private/qpaintengine_opengl_p.h> - -class OpenGLBench : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase(); - void cleanupTestCase(); - - void imageDrawing_data(); - void imageDrawing(); - - void pathDrawing_data(); - void pathDrawing(); - - void painterOverhead(); - - void startupCost_data(); - void startupCost(); - - void lineDrawing(); - - void textDrawing_data(); - void textDrawing(); - - void clippedPainting_data(); - void clippedPainting(); - - void gradients_data(); - void gradients(); - - void textureUpload_data(); - void textureUpload(); - - -private: - QGLPixelBuffer *pb; -}; - -void OpenGLBench::initTestCase() -{ - pb = new QGLPixelBuffer(512, 512); - - QPainter p(pb); - p.setRenderHint(QPainter::Antialiasing); - - p.drawImage(0, 0, QImage(256, 256, QImage::Format_ARGB32_Premultiplied)); -} - -void OpenGLBench::cleanupTestCase() -{ - delete pb; -} - -void OpenGLBench::imageDrawing_data() -{ - QTest::addColumn<bool>("smoothPixmapTransform"); - QTest::addColumn<bool>("highQualityAntialiasing"); - QTest::addColumn<bool>("pixmap"); - - for (int i = 0; i < (1 << 3); ++i) { - bool smoothPixmapTransform = i & 1; - bool highQualityAntialiasing = i & 2; - bool pixmap = i & 4; - - QTest::newRow(QString("pixmap=%1 highQualityAntialiasing=%2 smoothPixmapTransform=%3") - .arg(pixmap).arg(highQualityAntialiasing).arg(smoothPixmapTransform).toLatin1().data()) - << pixmap << highQualityAntialiasing << smoothPixmapTransform; - } -} - -void OpenGLBench::imageDrawing() -{ - QFETCH(bool, smoothPixmapTransform); - QFETCH(bool, highQualityAntialiasing); - QFETCH(bool, pixmap); - - QImage img; - QPixmap pm; - - if (pixmap) - pm = QPixmap(800, 800); - else - img = QImage(800, 800, QImage::Format_ARGB32_Premultiplied); - - QPainter p(pb); - p.setRenderHint(QPainter::SmoothPixmapTransform, smoothPixmapTransform); - p.setRenderHint(QPainter::Antialiasing, highQualityAntialiasing); - - QBENCHMARK { - if (pixmap) { - pm.detach(); - p.drawPixmap(0, 0, pm); - } else { - img.detach(); - p.drawImage(0, 0, img); - } - } -} - -Q_DECLARE_METATYPE(QPainterPath) - -void OpenGLBench::pathDrawing_data() -{ - QTest::addColumn<QPainterPath>("path"); - QTest::addColumn<bool>("highQualityAntialiasing"); - - QList<QPair<QPainterPath, QLatin1String> > paths; - - { - QPainterPath path; - path.addRect(-100, -100, 200, 200); - paths << qMakePair(path, QLatin1String("plain rect")); - } - - { - QPainterPath path; - path.addRoundedRect(-100, -100, 200, 200, 50, 50); - paths << qMakePair(path, QLatin1String("rounded rect")); - } - - { - QPainterPath path; - path.addEllipse(-100, -100, 200, 200); - paths << qMakePair(path, QLatin1String("ellipse")); - } - - for (int j = 0; j < (1 << 1); ++j) { - bool highQualityAntialiasing = j & 1; - - for (int i = 0; i < paths.size(); ++i) { - QTest::newRow(QString("path=%1 highQualityAntialiasing=%2") - .arg(paths[i].second).arg(highQualityAntialiasing).toLatin1().data()) - << paths[i].first << highQualityAntialiasing; - } - } -} - -void OpenGLBench::pathDrawing() -{ - QFETCH(QPainterPath, path); - QFETCH(bool, highQualityAntialiasing); - - // warm-up - { - QPainterPath dummy; - dummy.addRect(-1, -1, 2, 2); - QPainter p(pb); - p.setRenderHint(QPainter::Antialiasing, highQualityAntialiasing); - p.translate(pb->width() / 2, pb->height() / 2); - p.rotate(30); - p.drawPath(dummy); - p.end(); - } - - QPainter p(pb); - p.setPen(Qt::NoPen); - p.setBrush(Qt::black); - p.translate(pb->width() / 2, pb->height() / 2); - - QBENCHMARK { - p.setRenderHint(QPainter::Antialiasing, highQualityAntialiasing); - - p.rotate(0.01); - p.drawPath(path); - } -} - -void OpenGLBench::painterOverhead() -{ - QBENCHMARK { - QPainter p(pb); - } -} - -void OpenGLBench::startupCost_data() -{ - QTest::addColumn<bool>("highQualityAntialiasing"); - - QTest::newRow("highQualityAntialiasing=0") << false; - QTest::newRow("highQualityAntialiasing=1") << true; -} - -void OpenGLBench::startupCost() -{ - QFETCH(bool, highQualityAntialiasing); - QPainterPath path; - path.addRoundedRect(-100, -100, 200, 200, 20, 20); - QBENCHMARK { - QGLPixelBuffer buffer(512, 512); - QPainter p(&buffer); - p.setRenderHint(QPainter::Antialiasing, highQualityAntialiasing); - - p.translate(buffer.width() / 2, buffer.height() / 2); - p.drawPath(path); - } -} - -void OpenGLBench::lineDrawing() -{ - QPainter p(pb); - - QBENCHMARK { - p.drawLine(10, 10, 500, 500); - } -} - -void OpenGLBench::textDrawing_data() -{ - QTest::addColumn<int>("lines"); - - int lines[] = { 1, 2, 4, 8, 16, 32, 64, 128 }; - - QTest::newRow("text lines=1 (warmup run)") << 1; - for (unsigned int i = 0; i < sizeof(lines) / sizeof(int); ++i) - QTest::newRow(QString("text lines=%0").arg(lines[i]).toLatin1().data()) << lines[i]; -} - -void OpenGLBench::textDrawing() -{ - QPainter p(pb); - - QFETCH(int, lines); - - p.translate(0, 16); - QBENCHMARK { - for (int i = 0; i < lines; ++i) - p.drawText(0, i, "Hello World!"); - } -} - -void OpenGLBench::clippedPainting_data() -{ - QTest::addColumn<QPainterPath>("path"); - - QRectF rect = QRectF(0, 0, pb->width(), pb->height()).adjusted(5, 5, -5, -5); - - { - QPainterPath path; - path.addRect(rect); - QTest::newRow("rect path") << path; - } - - { - QPainterPath path; - path.addRoundedRect(rect, 5, 5); - QTest::newRow("rounded rect path") << path; - } - - { - QPainterPath path; - path.addEllipse(rect); - QTest::newRow("ellipse path") << path; - } -} - -void OpenGLBench::clippedPainting() -{ - QFETCH(QPainterPath, path); - - QBENCHMARK { - QPainter p(pb); - p.setPen(Qt::NoPen); - p.setBrush(Qt::black); - - p.setClipPath(path); - p.drawRect(0, 0, pb->width(), pb->height()); - } -} - -Q_DECLARE_METATYPE(QGradient::Type) - -void OpenGLBench::gradients_data() -{ - QTest::addColumn<QGradient::Type>("gradientType"); - QTest::addColumn<bool>("objectBoundingMode"); - - QTest::newRow("warmup run") << QGradient::LinearGradient << false; - - QTest::newRow("linear gradient") << QGradient::LinearGradient << false; - QTest::newRow("radial gradient") << QGradient::RadialGradient << false; - QTest::newRow("conical gradient") << QGradient::ConicalGradient << false; - - QTest::newRow("linear gradient, object bounding mode") << QGradient::LinearGradient << true; - QTest::newRow("radial gradient, object bounding mode") << QGradient::RadialGradient << true; - QTest::newRow("conical gradient, object bounding mode") << QGradient::ConicalGradient << true; -} - -void OpenGLBench::gradients() -{ - QFETCH(QGradient::Type, gradientType); - QFETCH(bool, objectBoundingMode); - - QPointF a; - QPointF b = objectBoundingMode ? QPointF(1, 1) : QPointF(pb->width(), pb->height()); - - QGradient gradient; - switch (gradientType) { - case QGradient::LinearGradient: - gradient = QLinearGradient(a, b); - break; - case QGradient::RadialGradient: - gradient = QRadialGradient(a, b.x() / 2, b); - break; - case QGradient::ConicalGradient: - gradient = QConicalGradient((a + b)/2, 0); - break; - default: - break; - } - - if (objectBoundingMode) - gradient.setCoordinateMode(QGradient::ObjectBoundingMode); - - gradient.setColorAt(0, Qt::red); - gradient.setColorAt(0.2, Qt::blue); - gradient.setColorAt(0.4, Qt::transparent); - gradient.setColorAt(0.6, Qt::green); - gradient.setColorAt(0.8, Qt::black); - gradient.setColorAt(1, Qt::white); - - QPainter p(pb); - - QBENCHMARK { - p.fillRect(0, 0, pb->width(), pb->height(), gradient); - glFinish(); - } -} - -void OpenGLBench::textureUpload_data() -{ - QTest::addColumn<int>("size"); - QTest::addColumn<int>("flags"); - QTest::addColumn<int>("format"); - - int sizes[] = { 8, 10, 16, 20, 32, 50, 64, 100, 128, 200, 256, 500, 512, 1000, 1024, 2000, 2048, -1 }; - int flags[] = { QGLContext::InternalBindOption, - QGLContext::DefaultBindOption, - -1 }; - int formats[] = { GL_RGB, GL_RGBA, -1 }; - - for (int s = 0; sizes[s] != -1; ++s) { - for (int f = 0; flags[f] != -1; ++f) { - for (int a = 0; formats[a] != -1; ++a) { - QByteArray name; - name.append("size=").append(QByteArray::number(sizes[s])); - name.append(", flags=").append(f == 0 ? "internal" : "default"); - name.append(", format=").append(a == 0 ? "RGB" : "RGBA"); - QTest::newRow(name.constData()) << sizes[s] << flags[f] << formats[a]; - } - } - } -} - -void OpenGLBench::textureUpload() -{ - QFETCH(int, size); - QFETCH(int, flags); - QFETCH(int, format); - - QPixmap pixmap(size, size); - - if (format == GL_RGB) - pixmap.fill(Qt::red); - else - pixmap.fill(Qt::transparent); - - pb->makeCurrent(); - QGLContext *context = const_cast<QGLContext *>(QGLContext::currentContext()); - QTime time; - - time.start(); - context->bindTexture(pixmap, GL_TEXTURE_2D, format, (QGLContext::BindOptions) flags); - QTest::setBenchmarkResult(time.elapsed(), QTest::WalltimeMilliseconds); -} - -QTEST_MAIN(OpenGLBench) - -#include "main.moc" diff --git a/tests/benchmarks/opengl/opengl.pro b/tests/benchmarks/opengl/opengl.pro deleted file mode 100644 index 04e75065fd..0000000000 --- a/tests/benchmarks/opengl/opengl.pro +++ /dev/null @@ -1,9 +0,0 @@ -TEMPLATE = app -TARGET = tst_bench_opengl - -QT += core-private gui-private opengl opengl-private testlib - -SOURCES += main.cpp - -include(../trusted-benchmarks.pri) -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 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..e5398b4c1e --- /dev/null +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt @@ -0,0 +1,368 @@ +# 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 + Qt::OpenGLWidgets +) diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro index ded6a06795..addb60433b 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro @@ -1,7 +1,7 @@ TEMPLATE = app QT += svg testlib -qtHaveModule(opengl): QT += opengl +qtHaveModule(opengl): QT += opengl openglwidgets HEADERS += widgets/gvbwidget.h \ widgets/abstractscrollarea.h \ diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/main.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/main.cpp index 87ab80d74f..907a320d76 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/main.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/main.cpp @@ -28,9 +28,8 @@ #include <QtTest/QtTest> -#include <QtGui/qgraphicsview.h> #include <QtGui/qpixmapcache.h> -#include <QtGui/qdesktopwidget.h> +#include <QtGui/QScreen> #include "mainview.h" #include "dummydatagen.h" @@ -308,7 +307,8 @@ void tst_GraphicsViewBenchmark::initTestCase() if (mSettings->size().width() > 0 && mSettings->size().height() > 0) { mMainView->resize(mSettings->size().width(), mSettings->size().height()); mMainView->show(); - } else if (QApplication::desktop()->width() < 360 || QApplication::desktop()->height() < 640) { + } else if (QGuiApplication::primaryScreen()->geometry().width() < 360 + || QGuiApplication::primaryScreen()->geometry().height() < 640) { mMainView->showFullScreen(); } else { mMainView->resize(360, 640); @@ -326,7 +326,7 @@ void tst_GraphicsViewBenchmark::initTestCase() currentListSize = -1; currentListType = None; - QVERIFY(QTest::qWaitForWindowShown(mMainView)); + QVERIFY(QTest::qWaitForWindowExposed(mMainView)); } void tst_GraphicsViewBenchmark::cleanupTestCase() @@ -760,7 +760,8 @@ int main(int argc, char *argv[]) if (settings.size().width() > 0 && settings.size().height() > 0) { view.resize(settings.size().width(), settings.size().height()); view.show(); - } else if (QApplication::desktop()->width() < 360 || QApplication::desktop()->height() < 640) { + } else if (QGuiApplication::primaryScreen()->geometry().width() < 360 + || QApplication::primaryScreen()->geometry().height() < 640) { view.showFullScreen(); } else { view.resize(360, 640); diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp index b8bd55789d..98bf9f8521 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp @@ -26,10 +26,12 @@ ** ****************************************************************************/ -#include <QtGui> #include "button.h" #include "theme.h" +#include <QtGui> +#include <QGraphicsSceneMouseEvent> + static const int MinTextWidthAsChars = 8; class ButtonPrivate { diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp index fe87a2abc4..933af2f770 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp @@ -78,7 +78,7 @@ bool ListModel::setData(const QModelIndex &index, const QVariant &value, int rol void ListModel::clear() { m_items.clear(); - reset(); + clear(); } QModelIndex ListModel::index(int row, int column, const QModelIndex &parent) const diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp index 8f7736010d..f2423cb899 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp @@ -30,7 +30,7 @@ #include <QApplication> #include <QGraphicsLinearLayout> #ifndef QT_NO_OPENGL -#include <QGLWidget> +#include <QtOpenGLWidgets/QOpenGLWidget> #endif #include <QObject> @@ -253,10 +253,10 @@ void MainView::construct() if (m_enableOpenGL) { qDebug() << "OpenGL enabled"; m_scene->setSortCacheEnabled(false); - setViewport(new QGLWidget); + setViewport(new QOpenGLWidget); // Qt doc says: This is the preferred update mode for - // viewports that do not support partial updates, such as QGLWidget... + // viewports that do not support partial updates, such as QOpenGLWidget... setViewportUpdateMode(QGraphicsView::FullViewportUpdate); } else #endif diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp index 67f34859c1..7ff089fa1e 100644 --- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp +++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp @@ -26,8 +26,6 @@ ** ****************************************************************************/ -#include <QtGui> - #include "simplelistview.h" #include "scrollbar.h" #include "simplelistview.h" @@ -36,6 +34,10 @@ #include "listitemcache.h" #include "theme.h" +#include <QtGui> +#include <QGraphicsGridLayout> +#include <QGraphicsSceneResizeEvent> + class SimpleListViewPrivate { Q_DECLARE_PUBLIC(SimpleListView) 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/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/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" |