mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-26 20:31:35 -07: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
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue