Commit a6a5d490 authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Fix run error with Qt < 5.8

parent 7436028f
......@@ -108,7 +108,6 @@ void SharedObject::registerQmlTypes (QQmlEngine * qmlEngine) {
qmlRegisterUncreatableType<CanOpenObjDict> (uri, maj, min, "CanOpenObjDict", msg);
qmlRegisterUncreatableType<CanOpenProtocolManager> (uri, maj, min, "CanOpenProtocolManager", msg);
qmlRegisterUncreatableType<ByteArrayWrapper> (uri, maj, min, "ByteArrayWrapper", msg);
qmlRegisterUncreatableType<AbstractObjectListModel> (uri, maj, min, "ObjectRefListModel", 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);
......@@ -133,6 +132,7 @@ void SharedObject::registerQmlTypes (QQmlEngine * qmlEngine) {
qmlRegisterUncreatableType<BasicObject> (uri, maj, min, "BasicObject", msg);
qmlRegisterUncreatableType<Memory> (uri, maj, min, "Memory", msg);
qmlRegisterUncreatableType<PhysicalWorld> (uri, maj, min, "PhysicalWorld", msg);
qmlRegisterUncreatableType<AbstractObjectListModel> (uri, maj, min, "ObjectRefListModel", msg);
#else
// should not be instanciated but due to QML engine bug, must be declared as "creatable" for properties
qmlRegisterType<HelpSection> (uri, maj, min, "HelpSection");
......@@ -157,6 +157,7 @@ void SharedObject::registerQmlTypes (QQmlEngine * qmlEngine) {
qmlRegisterType<BasicObject> (uri, maj, min, "BasicObject");
qmlRegisterType<Memory> (uri, maj, min, "Memory");
qmlRegisterType<PhysicalWorld> (uri, maj, min, "PhysicalWorld");
qmlRegisterType<QObject> (uri, maj, min, "ObjectRefListModel");
#endif
// can be created in QML in UI
qmlRegisterType<RendererItem> (uri, maj, min, "RendererItem");
......
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