src/imports/gestures/plugin.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
--- a/src/imports/gestures/plugin.cpp	Tue Jul 06 15:10:48 2010 +0300
+++ b/src/imports/gestures/plugin.cpp	Wed Aug 18 10:37:55 2010 +0300
@@ -53,7 +53,16 @@
     virtual void registerTypes(const char *uri)
     {
         Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.gestures"));
+#ifndef QT_NO_GESTURES
         qmlRegisterCustomType<QDeclarativeGestureArea>(uri,1,0, "GestureArea", new QDeclarativeGestureAreaParser);
+
+        qmlRegisterUncreatableType<QGesture>(uri, 1, 0, "Gesture", QLatin1String("Do not create objects of this type."));
+        qmlRegisterUncreatableType<QPanGesture>(uri, 1, 0, "PanGesture", QLatin1String("Do not create objects of this type."));
+        qmlRegisterUncreatableType<QTapGesture>(uri, 1, 0, "TapGesture", QLatin1String("Do not create objects of this type."));
+        qmlRegisterUncreatableType<QTapAndHoldGesture>(uri, 1, 0, "TapAndHoldGesture", QLatin1String("Do not create objects of this type."));
+        qmlRegisterUncreatableType<QPinchGesture>(uri, 1, 0, "PinchGesture", QLatin1String("Do not create objects of this type."));
+        qmlRegisterUncreatableType<QSwipeGesture>(uri, 1, 0, "SwipeGesture", QLatin1String("Do not create objects of this type."));
+#endif
     }
 };
 
@@ -61,5 +70,4 @@
 
 #include "plugin.moc"
 
-Q_EXPORT_PLUGIN2(gesturesqmlplugin, QT_PREPEND_NAMESPACE(GestureAreaQmlPlugin));
-
+Q_EXPORT_PLUGIN2(qmlgesturesplugin, QT_PREPEND_NAMESPACE(GestureAreaQmlPlugin));