Commit 7baf735f authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Fix build issue on Qt < 5.8

parent 073678e8
......@@ -84,7 +84,7 @@ void SharedObject::registerQmlTypes (QQmlEngine * qmlEngine) {
// singletons
Help::registerQmlModule (uri, maj, min, "Help");
qmlRegisterSingletonType (QUrl ("qrc:///components/Components.qml"), uri, maj, min, "Components");
qmlRegisterSingletonType<SharedObject> (uri, maj, min, "Shared", &SharedObject::qmlSingletonProvider);
qmlRegisterSingletonType<SharedObject> (uri, maj, min, "Shared", &SharedObject::qmlSingletonProvider);
// deprecated types
qmlRegisterTypeNotAvailable (uri, maj, min, "NodesList", "Type removed, put nodes anywhere in Network !");
qmlRegisterTypeNotAvailable (uri, maj, min, "SensorsList", "Type removed, put sensors anywhere in Network !");
......@@ -111,6 +111,7 @@ 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);
......@@ -134,7 +135,6 @@ void SharedObject::registerQmlTypes (QQmlEngine * qmlEngine) {
qmlRegisterUncreatableType<AbstractLink> (uri, maj, min, "AbstractLink", msg);
qmlRegisterUncreatableType<BasicObject> (uri, maj, min, "BasicObject", msg);
qmlRegisterUncreatableType<Memory> (uri, maj, min, "Memory", msg);
qmlRegisterUncreatableType<AbstractObjectListModel> (uri, maj, min, "ObjectRefListModel", msg);
qmlRegisterUncreatableType<PhysicalWorld> (uri, maj, min, "PhysicalWorld", msg);
#else
// should not be instanciated but due to QML engine bug, must be declared as "creatable" for properties
......@@ -159,7 +159,6 @@ void SharedObject::registerQmlTypes (QQmlEngine * qmlEngine) {
qmlRegisterType<AbstractLink> (uri, maj, min, "AbstractLink");
qmlRegisterType<BasicObject> (uri, maj, min, "BasicObject");
qmlRegisterType<Memory> (uri, maj, min, "Memory");
qmlRegisterType<AbstractObjectListModel> (uri, maj, min, "ObjectRefListModel");
qmlRegisterType<PhysicalWorld> (uri, maj, min, "PhysicalWorld");
#endif
// can be created in QML in UI
......
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