aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/pointerhandlers/qquickpointerhandler
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-05-19 08:23:31 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2017-05-19 10:33:41 +0000
commita09b2f6fcd087e849f4e766a03c1ab47ae49d0d7 (patch)
treeed41d6ecbe0b78c1faa123ea7a969a2ad7ebbe80 /tests/auto/quick/pointerhandlers/qquickpointerhandler
parent80e5e6976afe4425cc8fd22c010fcf039c5b4b91 (diff)
tst_qquickpointerhandler: Remove unused includes; better debug output
Change-Id: I1e0539fe24e19ca15641fa4007488b33c24ab8ba Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'tests/auto/quick/pointerhandlers/qquickpointerhandler')
-rw-r--r--tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp b/tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp
index f648fb33f6..ebc5143073 100644
--- a/tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp
+++ b/tests/auto/quick/pointerhandlers/qquickpointerhandler/tst_qquickpointerhandler.cpp
@@ -26,38 +26,30 @@
**
****************************************************************************/
-
#include <QtTest/QtTest>
+#include <private/qdebug_p.h>
#include <QtGui/qstylehints.h>
-
-#include <QtQuick/qquickview.h>
-#include <QtQuick/qquickitem.h>
-#include <QtQuick/private/qquickmousearea_p.h>
-#include <QtQuick/private/qquickmultipointtoucharea_p.h>
-#include <QtQuick/private/qquickpincharea_p.h>
-#include <QtQuick/private/qquickflickable_p.h>
#include <QtQuick/private/qquickpointerhandler_p.h>
-#include <qpa/qwindowsysteminterface.h>
-
-#include <private/qquickwindow_p.h>
-
-#include <QtQml/qqmlengine.h>
-#include <QtQml/qqmlproperty.h>
+#include <QtQuick/qquickitem.h>
+#include <QtQuick/qquickview.h>
#include "../../../shared/util.h"
#include "../../shared/viewtestutil.h"
Q_LOGGING_CATEGORY(lcPointerTests, "qt.quick.pointer.tests")
-struct Event
+class Event
{
+ Q_GADGET
+public:
enum Destination {
FilterDestination,
MouseDestination,
TouchDestination,
HandlerDestination
};
+ Q_ENUM(Destination)
Event(Destination d, QEvent::Type t, Qt::TouchPointState s, QPointF item, QPointF scene)
: destination(d), type(t), state(s), posWrtItem(item), posWrtScene(scene)
@@ -66,17 +58,25 @@ struct Event
Destination destination;
QEvent::Type type;
Qt::TouchPointState state;
-
QPointF posWrtItem;
QPointF posWrtScene;
-
};
#ifndef QT_NO_DEBUG_STREAM
-QDebug operator<<(QDebug dbg, const struct Event &event) {
+QDebug operator<<(QDebug dbg, const class Event &event) {
QDebugStateSaver saver(dbg);
dbg.nospace();
- dbg << "Event(" << event.type << " @" << event.posWrtScene << ")";
+ dbg << "Event(";
+ QtDebugUtils::formatQEnum(dbg, event.destination);
+ dbg << ' ';
+ QtDebugUtils::formatQEnum(dbg, event.type);
+ dbg << ' ';
+ QtDebugUtils::formatQEnum(dbg, event.state);
+ dbg << " @ ";
+ QtDebugUtils::formatQPoint(dbg, event.posWrtItem);
+ dbg << " S ";
+ QtDebugUtils::formatQPoint(dbg, event.posWrtScene);
+ dbg << ')';
return dbg;
}
#endif