mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-05 13:37:43 +03:00
Add a QMessageBox wrapper class to help gui tests.
QMessageBox displays modal dialogs which blocks the gui tests. To work around this we add a MessageBox wrapper class where the tests can set the answer for the next dialog. The answer is then returned without actually showing the dialog.
This commit is contained in:
parent
551637f0c2
commit
d5b70b1bef
11 changed files with 176 additions and 41 deletions
|
@ -17,10 +17,9 @@
|
|||
|
||||
#include "UnlockDatabaseWidget.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "ui_DatabaseOpenWidget.h"
|
||||
#include "core/Database.h"
|
||||
#include "gui/MessageBox.h"
|
||||
|
||||
UnlockDatabaseWidget::UnlockDatabaseWidget(QWidget* parent)
|
||||
: DatabaseOpenWidget(parent)
|
||||
|
@ -50,7 +49,7 @@ void UnlockDatabaseWidget::openDatabase()
|
|||
Q_EMIT editFinished(true);
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(this, tr("Error"), tr("Wrong key."));
|
||||
MessageBox::warning(this, tr("Error"), tr("Wrong key."));
|
||||
m_ui->editPassword->clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue