diff options
author | Robin Burchell <[email protected]> | 2013-05-28 11:31:56 +0000 |
---|---|---|
committer | Robin Burchell <[email protected]> | 2013-06-11 01:02:03 +0200 |
commit | a23a23cbcfa27366da9d12e535899864f6eb4cbd (patch) | |
tree | 0772239acb4865914e4075d0fffb5c66fb8bc6b3 /src/quicktestlib/quicktestevent.cpp | |
parent | 7c357e999dec36f4c990671dd0e082c08150c915 (diff) |
This is outdated (QSGView and friends are long gone) and not really needed given
that Qt 5 has its own copy of this code living in qtdeclarative.
Change-Id: I947366ce280a87c59c9e60f6665f8c6ab52b832f
Reviewed-by: Matthew Vogt <[email protected]>
Diffstat (limited to 'src/quicktestlib/quicktestevent.cpp')
-rw-r--r-- | src/quicktestlib/quicktestevent.cpp | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/quicktestlib/quicktestevent.cpp b/src/quicktestlib/quicktestevent.cpp index fe66cbb..163e5a9 100644 --- a/src/quicktestlib/quicktestevent.cpp +++ b/src/quicktestlib/quicktestevent.cpp @@ -44,11 +44,6 @@ #include <QtDeclarative/qdeclarative.h> #include <QtDeclarative/qdeclarativeitem.h> #include <QtDeclarative/qdeclarativeview.h> -#if defined(QML_VERSION) && QML_VERSION >= 0x020000 -#include <QtDeclarative/qsgitem.h> -#include <QtDeclarative/qsgcanvas.h> -#define QUICK_TEST_SCENEGRAPH 1 -#endif #include <QtGui/qgraphicsscene.h> QT_BEGIN_NAMESPACE @@ -123,21 +118,13 @@ namespace QtQuickTest QPoint pos; QDeclarativeView *view = qobject_cast<QDeclarativeView *>(widget); QWidget *eventWidget = widget; -#ifdef QUICK_TEST_SCENEGRAPH - QSGItem *sgitem = qobject_cast<QSGItem *>(item); - if (sgitem) { - pos = sgitem->mapToScene(_pos).toPoint(); - } else -#endif - { - QDeclarativeItem *ditem = qobject_cast<QDeclarativeItem *>(item); - if (!ditem) { - qWarning("Mouse event target is not an Item"); - return; - } - pos = view->mapFromScene(ditem->mapToScene(_pos)); - eventWidget = view->viewport(); + QDeclarativeItem *ditem = qobject_cast<QDeclarativeItem *>(item); + if (!ditem) { + qWarning("Mouse event target is not an Item"); + return; } + pos = view->mapFromScene(ditem->mapToScene(_pos)); + eventWidget = view->viewport(); QTEST_ASSERT(button == Qt::NoButton || button & Qt::MouseButtonMask); QTEST_ASSERT(stateKey == 0 || stateKey & Qt::KeyboardModifierMask); @@ -250,11 +237,6 @@ bool QuickTestEvent::mouseMove QWidget *QuickTestEvent::eventWidget() { -#ifdef QUICK_TEST_SCENEGRAPH - QSGItem *sgitem = qobject_cast<QSGItem *>(parent()); - if (sgitem) - return sgitem->canvas(); -#endif QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(parent()); if (!item) return 0; |