Commit d815ef59 authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Make use of Qt5.8 bugfix avoid creatable type if it is uncreatable

parent 0e0abf0d
......@@ -98,6 +98,30 @@ void SharedObject::registerQmlTypes (QQmlEngine * qmlEngine) {
qmlRegisterUncreatableType<CanOpenProtocolManager> (uri, maj, min, "CanOpenProtocolManager", msg);
qmlRegisterUncreatableType<ByteArrayWrapper> (uri, maj, min, "ByteArrayWrapper", msg);
qmlRegisterUncreatableType<BasicObjectsModel> (uri, maj, min, "BasicObjectsModel", msg);
#if QT_VERSION >= 0x050800 // bug fixed from Qt 5.8.0 (ability to use uncreatable type in QML properties)
// should not be instanciated
qmlRegisterUncreatableType<HelpSection> (uri, maj, min, "HelpSection", msg);
qmlRegisterUncreatableType<HelpPage> (uri, maj, min, "HelpPage", msg);
qmlRegisterUncreatableType<MethodHelp> (uri, maj, min, "MethodHelp", msg);
qmlRegisterUncreatableType<SignalHelp> (uri, maj, min, "SignalHelp", msg);
qmlRegisterUncreatableType<QmlSyntaxTokenId> (uri, maj, min, "SyntaxTokenId", msg);
qmlRegisterUncreatableType<ObjectHelp> (uri, maj, min, "ObjectHelp", msg);
qmlRegisterUncreatableType<PropertyHelp> (uri, maj, min, "PropertyHelp", msg);
qmlRegisterUncreatableType<ArgumentHelp> (uri, maj, min, "ArgumentHelp", msg);
qmlRegisterUncreatableType<EnumKeyHelp> (uri, maj, min, "EnumKeyHelp", msg);
qmlRegisterUncreatableType<MemoryModelItem> (uri, maj, min, "MemoryModelItem", msg);
// should not be instanciated but are provied as base class or grouped properties in user API
qmlRegisterUncreatableType<AbstractIO> (uri, maj, min, "AbstractIO", msg);
qmlRegisterUncreatableType<AbstractAnalogIO> (uri, maj, min, "AbstractAnalogIO", msg);
qmlRegisterUncreatableType<AbstractDigitalIO> (uri, maj, min, "AbstractDigitalIO", msg);
qmlRegisterUncreatableType<AbstractSensor> (uri, maj, min, "AbstractSensor", msg);
qmlRegisterUncreatableType<AbstractActuator> (uri, maj, min, "AbstractActuator", msg);
qmlRegisterUncreatableType<AbstractRoutine> (uri, maj, min, "AbstractRoutine", msg);
qmlRegisterUncreatableType<AbstractTransformer> (uri, maj, min, "AbstractTransformer", msg);
qmlRegisterUncreatableType<AbstractLink> (uri, maj, min, "AbstractLink", msg);
qmlRegisterUncreatableType<BasicObject> (uri, maj, min, "BasicObject", msg);
qmlRegisterUncreatableType<Memory> (uri, maj, min, "Memory", msg);
// should not be instanciated but due to QML engine bug, must be declared as "creatable" for properties
qmlRegisterType<HelpSection> (uri, maj, min, "HelpSection");
qmlRegisterType<HelpPage> (uri, maj, min, "HelpPage");
......@@ -120,7 +144,7 @@ void SharedObject::registerQmlTypes (QQmlEngine * qmlEngine) {
qmlRegisterType<AbstractLink> (uri, maj, min, "AbstractLink");
qmlRegisterType<BasicObject> (uri, maj, min, "BasicObject");
qmlRegisterType<Memory> (uri, maj, min, "Memory");
qmlRegisterType<CanOpen> (uri, maj, min, "CanOpen");
// can be created in QML in UI
qmlRegisterType<RendererItem> (uri, maj, min, "RendererItem");
qmlRegisterType<Grapher> (uri, maj, min, "Grapher");
......@@ -146,6 +170,7 @@ void SharedObject::registerQmlTypes (QQmlEngine * qmlEngine) {
qmlRegisterType<LinkAnalogOutputToAnalogInput> (uri, maj, min, "LinkAnalogOutputToAnalogInput");
qmlRegisterType<LinkDigitalOutputToDigitalInput> (uri, maj, min, "LinkDigitalOutputToDigitalInput");
qmlRegisterType<CanBus> (uri, maj, min, "CanBus");
qmlRegisterType<CanOpen> (uri, maj, min, "CanOpen");
qmlRegisterType<NetworkDefinition> (uri, maj, min, "NetworkDefinition");
qmlRegisterType<NodesList> (uri, maj, min, "NodesList");
qmlRegisterType<Node> (uri, maj, min, "Node");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment