diff options
author | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-07 10:59:16 (GMT) |
---|---|---|
committer | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-07 10:59:16 (GMT) |
commit | 6e13559503040963c28dd8f5b6881e3a2b9d5596 (patch) | |
tree | 3e030548ffb1667d5fa8cd2020fd7b28749d0411 /tests/benchmarks | |
parent | 939623b2bc8e441618ee1a1886cc656880bee62b (diff) | |
parent | d8f76432c3937690c37972136c02a5a264bc941f (diff) | |
download | Qt-6e13559503040963c28dd8f5b6881e3a2b9d5596.zip Qt-6e13559503040963c28dd8f5b6881e3a2b9d5596.tar.gz Qt-6e13559503040963c28dd8f5b6881e3a2b9d5596.tar.bz2 |
Merge commit 'origin/4.5'
Conflicts:
src/gui/graphicsview/qgraphicsitem.cpp
src/gui/graphicsview/qgraphicsitem_p.h
src/gui/graphicsview/qgraphicsscene.cpp
src/gui/painting/qtransform.cpp
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/qgraphicswidget/qgraphicswidget.pro | 6 | ||||
-rw-r--r-- | tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp | 60 |
2 files changed, 66 insertions, 0 deletions
diff --git a/tests/benchmarks/qgraphicswidget/qgraphicswidget.pro b/tests/benchmarks/qgraphicswidget/qgraphicswidget.pro new file mode 100644 index 0000000..f1ec54e --- /dev/null +++ b/tests/benchmarks/qgraphicswidget/qgraphicswidget.pro @@ -0,0 +1,6 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_qgraphicswidget +TEMPLATE = app +# Input +SOURCES += tst_qgraphicswidget.cpp 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" |