mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
LP-183 remove backward compatible upper case name used for exposing UAV objects to Qml
This commit is contained in:
parent
96088ce831
commit
e4e4b23600
@ -123,10 +123,6 @@ PfdQmlGadgetWidget::PfdQmlGadgetWidget(QWindow *parent) :
|
|||||||
if (object) {
|
if (object) {
|
||||||
// expose object with lower camel case name
|
// expose object with lower camel case name
|
||||||
engine()->rootContext()->setContextProperty(toLowerCamelCase(objectName), object);
|
engine()->rootContext()->setContextProperty(toLowerCamelCase(objectName), object);
|
||||||
// expose object with its name for backward compatibility
|
|
||||||
// exposing with the name conflicts with the Qml namespace (prevents to expose the object class as a type)
|
|
||||||
// this should be removed once the qml files all use the lower camel case name
|
|
||||||
engine()->rootContext()->setContextProperty(objectName, object);
|
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "Failed to load object" << objectName;
|
qWarning() << "Failed to load object" << objectName;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user