summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp')
-rw-r--r--tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp
new file mode 100644
index 0000000..97837e2
--- /dev/null
+++ b/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QGraphicsItem>
+#include <QGraphicsScene>
+#include <QGraphicsView>
+#include <QGraphicsWidget>
+//TESTED_FILES=
+
+class tst_QGraphicsWidget : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QGraphicsWidget();
+ virtual ~tst_QGraphicsWidget();
+
+public slots:
+ void init();
+ void cleanup();
+
+private slots:
+ void move();
+};
+
+tst_QGraphicsWidget::tst_QGraphicsWidget()
+{
+}
+
+tst_QGraphicsWidget::~tst_QGraphicsWidget()
+{
+}
+
+void tst_QGraphicsWidget::init()
+{
+}
+
+void tst_QGraphicsWidget::cleanup()
+{
+}
+
+void tst_QGraphicsWidget::move()
+{
+ QGraphicsScene scene;
+ QGraphicsWidget *widget = new QGraphicsWidget();
+ scene.addItem(widget);
+ QGraphicsView view(&scene);
+ view.show();
+ QBENCHMARK {
+ widget->setPos(qrand(),qrand());
+ }
+}
+
+QTEST_MAIN(tst_QGraphicsWidget)
+#include "tst_qgraphicswidget.moc"