Merge pull request #12274 from Ultimaker/SEC-255_fix_theme_5.0

In secure version: disable loading themes from unbundled folders.
This commit is contained in:
Joey de l'Arago 2022-05-23 11:38:11 +02:00 committed by GitHub
commit 4e5f826a8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,7 +315,7 @@ class CuraApplication(QtApplication):
def initialize(self) -> None:
self.__addExpectedResourceDirsAndSearchPaths() # Must be added before init of super
super().initialize()
super().initialize(ApplicationMetadata.IsEnterpriseVersion)
self._preferences.addPreference("cura/single_instance", False)
self._use_single_instance = self._preferences.getValue("cura/single_instance") or self._cli_args.single_instance
@ -942,6 +942,7 @@ class CuraApplication(QtApplication):
self._qml_import_paths.append(Resources.getPath(self.ResourceTypes.QmlFiles))
self._setLoadingHint(self._i18n_catalog.i18nc("@info:progress", "Initializing engine..."))
self.initializeEngine()
self.getTheme().setCheckIfTrusted(ApplicationMetadata.IsEnterpriseVersion)
# Initialize UI state
controller.setActiveStage("PrepareStage")