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/functional/GraphicsViewBenchmark/widgets/mainview.cpp1
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp2
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp5
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp12
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp5
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chip.cpp6
8 files changed, 6 insertions, 29 deletions
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
index c8ccb60dbb..8f7736010d 100644
--- a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
@@ -270,7 +270,6 @@ void MainView::construct()
// Turn off automatic background
setAttribute(Qt::WA_OpaquePaintEvent);
- setAttribute(Qt::WA_NoBackground);
setAttribute(Qt::WA_NoSystemBackground);
setAutoFillBackground(false);
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index b15aad04cd..e0c5a7f683 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -60,7 +60,7 @@ public:
{
Q_UNUSED(option);
Q_UNUSED(widget);
- painter->drawRoundRect(rect());
+ painter->drawRoundedRect(rect(), 25, 25, Qt::RelativeSize);
painter->drawLine(rect().topLeft(), rect().bottomRight());
painter->drawLine(rect().bottomLeft(), rect().topRight());
}
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
index 5c97d7f738..caf5455a80 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
@@ -53,7 +53,7 @@ public:
{
Q_UNUSED(option);
Q_UNUSED(widget);
- painter->drawRoundRect(rect());
+ painter->drawRoundedRect(rect(), 25, 25, Qt::RelativeSize);
painter->drawLine(rect().topLeft(), rect().bottomRight());
painter->drawLine(rect().bottomLeft(), rect().topRight());
}
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
index 57ab62b1c3..2277ae0f14 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
@@ -38,7 +38,7 @@ Chip::Chip(const QColor &color, int x, int y)
setZValue((x + y) % 2);
setFlags(ItemIsSelectable | ItemIsMovable);
- setAcceptsHoverEvents(true);
+ setAcceptHoverEvents(true);
}
QRectF Chip::boundingRect() const
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
index de4e9e5ad7..6e0ac445a6 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
@@ -30,12 +30,7 @@
#include <QtGui>
-#if 0 // Used to be included in Qt4 for Q_WS_WIN
-#define CALLGRIND_START_INSTRUMENTATION {}
-#define CALLGRIND_STOP_INSTRUMENTATION {}
-#else
#include "valgrind/callgrind.h"
-#endif
#ifndef QT_NO_OPENGL
#include <QtOpenGL>
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
index e0cc0f8eb4..140278b8f6 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
@@ -27,16 +27,7 @@
****************************************************************************/
#include <QtGui>
-#if 0 // Used to be included in Qt4 for Q_WS_WIN
-#define CALLGRIND_START_INSTRUMENTATION {}
-#define CALLGRIND_STOP_INSTRUMENTATION {}
-#else
#include "valgrind/callgrind.h"
-#endif
-
-#if 0 // Used to be included in Qt4 for Q_WS_X11
-extern void qt_x11_wait_for_window_manager(QWidget *);
-#endif
class View : public QGraphicsView
{
@@ -89,9 +80,6 @@ int main(int argc, char *argv[])
View view(&scene, item);
view.resize(300, 300);
view.show();
-#if 0 // Used to be included in Qt4 for Q_WS_X11
- qt_x11_wait_for_window_manager(&view);
-#endif
return app.exec();
}
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
index 1fbb229cd8..566d16ca51 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
@@ -27,12 +27,7 @@
****************************************************************************/
#include <QtGui>
-#if 0 // Used to be included in Qt4 for Q_WS_WIN
-#define CALLGRIND_START_INSTRUMENTATION {}
-#define CALLGRIND_STOP_INSTRUMENTATION {}
-#else
#include "valgrind/callgrind.h"
-#endif
class ItemMover : public QObject
{
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chip.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chip.cpp
index cf82282bfe..21eb622f15 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chip.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chip.cpp
@@ -57,9 +57,9 @@ void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
{
Q_UNUSED(widget);
- QColor fillColor = (option->state & QStyle::State_Selected) ? color.dark(150) : color;
+ QColor fillColor = (option->state & QStyle::State_Selected) ? color.darker(150) : color;
if (option->state & QStyle::State_MouseOver)
- fillColor = fillColor.light(125);
+ fillColor = fillColor.lighter(125);
if (option->levelOfDetail < 0.2) {
if (option->levelOfDetail < 0.125) {
@@ -82,7 +82,7 @@ void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
pen.setWidth(width);
QBrush b = painter->brush();
- painter->setBrush(QBrush(fillColor.dark(option->state & QStyle::State_Sunken ? 120 : 100)));
+ painter->setBrush(QBrush(fillColor.darker(option->state & QStyle::State_Sunken ? 120 : 100)));
painter->drawRect(QRect(14, 14, 79, 39));
painter->setBrush(b);