This time we don't need to catch permission errors and such since we're reading it from a string that was stored in memory (read when the preferences file was read). However we do need to catch JSON Decoding Errors since the JSON syntax might be broken by the user modifying these files or because the file wasn't saved properly before.
Fixes Sentry issue CURA-112.
It was decided that functionality present in existing plugins is
sufficient. No need to replicate it in our own codebase and
take on the burden of maintenance
CURA-5479
This commit adds an additional AddPrinterPagesModel in Cura that does
not have the "Cancel" button in the "Add Printer" page. To achieve
that, the AddPrinterPagesModel is modified so that its initialize
function decides whether or not it will add the cancel button.
If Cura ends up in a state without an active machine, the AddPrinters
dialog will open up using the showAddPrintersUncancellableDialog signal
and display the new "Uncancellable" (is this a word?)
AddPrinterPagesModel, so that the dialog cannot be dismissed.
If Cura is closed at that point, the next time it is initiated, if the
user is logged in and there is no ActiveMachine, then instead of
displaying the entire WelcomePages wizard, it will show the
uncancellable AddPrinterPagesModel, forcing the user to add a printer.
CURA-7454
In order to avoid cases where the "Machine actions" page would lead to the "add cloud printer"
page when pressing next, the AddPrinterPagesModel was rearranged and the "add cloud printer"
page was marked as final.
CURA-7022
If the user goes through the welcome wizard, arrives at the login page,
logs in and then closes Cura, he/she will be logged in the next time.
In this case, he/she will go through the welcome page again but will
not see the sign in page at all.
CURA-7019
Added it as a png, which might be a bit overkill but it could also
could be hard getting strokes / shadows exactly right otherwise. Also
Allows for more visual distinction of the background later
CURA-7011