- Create SingleInstance class to handling single instance stuff.
- Instead of calling getInstance() everywhere, initialize each object
explicitly in order when application starts and getInstance()s do not
create instances any more and they merely return the created
instances.
- Only set initial values in construtor functions __init__(). Move the
initialization of context-aware (i.e. things that depend on other
things) to separate functions.
- Split application creation and initialziation into several steps and
them should be called explicitly in the correct order.
It's also time for some much needed code cleaning in that bit. The auto-detect is moved to it's own job,
which should make it a whole lot easier to disable it all together.
CL-541
If a PrinterOutputDevice is able to connect quickly to a machine, then
by the time the MachineManager is created and connects to the signal,
it will be too late, and it might miss that there is already connected
devices.
# Conflicts:
# plugins/USBPrinting/USBPrinterOutputDeviceManager.py
This support was included when filtering for USB only, but not the case when we are not filtering. I don't like this bit of code much since we should just define a list of paths to check and iterate over it, so that we can re-use the data and prevent syncing mistakes like this.
The simple string replacement left an extraneous "/" in front of the path, which Windows can't handle. QUrl.toLocalFile() does a proper conversion.
CURA-955
Looking at the old code shows that the download process was never
completely finished. The according function was only return'ed, but no
signal was emitted to the window to give the user the possibility to
close it again.
Optionally, it would be useful here to pass messages to the window
dialog to inform the user about problems.
However, this code is untested because:
1. I don't know where put my printers *.hex-file, when coding here with
my editor,
2. Have no idea how to reproduce the IO errors reported at JIRA, so
fingers crossed here.
Contributes to CURA-2079