Commit graph

26686 commits

Author SHA1 Message Date
Ghostkeeper
9dd251975d
Test for result of callback with a callable
In this case the callback should get called immediately (no wait) so it is safe to test for this callback, albeit slightly implementation-defined.

Contributes to issue CURA-8539.
2021-11-22 10:48:45 +01:00
Ghostkeeper
30d19844f2
Always callback if there is a callback, even if no auth data
Because not having auth data is a reason to return no profile too. Otherwise the other side might wait for a response for a long time.

Contributes to issue CURA-8539.
2021-11-22 10:45:01 +01:00
Ghostkeeper
1636cca601
Add missing return
We're calling back that there is no auth data, so we should stop here and not try to obtain a user profile.

Contributes to issue CURA-8539.
2021-11-22 10:34:39 +01:00
Ghostkeeper
ffb891fb69
Fix call to failed_callback
It provides 2 arguments (reply and error) which we both ignore and proceed to call failed_callback. And failed_callback may also be None in which case we don't call anything.

Contributes to issue CURA-8539.
2021-11-19 17:09:33 +01:00
Ghostkeeper
9895015235
Call getAccessTokenUsingRefreshToken asynchronously
Getting into nested inline functions into inline functions here. Let's see what the reviewer thinks of all this!

Contributes to issue CURA-8539.
2021-11-19 17:04:37 +01:00
Ghostkeeper
7091c5f3aa
Make getAuthenticationTokenUsingXYZ asynchronous
As a result, the local webserver now needs to synchronise that with a lock. Otherwise the do_GET function would no longer block, and wouldn't properly be able to return the correct redirect URL.

Contributes to issue CURA-8539.
2021-11-19 16:55:45 +01:00
Ghostkeeper
9b55ae6dda
Remove unused imports of requests
This was the objective, really.

Contributes to issue CURA-8539.
2021-11-19 16:25:50 +01:00
Ghostkeeper
acbbf83510
Deal with absence of callback function
It may be None, so then we don't need to call back. The consumer may just take it from self._user_profile.

Contributes to issue CURA-8539.
2021-11-19 16:23:48 +01:00
Ghostkeeper
a5202b61d2
Don't emit with new profile
The signal can't accept it because it's not a QObject.

Contributes to issue CURA-8539.
2021-11-19 16:22:41 +01:00
Ghostkeeper
bfb8440a04
Get user profile asynchronously when restoring from preferences
Do not stop the start-up process for it. Let the callback handle the updating if necessary.

Contributes to issue CURA-8539.
2021-11-19 16:20:00 +01:00
Ghostkeeper
92437a920d
Store account information asynchronously when completing request
And make the PyQt properties listen to the signal of completion.

Contributes to issue CURA-8539.
2021-11-19 16:02:25 +01:00
Ghostkeeper
591a2f89b8
Make getUserProfile return profile asynchronously
All via callbacks. Quite a mess.

Contributes to issue CURA-8539.
2021-11-19 15:29:29 +01:00
Ghostkeeper
920d9b9d44
Make _parseJWT asynchronous as well
Now it calls checkToken correctly. However now this _parseJWT is not called correctly since there are things calling this one in an attempt to be synchronous again.
There is the additional issue that we can't call getAccessTokenUsingRefreshToken synchronously now, because this runs on the main thread and it will then block the main thread until the request is made, which is never because the request is also done on the main thread via Qt's event loop.

Contributes to issue CURA-8539.
2021-11-18 17:33:39 +01:00
Ghostkeeper
aff0764c1d
Add failed callback for when the request fails
Maybe we should add a parameter to this to respond with an error message. But maybe later.

Contributes to issue CURA-8539.
2021-11-18 17:19:05 +01:00
Ghostkeeper
a9990eaa75
Make parseJWT asynchronous
This involves returning the user profile via a callback.
No longer use the Requests library, which doesn't properly use the SSL certificates locally on the computer like the QNetworkManager does.

Contributes to issue CURA-8539.
2021-11-18 17:11:27 +01:00
Ghostkeeper
f1c763ad9f
Use HttpRequestManager to acquire new tokens
This is a re-write from a previous attempt. Instead of requests, which doesn't properly use SSL certificates installed on the computer among other things, we'll now use the HttpRequestManager which uses QNetworkManager under the hood and properly uses system settings.
The QNetworkManager is asynchronous which would normally be very nice, but due to the nature of this call we want to make it synchronous so we'll use a lock here.

Contributes to issue CURA-8539.
2021-11-17 14:32:53 +01:00
Ghostkeeper
a292524af6
Correct German translation of indicating a time
This is better grammar.

Further improvement for #10718.
2021-11-16 15:16:18 +01:00
Ghostkeeper
caa9a6bfc4
Merge branch 'patch-1' of https://github.com/Ladnessness/Cura into Ladnessness-patch-1 2021-11-16 14:54:58 +01:00
Remco Burema
f0cb9dd39e
Workaround for if layer is None somehow. 2021-11-16 12:33:29 +01:00
Ghostkeeper
5e60cc6208
Merge branch 'bremco-graphics_buffer_update' 2021-11-15 15:20:10 +01:00
Ghostkeeper
dc28370178
Remove implicit casts and comparisons of int to float
We can't change this index to an integer, because varying variables can't be integer, even though this variable will only really be tested on vertex level. Not sure if varying was the right choice, but I don't want to change that.
This prevents a crash, probably only occurring on certain GPUs.

