mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-09-25 19:01:21 -04:00
FdoSecrets: fix new db created from DBus but not saved yet is not exposed by default
This commit is contained in:
parent
463bb0b03f
commit
b849fdead5
1 changed files with 13 additions and 2 deletions
|
@ -442,6 +442,16 @@ namespace FdoSecrets
|
||||||
|
|
||||||
QString Collection::name() const
|
QString Collection::name() const
|
||||||
{
|
{
|
||||||
|
if (m_backendPath.isEmpty()) {
|
||||||
|
// This is a newly created db without saving to file.
|
||||||
|
// This name is also used to register dbus path.
|
||||||
|
// For simplicity, we don't monitor the name change.
|
||||||
|
// So the dbus object path is not updated if the db name
|
||||||
|
// changes. This should not be a problem because once the database
|
||||||
|
// gets saved, the dbus path will be updated to use filename and
|
||||||
|
// everything back to normal.
|
||||||
|
return m_backend->database()->metadata()->name();
|
||||||
|
}
|
||||||
return QFileInfo(m_backendPath).baseName();
|
return QFileInfo(m_backendPath).baseName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,8 +556,9 @@ namespace FdoSecrets
|
||||||
}
|
}
|
||||||
|
|
||||||
// repopulate
|
// repopulate
|
||||||
Q_ASSERT(!backendLocked());
|
if (!backendLocked()) {
|
||||||
populateContents();
|
populateContents();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Collection::onEntryAdded(Entry* entry, bool emitSignal)
|
void Collection::onEntryAdded(Entry* entry, bool emitSignal)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue