| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/handlers/qquickhandlersmodule.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | static void initResources() | - | ||||||
| 3 | { | - | ||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | - | |||||||
| 7 | } | - | ||||||
| 8 | - | |||||||
| 9 | - | |||||||
| 10 | - | |||||||
| 11 | static QQmlPrivate::AutoParentResult handler_autoParent(QObject *obj, QObject *parent) | - | ||||||
| 12 | { | - | ||||||
| 13 | if (qmlobject_cast<QQuickItem *>(parent)
| 0 | ||||||
| 14 | QQuickPointerHandler *handler = qmlobject_cast<QQuickPointerHandler *>(obj); | - | ||||||
| 15 | if (handler
| 0 | ||||||
| 16 | handler->setParent(parent); | - | ||||||
| 17 | return never executed: QQmlPrivate::Parented;return QQmlPrivate::Parented;never executed: return QQmlPrivate::Parented; | 0 | ||||||
| 18 | } | - | ||||||
| 19 | } never executed: end of block | 0 | ||||||
| 20 | return never executed: QQmlPrivate::IncompatibleObject;return QQmlPrivate::IncompatibleObject;never executed: return QQmlPrivate::IncompatibleObject; | 0 | ||||||
| 21 | } | - | ||||||
| 22 | - | |||||||
| 23 | static void qt_quickhandlers_defineModule(const char *uri, int major, int minor) | - | ||||||
| 24 | { | - | ||||||
| 25 | QQmlPrivate::RegisterAutoParent autoparent = { 0, &handler_autoParent }; | - | ||||||
| 26 | QQmlPrivate::qmlregister(QQmlPrivate::AutoParentRegistration, &autoparent); | - | ||||||
| 27 | qmlRegisterUncreatableType<QQuickPointerEvent>(uri, major, minor, "PointerEvent", | - | ||||||
| 28 | QQuickPointerHandler::tr("PointerEvent is only available as a parameter of several signals in PointerHandler")); | - | ||||||
| 29 | qmlRegisterUncreatableType<QQuickEventPoint>(uri, major, minor, "EventPoint", | - | ||||||
| 30 | QQuickPointerHandler::tr("EventPoint is only available as a member of PointerEvent")); | - | ||||||
| 31 | qmlRegisterUncreatableType<QQuickEventTouchPoint>(uri, major, minor, "EventTouchPoint", | - | ||||||
| 32 | QQuickPointerHandler::tr("EventTouchPoint is only available as a member of PointerEvent")); | - | ||||||
| 33 | qmlRegisterUncreatableType<QQuickPointerDevice>(uri, major, minor, "PointerDevice", | - | ||||||
| 34 | QQuickPointerHandler::tr("PointerDevice is only available as a property of PointerEvent")); | - | ||||||
| 35 | qRegisterMetaType<QPointingDeviceUniqueId>("QPointingDeviceUniqueId"); | - | ||||||
| 36 | qmlRegisterUncreatableType<QPointingDeviceUniqueId>(uri, major, minor, "PointingDeviceUniqueId", | - | ||||||
| 37 | QQuickPointerHandler::tr("PointingDeviceUniqueId is only available as a property of PointerEvent")); | - | ||||||
| 38 | - | |||||||
| 39 | qmlRegisterUncreatableType<QQuickPointerHandler>(uri,major,minor,"PointerHandler", | - | ||||||
| 40 | QQuickPointerHandler::tr("PointerHandler is an abstract base class")); | - | ||||||
| 41 | qmlRegisterType<QQuickPointHandler>(uri,major,minor,"PointHandler"); | - | ||||||
| 42 | qmlRegisterType<QQuickDragHandler>(uri,major,minor,"DragHandler"); | - | ||||||
| 43 | qmlRegisterUncreatableType<QQuickDragAxis>(uri, major, minor, "DragAxis", | - | ||||||
| 44 | QQuickDragHandler::tr("DragAxis is only available as a grouped property of DragHandler")); | - | ||||||
| 45 | qmlRegisterType<QQuickHoverHandler>(uri,major,minor,"HoverHandler"); | - | ||||||
| 46 | qmlRegisterType<QQuickPinchHandler>(uri,major,minor,"PinchHandler"); | - | ||||||
| 47 | qmlRegisterType<QQuickTapHandler>(uri,major,minor,"TapHandler"); | - | ||||||
| 48 | qRegisterMetaType<QQuickHandlerPoint>(); | - | ||||||
| 49 | } executed 10 times by 5 tests: end of blockExecuted by:
| 10 | ||||||
| 50 | - | |||||||
| 51 | void QQuickHandlersModule::defineModule() | - | ||||||
| 52 | { | - | ||||||
| 53 | initResources(); | - | ||||||
| 54 | - | |||||||
| 55 | const char uri[] = "Qt.labs.handlers"; | - | ||||||
| 56 | int majorVersion = 1; | - | ||||||
| 57 | int minorVersion = 0; | - | ||||||
| 58 | - | |||||||
| 59 | qt_quickhandlers_defineModule(uri, majorVersion, minorVersion); | - | ||||||
| 60 | } executed 10 times by 5 tests: end of blockExecuted by:
| 10 | ||||||
| 61 | - | |||||||
| 62 | - | |||||||
| Switch to Source code | Preprocessed file |