mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Merge pull request #1119 from louib/no_reload_prompt_when_locked
Disable reload prompt when db is locked
This commit is contained in:
commit
0c3f352c63
@ -825,7 +825,7 @@ void DatabaseWidget::unlockDatabase(bool accepted)
|
||||
return;
|
||||
}
|
||||
|
||||
Database *db = Q_NULLPTR;
|
||||
Database* db = nullptr;
|
||||
if (sender() == m_unlockDatabaseDialog) {
|
||||
db = m_unlockDatabaseDialog->database();
|
||||
} else if (sender() == m_unlockDatabaseWidget) {
|
||||
@ -1125,8 +1125,13 @@ void DatabaseWidget::onWatchedFileChanged()
|
||||
|
||||
void DatabaseWidget::reloadDatabaseFile()
|
||||
{
|
||||
if (m_db == nullptr)
|
||||
if (m_db == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentMode() == DatabaseWidget::LockedMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (! config()->get("AutoReloadOnChange").toBool()) {
|
||||
// Ask if we want to reload the db
|
||||
|
@ -31,7 +31,7 @@ class UnlockDatabaseDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit UnlockDatabaseDialog(QWidget* parent = Q_NULLPTR);
|
||||
explicit UnlockDatabaseDialog(QWidget* parent = nullptr);
|
||||
void setDBFilename(const QString& filename);
|
||||
void clearForms();
|
||||
Database* database();
|
||||
|
Loading…
Reference in New Issue
Block a user