mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-25 15:55:38 -04:00
Replace MessageBox with MessageWidget in remaining classes.
Chnage to one method to set MessageWidget text passing type as parameter. Only messages with questions requiring user input reamin using MessageBox dialog. Use signal/slots to set message in MessageWidget and hide message, signal/slots only used when required.Maybe need to change all calls to signals/slots in the future.
This commit is contained in:
parent
c2826bb1af
commit
13c85cdfcb
20 changed files with 169 additions and 77 deletions
|
@ -108,8 +108,8 @@ void DatabaseOpenWidget::openDatabase()
|
|||
|
||||
QFile file(m_filename);
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
m_ui->messageWidget->showMessageError(
|
||||
tr("Unable to open the database.").append("\n").append(file.errorString()));
|
||||
m_ui->messageWidget->showMessage(
|
||||
tr("Unable to open the database.").append("\n").append(file.errorString()), MessageWidget::Error);
|
||||
return;
|
||||
}
|
||||
if (m_db) {
|
||||
|
@ -126,8 +126,8 @@ void DatabaseOpenWidget::openDatabase()
|
|||
Q_EMIT editFinished(true);
|
||||
}
|
||||
else {
|
||||
m_ui->messageWidget->showMessageError(tr("Unable to open the database.")
|
||||
.append("\n").append(reader.errorString()));
|
||||
m_ui->messageWidget->showMessage(tr("Unable to open the database.")
|
||||
.append("\n").append(reader.errorString()), MessageWidget::Error);
|
||||
m_ui->editPassword->clear();
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +147,8 @@ CompositeKey DatabaseOpenWidget::databaseKey()
|
|||
QString keyFilename = m_ui->comboKeyFile->currentText();
|
||||
QString errorMsg;
|
||||
if (!key.load(keyFilename, &errorMsg)) {
|
||||
m_ui->messageWidget->showMessageError(tr("Can't open key file").append(":\n").append(errorMsg));
|
||||
m_ui->messageWidget->showMessage(tr("Can't open key file").append(":\n")
|
||||
.append(errorMsg), MessageWidget::Error);
|
||||
return CompositeKey();
|
||||
}
|
||||
masterKey.addKey(key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue