Adds type checking here and there to catch such errors in the future.
This makes it handle the optional fields of this model better.
Contributes to issue CURA-8730.
Long API calls might return after the Local or Remote
PackageList has been deconstructed. Somehow setting
the ownership in QML doesn't seem to work for this.
So we guard against this with a try catch block.
Contributes to: CURA-8587
Should have done this from the start.
Will move other relevant scattered functions to this type.
For now it checks if the restart banner needs to show.
Taking into account that a user can toggle between enable
and disable without an actual restart. Even with multiple
plugins.
Contributes to: CURA-8587
Otherwise this isn't saved, and the state of 'installed, but needs restart' (as shown in the package card) won't be known to the package card (buttons), resulting in an 'Install' button when tabs are switched.
part of CURA-8587
Previously the license dialog was instanciated once and re-used for each
install. As the dialog is only shown after the plugin is downloaded it
was possible to click install for multiple plugins. Plugins that finish
downloading later would override the dialog of earlier downloaded
plugins. Clicking "accept" would then only install the latest downloaded
plugin.
Now for each install a separate dialog is shown. Accepting the license
agreement would only install the recently accepted plugin.
Note: in the current form the license agreement does not show any
identification to what plugin triggered the dialog. As multiple dialogs
can be shown at once this might be unclear.
cura 8587
The `_to_be_installed_package_id` and `_to_be_installed_package_path`
can now be removed from the class as they can requested from the model
itself. This we make sure that the we alway install the package for
which the license was recently accepted.
cura 8587
Don't use the default spinner but use an image from our theme. A new image. And change the font size, colour and spacings a bit according to our designs.
Contributes to issue CURA-8587.
This is the same alignment as the ellipsis shown when the description is abbreviated. Looks correct, and it should be correct.
Contributes to issue CURA-8587.