From 43c7373368047660256b42a3571793f3bcc481ed Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 4 Apr 2017 17:35:32 +0200 Subject: [PATCH] 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. --- cura/CuraApplication.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 48abc59217..0f917ab012 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -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):