Fix Auto-Type gui guard for tests
Prevent showing gui error dialogs when no gui is present. This can occur during auto-type tests.
This commit is contained in:
@@ -335,7 +335,9 @@ void AutoType::executeAutoTypeActions(const Entry* entry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!result.canRetry() || i == max_retries) {
|
if (!result.canRetry() || i == max_retries) {
|
||||||
MessageBox::critical(getMainWindow(), tr("Auto-Type Error"), result.errorString());
|
if (getMainWindow()) {
|
||||||
|
MessageBox::critical(getMainWindow(), tr("Auto-Type Error"), result.errorString());
|
||||||
|
}
|
||||||
emit autotypeRejected();
|
emit autotypeRejected();
|
||||||
m_inAutoType.unlock();
|
m_inAutoType.unlock();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user