summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/widgets/graphicsview
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/widgets/graphicsview')
-rw-r--r--tests/benchmarks/widgets/graphicsview/CMakeLists.txt10
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt2
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt367
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/GraphicsViewBenchmark.pro2
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/main.cpp11
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp4
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp6
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp6
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicslayout/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsscene/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/CMakeLists.txt55
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/CMakeLists.txt48
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/CMakeLists.txt13
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/CMakeLists.txt13
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp7
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h1
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp21
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicswidget/CMakeLists.txt17
22 files changed, 634 insertions, 36 deletions
diff --git a/tests/benchmarks/widgets/graphicsview/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/CMakeLists.txt
new file mode 100644
index 0000000000..3928328a98
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from graphicsview.pro.
+
+add_subdirectory(functional)
+add_subdirectory(qgraphicsanchorlayout)
+add_subdirectory(qgraphicsitem)
+add_subdirectory(qgraphicslayout)
+add_subdirectory(qgraphicslinearlayout)
+add_subdirectory(qgraphicsscene)
+add_subdirectory(qgraphicsview)
+add_subdirectory(qgraphicswidget)
diff --git a/tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt
new file mode 100644
index 0000000000..20e4286a6e
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt
@@ -0,0 +1,2 @@
+# Generated from functional.pro.
+
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt
new file mode 100644
index 0000000000..8fac5c3497
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt
@@ -0,0 +1,367 @@
+# Generated from GraphicsViewBenchmark.pro.
+
+#####################################################################
+## tst_GraphicsViewBenchmark Binary:
+#####################################################################
+
+add_qt_benchmark(tst_GraphicsViewBenchmark
+ SOURCES
+ main.cpp
+ widgets/abstractitemcontainer.cpp widgets/abstractitemcontainer.h
+ widgets/abstractitemview.cpp widgets/abstractitemview.h
+ widgets/abstractscrollarea.cpp widgets/abstractscrollarea.h
+ widgets/abstractviewitem.cpp widgets/abstractviewitem.h
+ widgets/backgrounditem.cpp widgets/backgrounditem.h
+ widgets/button.cpp widgets/button.h
+ widgets/commandline.cpp widgets/commandline.h
+ widgets/dummydatagen.cpp widgets/dummydatagen.h
+ widgets/gvbwidget.cpp widgets/gvbwidget.h
+ widgets/iconitem.cpp widgets/iconitem.h
+ widgets/itemrecyclinglist.cpp widgets/itemrecyclinglist.h
+ widgets/itemrecyclinglistview.cpp widgets/itemrecyclinglistview.h
+ widgets/label.cpp widgets/label.h
+ widgets/listitem.cpp widgets/listitem.h
+ widgets/listitemcache.cpp widgets/listitemcache.h
+ widgets/listitemcontainer.cpp widgets/listitemcontainer.h
+ widgets/listmodel.cpp widgets/listmodel.h
+ widgets/listwidget.cpp widgets/listwidget.h
+ widgets/mainview.cpp widgets/mainview.h
+ widgets/menu.cpp widgets/menu.h
+ widgets/recycledlistitem.cpp widgets/recycledlistitem.h
+ widgets/scrollbar.cpp widgets/scrollbar.h
+ widgets/scroller.cpp widgets/scroller.h widgets/scroller_p.h
+ widgets/settings.cpp widgets/settings.h
+ widgets/simplelist.cpp widgets/simplelist.h
+ widgets/simplelistview.cpp widgets/simplelistview.h
+ widgets/theme.cpp widgets/theme.h
+ widgets/themeevent.cpp widgets/themeevent.h
+ widgets/topbar.cpp widgets/topbar.h
+ INCLUDE_DIRECTORIES
+ widgets
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Svg
+ Qt::Test
+)
+
+# Resources:
+set_source_files_properties("resources/blue_SVG/blue_background_360x640px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "background.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_background_horisontal_640x360px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "background_horisontal.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_default_icon_52x52px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_list_divider_360x76px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_list_divider.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_list_highlighter_360x76px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_list_highlighter.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_idle.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_offline.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_online_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_online.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_scroll_16x80px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "scroll.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_scrollbar_7x14px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "scrollbar.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_status_field_left_14x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_left.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_status_field_middle_14x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_middle.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_status_field_right_14x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_right.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_topbar_356x96px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "topbar.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_topbar_horisontal_636x96px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "topbar_horisontal.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_user_default_icon_68x68px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_default_icon.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_user_status_idle_38x38px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_idle.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_user_status_offline_38x38px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_offline.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_user_status_online_38x38px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_online.svg"
+)
+set(GraphicsViewBenchmark_resource_files
+ "resources/blue_SVG/blue_background_360x640px.svg"
+ "resources/blue_SVG/blue_background_horisontal_640x360px.svg"
+ "resources/blue_SVG/blue_contact_default_icon_52x52px.svg"
+ "resources/blue_SVG/blue_contact_list_divider_360x76px.svg"
+ "resources/blue_SVG/blue_contact_list_highlighter_360x76px.svg"
+ "resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
+ "resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
+ "resources/blue_SVG/blue_contact_status_online_33x33px.svg"
+ "resources/blue_SVG/blue_scroll_16x80px.svg"
+ "resources/blue_SVG/blue_scrollbar_7x14px.svg"
+ "resources/blue_SVG/blue_status_field_left_14x24px.svg"
+ "resources/blue_SVG/blue_status_field_middle_14x24px.svg"
+ "resources/blue_SVG/blue_status_field_right_14x24px.svg"
+ "resources/blue_SVG/blue_topbar_356x96px.svg"
+ "resources/blue_SVG/blue_topbar_horisontal_636x96px.svg"
+ "resources/blue_SVG/blue_user_default_icon_68x68px.svg"
+ "resources/blue_SVG/blue_user_status_idle_38x38px.svg"
+ "resources/blue_SVG/blue_user_status_offline_38x38px.svg"
+ "resources/blue_SVG/blue_user_status_online_38x38px.svg"
+)
+
+add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark"
+ PREFIX
+ "/themes/blue"
+ FILES
+ ${GraphicsViewBenchmark_resource_files}
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_idle.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_offline.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_online_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_online.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_background_360x640px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "background.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_background_horisontal_640x360px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "background_horisontal.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_contact_default_icon_53x53px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_contact_default_icon_highlight_53x53px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon_highlight.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_contact_list_divider_360x76px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_list_divider.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_contact_list_highlighter_357x80px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_list_highlighter.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_scroll_5x80px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "scroll.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_scrollbar_5x14px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "scrollbar.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_status_field_left_14x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_left.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_status_field_middle_10x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_middle.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_status_field_right_14x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_right.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_topbar_356x96px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "topbar.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_topbar_horisontal_636x96px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "topbar_horisontal.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_user_default_icon_84x68px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_default_icon.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_user_status_idle_24x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_idle.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_user_status_offline_24x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_offline.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_user_status_online_24x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_online.svg"
+)
+set(GraphicsViewBenchmark1_resource_files
+ "resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
+ "resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
+ "resources/blue_SVG/blue_contact_status_online_33x33px.svg"
+ "resources/lime_SVG/lime_background_360x640px.svg"
+ "resources/lime_SVG/lime_background_horisontal_640x360px.svg"
+ "resources/lime_SVG/lime_contact_default_icon_53x53px.svg"
+ "resources/lime_SVG/lime_contact_default_icon_highlight_53x53px.svg"
+ "resources/lime_SVG/lime_contact_list_divider_360x76px.svg"
+ "resources/lime_SVG/lime_contact_list_highlighter_357x80px.svg"
+ "resources/lime_SVG/lime_scroll_5x80px.svg"
+ "resources/lime_SVG/lime_scrollbar_5x14px.svg"
+ "resources/lime_SVG/lime_status_field_left_14x24px.svg"
+ "resources/lime_SVG/lime_status_field_middle_10x24px.svg"
+ "resources/lime_SVG/lime_status_field_right_14x24px.svg"
+ "resources/lime_SVG/lime_topbar_356x96px.svg"
+ "resources/lime_SVG/lime_topbar_horisontal_636x96px.svg"
+ "resources/lime_SVG/lime_user_default_icon_84x68px.svg"
+ "resources/lime_SVG/lime_user_status_idle_24x24px.svg"
+ "resources/lime_SVG/lime_user_status_offline_24x24px.svg"
+ "resources/lime_SVG/lime_user_status_online_24x24px.svg"
+)
+
+add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark1"
+ PREFIX
+ "/themes/lime"
+ FILES
+ ${GraphicsViewBenchmark1_resource_files}
+)
+set_source_files_properties("resources/avatars/avatar_man_001_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_001.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_002_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_002.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_003_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_003.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_004_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_004.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_005_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_005.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_006_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_006.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_007_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_007.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_008_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_008.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_009_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_009.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_010_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_010.png"
+)
+set_source_files_properties("resources/avatars/avatar_picture_001_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_011.png"
+)
+set_source_files_properties("resources/avatars/avatar_picture_002_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_012.png"
+)
+set_source_files_properties("resources/avatars/avatar_picture_003_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_013.png"
+)
+set_source_files_properties("resources/avatars/avatar_picture_004_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_014.png"
+)
+set_source_files_properties("resources/avatars/avatar_picture_005_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_015.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_001_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_016.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_002_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_017.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_003_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_018.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_004_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_019.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_005_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_020.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_006_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_021.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_007_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_022.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_008_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_023.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_009_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_024.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_010_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_025.png"
+)
+set(GraphicsViewBenchmark2_resource_files
+ "resources/avatars/avatar_man_001_58x58.png"
+ "resources/avatars/avatar_man_002_58x58.png"
+ "resources/avatars/avatar_man_003_58x58.png"
+ "resources/avatars/avatar_man_004_58x58.png"
+ "resources/avatars/avatar_man_005_58x58.png"
+ "resources/avatars/avatar_man_006_58x58.png"
+ "resources/avatars/avatar_man_007_58x58.png"
+ "resources/avatars/avatar_man_008_58x58.png"
+ "resources/avatars/avatar_man_009_58x58.png"
+ "resources/avatars/avatar_man_010_58x58.png"
+ "resources/avatars/avatar_picture_001_58x58.png"
+ "resources/avatars/avatar_picture_002_58x58.png"
+ "resources/avatars/avatar_picture_003_58x58.png"
+ "resources/avatars/avatar_picture_004_58x58.png"
+ "resources/avatars/avatar_picture_005_58x58.png"
+ "resources/avatars/avatar_woman_001_58x58.png"
+ "resources/avatars/avatar_woman_002_58x58.png"
+ "resources/avatars/avatar_woman_003_58x58.png"
+ "resources/avatars/avatar_woman_004_58x58.png"
+ "resources/avatars/avatar_woman_005_58x58.png"
+ "resources/avatars/avatar_woman_006_58x58.png"
+ "resources/avatars/avatar_woman_007_58x58.png"
+ "resources/avatars/avatar_woman_008_58x58.png"
+ "resources/avatars/avatar_woman_009_58x58.png"
+ "resources/avatars/avatar_woman_010_58x58.png"
+)
+
+add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark2"
+ PREFIX
+ "/avatars"
+ FILES
+ ${GraphicsViewBenchmark2_resource_files}
+)
+set_source_files_properties("resources/contacts/areacodes.txt"
+ PROPERTIES QT_RESOURCE_ALIAS "areacodes.txt"
+)
+set_source_files_properties("resources/contacts/firstnamesF.txt"
+ PROPERTIES QT_RESOURCE_ALIAS "firstnamesF.txt"
+)
+set_source_files_properties("resources/contacts/firstnamesM.txt"
+ PROPERTIES QT_RESOURCE_ALIAS "firstnamesM.txt"
+)
+set_source_files_properties("resources/contacts/lastnames.txt"
+ PROPERTIES QT_RESOURCE_ALIAS "lastnames.txt"
+)
+set(GraphicsViewBenchmark3_resource_files
+ "resources/contacts/areacodes.txt"
+ "resources/contacts/firstnamesF.txt"
+ "resources/contacts/firstnamesM.txt"
+ "resources/contacts/lastnames.txt"
+)
+
+add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark3"
+ PREFIX
+ "/contact"
+ FILES
+ ${GraphicsViewBenchmark3_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:GraphicsViewBenchmark.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_GraphicsViewBenchmark CONDITION TARGET Qt::OpenGL
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/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"