Is there a way to detect if a printer is online using libcups or Qt?
I am working on a program that requires a printer, and uses both libcups and QPrinter
I would like to give the user a nice error message if the current/default printer is not connected.
Right now, if the default printer is turned off (or not connected),
cups_dest_s printers = NULL;
int printerCount = cupsGetDests(&printers);
this crashes:
*** glibc detected *** /home/me/myApp/myApp: double free or corruption (out): 0x088501e0 ***
How can I determine if the current / default printer is physically connected and turned on ?