spix
spix copied to clipboard
Screenshot warning
This PR aims to help the client know if takeScreenshot
method has managed to produce and save an image by returning a boolean value through xmlrpc and adding some logs.
The need of such logs appeared to me in the case you don't specify an image format, for example if you type s.takeScreenshot("mainWindow","image")
no image will be produce because Qt doesn't recognize a valid file extension (because the optional parameter const char *format = nullptr
of QImage::save
isn't set) and the client currently hasn't a clue of why it didn't work.
However, I'm not quite sure if I've done it right, following your conventions, so please tell me if anything has been done wrong.