Conflicts:
cura/Machines/Models/MaterialManagementModel.py -> On Master we had temporarily reverted the action of this button because it became apparent that the sync wasn't going to be in 4.12. That revert is no longer necessary if this is merged.
With the lambda it would capture the variable of printer_id. It wouldn't actually store the value of printer_id in teh created lambda. As a result, it was using the current value of printer_id when the lambda executes, rather than the value of printer_id when the lambda is constructed. A bit weird how that works in Python's lambdas.
With partial functions it works properly.
Contributes to issue CURA-8609.
The API endpoint got renamed (without my awareness). It also needed to be a POST request, probably since the beginning. And apparently it needs everything to be in a sub-field called 'data' for some reason.
Contributes to issue CURA-8609.
The entire response is contained in a lone 'data' field in the response. Why this is necessary I don't know, because indeed everything the server can tell us is data so everything would be in a 'data' field. But that's how the API reacts so that's how we'll have to parse it.
Contributes to issue CURA-8609.
Added a dictionary where additional user rights can be set.
A plugin such as the DigitalFactory can update this dictionary
if certain account rights change. The `account.additionalRights`
is intended to allow us some flexibility, without breaking the API
in the future.
The Application Switcher now queries the additional account rights,
which is updated by the DF plugin to only show `My printers`,
`Digital Library` and `Print jobs` when the user has access to the
DF.
Contributes to CURA-8624
It could be that this archive is not accessible any more for whatever reason. Write-only file systems, quarantined files, etc. Whatever the reason, Cura shouldn't crash on this because it's not in Cura's control.
Contributes to issue CURA-8609.
It could be that the archive fails to save because the user doesn't have access to its own temporary folder, the firewall quarantines the archive, there's not enough disk space, whatever. These errors need to be handled and not crash Cura.
Contributes to issue CURA-8609.
This indicates how we're using it, and also allows for use of symbols in the code rather than strings, which integrate better with tooling.
Contributes to issue CURA-8609.
Partialmethod is not callable apparently. I think the problem is that it's calling the method outside of the scope of the class here. I'm probably not using it right. Lambas are easier since they automatically take their scope along with them.
Contributes to issue CURA-8609.
Apparently the API is now a PUT request rather than a GET request. It needs a bit more metadata which can be hard-coded for our client.
Contributes to issue CURA-8609.
This way we can ask the printer status from QML even if it's updated via a job on a different thread and different class and all that.
Contributes to issue CURA-8609.
Apparently the Cloud will need to know the file size before it gets uploaded. It is used as a redundancy code to verify that it's not corrupt there.
Perhaps they should ask for a CRC instead, being more reliable against an upload containing only null bytes or whatever, but that is not up to me to decide.
Contributes to issue CURA-8609.