Contributes to issue CURA-8657.
2021-11-15 15:19:57 +01:00
Ghostkeeper
c9feace0fb
Change user-visible name of Maximum Feedrate to Maximum Speed E
Maximum Feedrate was correct, but compared to the names of the X/Y/Z maximum speeds, this is considered to be more consistent.

Fixes #10767.
2021-11-15 10:59:58 +01:00
Ghostkeeper
d12d756b1d
Move machine_height to the other machine dimension settings
It's quite logical that the 3 dimensions of the printer are next to each other...

Found during work on a plug-in.
2021-11-13 16:42:06 +01:00
Ghostkeeper
6171107140
Remove upper limit of bridge skin density
There is no theoretical or algorithmic limit here. We may warn the user, but not prevent them from changing it.

Done as a five minute fix. Fixes CURA-8693. Fixes #10736.
2021-11-11 15:45:47 +01:00
Jaime van Kessel
136aa45172 Merge branch '4.12' of github.com:Ultimaker/Cura 2021-11-11 15:32:39 +01:00
Ghostkeeper
b4f10bab71
Merge branch 'PP-55_reduce-cross3D-top-layer-bridge-distance' 2021-11-11 12:34:58 +01:00
Ladnessness
066859198a
Update requirements.txt 2021-11-11 18:12:51 +11:00
Jaime van Kessel
8998738237
Merge pull request #10774 from luzpaz/typos
Fix typos
2021-11-09 17:04:54 +01:00
luz paz
61d7895588 Fix typos
Found via `codespell -q 3 -S *.po,*.pot -L childs,initialy,lod,ned,te,slicable,sur,tutoriels,wont`
2021-11-09 10:38:01 -05:00
Jaime van Kessel
b1f797f6cb Merge branch 'master' of github.com:Ultimaker/Cura 2021-11-09 15:10:39 +01:00
Jaime van Kessel
c1a839ccaa Also ensure that extruder settings are correct when discarding unsaved changes
CURA-8584
2021-11-09 15:10:09 +01:00
Ghostkeeper
ca942a15e8
Don't use infinite lifetimes lightly
This is very annoying if switching profiles. This is not a critical message. The message should disappear after the default amount of time.

Discovered while working on CURA-8584.
2021-11-09 14:45:40 +01:00
Jelle Spijker
40be115b17
Use Spanish translation for lightning infill
Contributes to CURA-8638
2021-11-09 10:53:07 +01:00
fvrmr
75a77bf34f Update change log
Fixed some typo's
2021-11-09 10:31:21 +01:00
fvrmr
ad5937ee6a Updated whats new pages
Updated whats new pages and images
Updated the change log
2021-11-09 10:18:00 +01:00
Jaime van Kessel
73ca50d958 Handle exception when adhesion extruder could not be found
This should be pretty rare; the crash would only happen due to a race condition

cura-8584
2021-11-09 10:17:32 +01:00
Remco Burema
51c5572f0f
Add draw-range behaviour to legacy-mode shaders. 2021-11-08 21:39:12 +01:00
Remco Burema
f486177465
Remove dead (shader) code.
These shader (files) are now only used for compatability mode. The 'modern' code is found in the '...3d.shader' versions of these files.
2021-11-08 21:37:57 +01:00
Ghostkeeper
dcf78b4885
Merge branch '4.12'
Conflicts:
	resources/i18n/de_DE/fdmprinter.def.json.po -> German translations got some fixes in master while we also updated the new translations for 4.12.
2021-11-08 13:55:09 +01:00
Ghostkeeper
db637802bd
First translate, then process replacement keys
If we first process the replacement keys, the replaced string can't be found in the translation database, so you don't get a translation of the phrase 'Finishes x at y'.

Fixes #10718.
2021-11-08 13:49:54 +01:00
Jelle Spijker
1b503f003e
Disabled Čeština for 4.12
Contributes to CURA-8638
2021-11-08 13:48:11 +01:00
Jelle Spijker
fb3706d501
Merge pull request #10738 from Patola/4.12
Updated pt_BR strings for Cura 4.12
2021-11-08 13:19:36 +01:00
Jelle Spijker
8cae8b128b
Merge branch 'zh_tw_4.12' into 4.12 2021-11-08 13:14:22 +01:00
Jelle Spijker
e88a086a5b
Merge branch 'smartling_4.12' into 4.12 2021-11-08 13:14:04 +01:00
Sekisback
260cafab0f
Update fdmprinter.def.json.po
some German translation fixes

(cherry picked from commit d725fa8806)
2021-11-08 13:11:56 +01:00
Sekisback
3d1bc36f3d
Update fdmprinter.def.json.po
mistyping fixed

(cherry picked from commit 12c5a29d3e)
2021-11-08 13:09:59 +01:00
Jelle Spijker
48d8841d5f
Updated translations for 4.12
From Smartling

- Chinese Simplified
- Dutch
- French
- German
- Italian
- Japanese
- Korean
- Portuguese
- Rusian
- Spanish
- Turkish

Contributes to CURA-8638
2021-11-08 13:04:13 +01:00
Jelle Spijker
e3143312bc
Updated Taiwanese translations for 4.12
Translated by Valen Chang

Contributes to CURA-8638
2021-11-08 10:58:00 +01:00
Jaime van Kessel
561d0784f8 Merge branch 'CURA-8522_pause_extrusion_interruption' of github.com:Ultimaker/Cura 2021-11-08 10:23:49 +01:00
Remco Burema
4f20dc4c5d
Add documentation. 2021-11-07 22:26:34 +01:00