diff options
author | Charles Yin <charles.yin@nokia.com> | 2012-03-08 14:04:25 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-13 02:02:49 +0100 |
commit | 5f018216f680e8226b46aa3939abec52047eaee7 (patch) | |
tree | 111c5966c9bb2a2a0163f2af624f5d8e78e13de8 /src/qmltest/quicktestevent.cpp | |
parent | 07160d02c3b6e2840621544b19dd79a201a06201 (diff) |
Remove the rest of qtquick 1.0 code from qmltest
Change-Id: I0d20583faf1a75f287dcd866b11457254d250354
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/qmltest/quicktestevent.cpp')
-rw-r--r-- | src/qmltest/quicktestevent.cpp | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp index f996adbeca..94051711f1 100644 --- a/src/qmltest/quicktestevent.cpp +++ b/src/qmltest/quicktestevent.cpp @@ -42,12 +42,8 @@ #include "quicktestevent_p.h" #include <QtTest/qtestkeyboard.h> #include <QtQml/qqml.h> -#if defined(QML_VERSION) && QML_VERSION >= 0x020000 #include <QtQuick/qquickitem.h> #include <QtQuick/qquickcanvas.h> -#define QUICK_TEST_SCENEGRAPH 1 -#endif -#include <QtWidgets/qgraphicsscene.h> QT_BEGIN_NAMESPACE @@ -114,15 +110,9 @@ namespace QtQuickTest } QPoint pos; -#ifdef QUICK_TEST_SCENEGRAPH QQuickItem *sgitem = qobject_cast<QQuickItem *>(item); - if (sgitem) { + if (sgitem) pos = sgitem->mapToScene(_pos).toPoint(); - } else -#endif - { - qWarning("No suitable QtQuick1 implementation is available!"); - } QTEST_ASSERT(button == Qt::NoButton || button & Qt::MouseButtonMask); QTEST_ASSERT(stateKey == 0 || stateKey & Qt::KeyboardModifierMask); @@ -168,15 +158,10 @@ namespace QtQuickTest QTest::qWait(delay); QPoint pos; -#ifdef QUICK_TEST_SCENEGRAPH QQuickItem *sgitem = qobject_cast<QQuickItem *>(item); - if (sgitem) { + if (sgitem) pos = sgitem->mapToScene(_pos).toPoint(); - } else -#endif - { - qWarning("No suitable QtQuick1 implementation is available!"); - } + QTEST_ASSERT(buttons == Qt::NoButton || buttons & Qt::MouseButtonMask); QTEST_ASSERT(stateKey == 0 || stateKey & Qt::KeyboardModifierMask); @@ -272,24 +257,10 @@ bool QuickTestEvent::mouseMove QWindow *QuickTestEvent::eventWindow() { -#ifdef QUICK_TEST_SCENEGRAPH QQuickItem *sgitem = qobject_cast<QQuickItem *>(parent()); if (sgitem) return sgitem->canvas(); -#endif return 0; - /* - QQuickItem *item = qobject_cast<QQuickItem *>(parent()); - if (!item) - return 0; - QGraphicsScene *s = item->scene(); - if (!s) - return 0; - QList<QGraphicsView *> views = s->views(); - if (views.isEmpty()) - return 0; - return views.at(0)->windowHandle(); - */ } QT_END_NAMESPACE |