aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/testtypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/testtypes.h')
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h
index 03e3262e7b..4c22468080 100644
--- a/tests/auto/qml/qqmlecmascript/testtypes.h
+++ b/tests/auto/qml/qqmlecmascript/testtypes.h
@@ -47,6 +47,9 @@
#include <QtQml/qjsvalue.h>
#include <QtQml/qqmlscriptstring.h>
#include <QtQml/qqmlcomponent.h>
+#include <QtCore/QModelIndex>
+#include <QtCore/QPersistentModelIndex>
+#include <QtCore/QItemSelection>
#include <private/qqmlengine_p.h>
#include <private/qv4qobjectwrapper_p.h>
@@ -1726,6 +1729,17 @@ public:
Q_INVOKABLE bool clashes() const { return true; }
};
+class VariantConvertObject : public QObject
+{
+ Q_OBJECT
+public:
+ QString funcCalled;
+public slots:
+ QPersistentModelIndex getIndex() const { return QPersistentModelIndex(QModelIndex()); }
+ void selection(const QModelIndex &mi, int n = 0) { funcCalled = QLatin1String("QModelIndex"); }
+ void selection(const QItemSelection &is, int n = 0) { funcCalled = QLatin1String("QItemSelection"); }
+};
+
void registerTypes();
#endif // TESTTYPES_H