This way a confirmation dialog is always shown if the application allows privilege operation.
Depends on D10567
This way a confirmation dialog is always shown if the application allows privilege operation.
Depends on D10567
No Linters Available |
No Unit Test Coverage |
Just minor requests
src/core/slavebase.cpp | ||
---|---|---|
127 | move next to the other bool (-> less padding) | |
517 | BTW now that there are 5 duplicated lines below the //reset comment (in error and finished), it would be worth extracting a reset function... | |
1495 | This reads like it's going to ask confirmation every time this method is called (once we are in OperationAllowed state). The method impl uses a bool to ask only once, but that doesn't show here. One solution is to rename the method to maybeAskConfirmation, but that's not great. if (d->m_privilegeOperationStatus == OperationAllowed && !d->m_confirmationAsked) { d->m_confirmationAsked = true; d->m_privilegeOperationStatus = d->askConfirmation(); } This implies a small behavior change: in your patch, if the user presses Cancel, then he might still get asked again, while in my case he wouldn't. But, unless I'm wrong, after Cancel we'll go to SlaveBase::error() which will reset both member vars anyway, right? |