Fixed failing tests. Hid the sync Message when it's clicked.

CURA-7038
This commit is contained in:
Dimitriovski 2019-12-31 12:07:42 +01:00
parent ea1896fe6b
commit 96311c974b
No known key found for this signature in database
GPG key ID: 4E62757E2B0D304D

View file

@ -724,7 +724,8 @@ class Toolbox(QObject, Extension):
sync_message.actionTriggered.connect(self._onSyncButtonClickedHelper)
sync_message.show()
def _onSyncButtonClicked(self, json_data, package_discrepancy, messageId: str, actionId: str) -> None:
def _onSyncButtonClicked(self, json_data, package_discrepancy, sync_message: Message, actionId: str) -> None:
sync_message.hide()
self.subscribed_packages.clear()
# We 'create' the packages from the HTTP payload
for item in json_data:
@ -744,9 +745,11 @@ class Toolbox(QObject, Extension):
Logger.log("d", "Package '{}' scheduled for installing.".format(package['name']))
self._models["subscribed_packages"].update()
compatibilityDialog = "resources/qml/dialogs/CompatibilityDialog.qml"
path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), compatibilityDialog)
self.compatibility_dialog_view = self._application.getInstance().createQmlComponent(path, {"toolbox": self})
compatibility_dialog_path = "resources/qml/dialogs/CompatibilityDialog.qml"
plugin_path_prefix = PluginRegistry.getInstance().getPluginPath(self.getPluginId())
if plugin_path_prefix:
path = os.path.join(plugin_path_prefix, compatibility_dialog_path)
self.compatibility_dialog_view = self._application.getInstance().createQmlComponent(path, {"toolbox": self})
# This function goes through all known remote versions of a package and notifies the package manager of this change
def _notifyPackageManager(self):