From a6203f462d584475d459f775ebf60bcaadfaa72a Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 15 Nov 2019 15:00:44 +0100 Subject: [PATCH] Add build_type into crash reports and stats CURA-6981 --- cura/CrashHandler.py | 4 ++++ plugins/SliceInfoPlugin/SliceInfo.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py index 1d85a1da54..1ec00787d7 100644 --- a/cura/CrashHandler.py +++ b/cura/CrashHandler.py @@ -25,6 +25,8 @@ from UM.View.GL.OpenGL import OpenGL from UM.i18n import i18nCatalog from UM.Resources import Resources +from cura import ApplicationMetadata + catalog = i18nCatalog("cura") MYPY = False @@ -181,6 +183,7 @@ class CrashHandler: self.cura_version = catalog.i18nc("@label unknown version of Cura", "Unknown") crash_info = "" + catalog.i18nc("@label Cura version number", "Cura version") + ": " + str(self.cura_version) + "
" + crash_info += "" + catalog.i18nc("@label Cura build type", "Cura build type") + ": " + str(ApplicationMetadata.CuraBuildType) + "
" crash_info += "" + catalog.i18nc("@label Type of platform", "Platform") + ": " + str(platform.platform()) + "
" crash_info += "" + catalog.i18nc("@label", "Qt version") + ": " + str(QT_VERSION_STR) + "
" crash_info += "" + catalog.i18nc("@label", "PyQt version") + ": " + str(PYQT_VERSION_STR) + "
" @@ -191,6 +194,7 @@ class CrashHandler: group.setLayout(layout) self.data["cura_version"] = self.cura_version + self.data["cura_build_type"] = ApplicationMetadata.CuraBuildType self.data["os"] = {"type": platform.system(), "version": platform.version()} self.data["qt_version"] = QT_VERSION_STR self.data["pyqt_version"] = PYQT_VERSION_STR diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index acab445fd6..af8a8b9853 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -18,6 +18,8 @@ from UM.Logger import Logger from UM.PluginRegistry import PluginRegistry from UM.Qt.Duration import DurationFormat +from cura import ApplicationMetadata + from .SliceInfoJob import SliceInfoJob @@ -119,6 +121,7 @@ class SliceInfo(QObject, Extension): data["time_stamp"] = time.time() data["schema_version"] = 0 data["cura_version"] = application.getVersion() + data["cura_build_type"] = ApplicationMetadata.CuraBuildType active_mode = Application.getInstance().getPreferences().getValue("cura/active_mode") if active_mode == 0: