Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alicevision/meshroom.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Castan <fabcastan@gmail.com>2022-08-25 21:04:10 +0300
committerGitHub <noreply@github.com>2022-08-25 21:04:10 +0300
commit78e19a1a34a5bcced2351e06c25556d8e6c8b355 (patch)
tree5be0ddf1669cca8cdc79849000e697aa543ec9a4
parent2005324e7e4351246f9ceb2c3000524b9c6c04a1 (diff)
parent9365a37bde58d70364ce2284bc56a54021b38bb0 (diff)
Merge pull request #1728 from p12tic/reduce-qml-crash-confusion
[ui] Reduce confusion when qml loading fails
-rw-r--r--meshroom/ui/app.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/meshroom/ui/app.py b/meshroom/ui/app.py
index 990d928b..7e5b84ff 100644
--- a/meshroom/ui/app.py
+++ b/meshroom/ui/app.py
@@ -51,9 +51,19 @@ class MessageHandler(object):
@classmethod
def handler(cls, messageType, context, message):
""" Message handler remapping Qt logs to Python logging system. """
- # discard blacklisted Qt messages related to QML when 'output qml warnings' is set to false
- if not cls.outputQmlWarnings and any(w in message for w in cls.qmlWarningsBlacklist):
- return
+
+ if not cls.outputQmlWarnings:
+ # If MESHROOM_OUTPUT_QML_WARNINGS is not set and an error in qml files happen we're
+ # left without any output except "QQmlApplicationEngine failed to load component".
+ # This is extremely hard to debug to someone who does not know about
+ # MESHROOM_OUTPUT_QML_WARNINGS beforehand because by default Qml will output errors to
+ # stdout.
+ if "QQmlApplicationEngine failed to load component" in message:
+ logging.warning("Set MESHROOM_OUTPUT_QML_WARNINGS=1 to get a detailed error message.")
+
+ # discard blacklisted Qt messages related to QML when 'output qml warnings' is not enabled
+ elif any(w in message for w in cls.qmlWarningsBlacklist):
+ return
MessageHandler.logFunctions[messageType](message)