mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-31 08:10:30 -05:00
Better description text for Key File change dialog
This commit is contained in:
parent
01d86760e0
commit
dc496fd1d9
3 changed files with 53 additions and 52 deletions
|
|
@ -40,7 +40,7 @@ KeyFileEditWidget::~KeyFileEditWidget()
|
|||
bool KeyFileEditWidget::addToCompositeKey(QSharedPointer<CompositeKey> key)
|
||||
{
|
||||
auto fileKey = QSharedPointer<FileKey>::create();
|
||||
QString fileKeyName = m_compUi->keyFileCombo->currentText();
|
||||
QString fileKeyName = m_compUi->keyFileLineEdit->text();
|
||||
if (!fileKey->load(fileKeyName, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ bool KeyFileEditWidget::validate(QString& errorMessage) const
|
|||
{
|
||||
FileKey fileKey;
|
||||
QString fileKeyError;
|
||||
QString fileKeyName = m_compUi->keyFileCombo->currentText();
|
||||
QString fileKeyName = m_compUi->keyFileLineEdit->text();
|
||||
if (!fileKey.load(fileKeyName, &fileKeyError)) {
|
||||
errorMessage = tr("Error loading the key file '%1'\nMessage: %2").arg(fileKeyName, fileKeyError);
|
||||
return false;
|
||||
|
|
@ -85,7 +85,7 @@ void KeyFileEditWidget::initComponentEditWidget(QWidget* widget)
|
|||
{
|
||||
Q_UNUSED(widget);
|
||||
Q_ASSERT(m_compEditWidget);
|
||||
m_compUi->keyFileCombo->setFocus();
|
||||
m_compUi->keyFileLineEdit->setFocus();
|
||||
}
|
||||
|
||||
void KeyFileEditWidget::initComponent()
|
||||
|
|
@ -120,7 +120,7 @@ void KeyFileEditWidget::createKeyFile()
|
|||
tr("Unable to create key file: %1").arg(errorMsg),
|
||||
QMessageBox::Button::Ok);
|
||||
} else {
|
||||
m_compUi->keyFileCombo->setEditText(fileName);
|
||||
m_compUi->keyFileLineEdit->setText(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -155,6 +155,6 @@ void KeyFileEditWidget::browseKeyFile()
|
|||
}
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
m_compUi->keyFileCombo->setEditText(fileName);
|
||||
m_compUi->keyFileLineEdit->setText(fileName);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue