subsurface/desktop-widgets
Dirk Hohndel a0057c06fb printing: convert to two stage approach
The double connect to onLoadFinished clearly was incorrect, but even with
that removed we still seemed to call the printer before the modified page
finished loading.

Moving the profilesMissing = false setting into the callback also seems
obviously correct, but also wasn't enough to make this work.

So in the end I went the brute force route.
We run the Javascript code to insert the profile images (which is done
in JS to stay compatible with existing templates - yes, this could be
reimplemented differently using Qt primitives - but that would result in
parsing HTML code and that really is what WebEngine is for and the JS
code is known to work...).
And then we write the new HTML out to a file and load that file.
And once THAT file finishes loading (now with all the profiles - if
there were any in the template in the first place), send that to be
printed.

This seems convoluted and silly - but I simply couldn't get a single
step flow to work on openSUSE (which is where this was tested and
implemented).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-11-28 17:43:27 -08:00
..
2021-07-03 14:28:37 -07:00
2020-10-26 19:27:03 -07:00
2017-11-30 23:14:46 -08:00
2020-01-24 09:51:02 -08:00
2020-03-19 08:37:59 -07:00
2021-02-06 10:00:39 -08:00
2020-09-03 11:46:16 -07:00
2017-11-30 23:14:46 -08:00
2017-11-30 23:14:46 -08:00
2017-11-30 23:14:46 -08:00
2017-11-30 23:14:46 -08:00
2021-11-26 12:32:10 -08:00
2017-11-30 23:14:46 -08:00