mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix DatabaseTabWidget::lockDatabases returns false even when all tabs are locked
This commit is contained in:
parent
443614a375
commit
1fbddf4149
@ -627,7 +627,8 @@ DatabaseWidget* DatabaseTabWidget::currentDatabaseWidget()
|
|||||||
bool DatabaseTabWidget::lockDatabases()
|
bool DatabaseTabWidget::lockDatabases()
|
||||||
{
|
{
|
||||||
int numLocked = 0;
|
int numLocked = 0;
|
||||||
for (int i = 0, c = count(); i < c; ++i) {
|
int c = count();
|
||||||
|
for (int i = 0; i < c; ++i) {
|
||||||
auto dbWidget = databaseWidgetFromIndex(i);
|
auto dbWidget = databaseWidgetFromIndex(i);
|
||||||
if (dbWidget->lock()) {
|
if (dbWidget->lock()) {
|
||||||
++numLocked;
|
++numLocked;
|
||||||
@ -638,7 +639,7 @@ bool DatabaseTabWidget::lockDatabases()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return numLocked == count();
|
return numLocked == c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user