mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 05:55:53 +08:00
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:
parent
0dfe3f4109
commit
43c7373368
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user