Add a runtime warning about trying to start the same job twice#272
Add a runtime warning about trying to start the same job twice#272CarlSchwan wants to merge 1 commit into
Conversation
b34a98c to
b2a40f4
Compare
b2a40f4 to
dc56c83
Compare
|
|
||
| void Job::start() | ||
| { | ||
| if (d->started) { |
There was a problem hiding this comment.
Do we have to take care about multithreaded use? Sorry, I don't know about the general policy on whether Qt Keychain supports multithreaded access or not.
There was a problem hiding this comment.
Jobs aren't thread-safe and must be created and accessed in a single thread, so here that's fine. Which of the backends would even support multithreaded access is a good question, I always assumed that people use this from the main/UI thread.
| void Job::start() | ||
| { | ||
| if (d->started) { | ||
| qCritical() << "Starting the same twice. This is not supported, aborting."; |
There was a problem hiding this comment.
I'd give some more context, like "Starting the same QtKeychain job twice". Otherwise looks good
There was a problem hiding this comment.
Or maybe just "The QtKeychain job is already started, ignoring.". So it also stays correct for N start() calls
No description provided.