Ignore any files not ending in .qml when adding QML resources

Qt 5.8 includes compiled QML caching, which creates .qmlc files on disk.
These shouldn't be added as actual QML objects. In addition, anything
that does not end in .qml is probably not something that can actually be
parsed as QML, so ignore those too.
This commit is contained in:
Arjen Hiemstra 2017-04-04 17:35:32 +02:00
parent 0dfe3f4109
commit 43c7373368

View File

@ -695,6 +695,10 @@ class CuraApplication(QtApplication):
if type_name in ("Cura", "Actions"):
continue
# Ignore anything that is not a QML file.
if not path.endswith(".qml"):
continue
qmlRegisterType(QUrl.fromLocalFile(path), "Cura", 1, 0, type_name)
def onSelectionChanged(self):