mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-30 13:53:01 -08: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:
1 parent
551637f0c2
commit
d5b70b1bef
11 files changed
+176
-41
No files matched your search
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user