FdoSecrets: handle corner cases in collection dbus names, fix #5279
- Use completeBaseName rather than baseName to ensure nonempty name - Handle two databases have the same name - Cleanup Service::onDatabaseTabOpened logic
This commit is contained in:
@@ -28,13 +28,13 @@ namespace FdoSecrets
|
||||
|
||||
Session* Session::Create(std::unique_ptr<CipherPair>&& cipher, const QString& peer, Service* parent)
|
||||
{
|
||||
std::unique_ptr<Session> res{new Session(std::move(cipher), peer, parent)};
|
||||
QScopedPointer<Session> res{new Session(std::move(cipher), peer, parent)};
|
||||
|
||||
if (!res->registerSelf()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return res.release();
|
||||
return res.take();
|
||||
}
|
||||
|
||||
Session::Session(std::unique_ptr<CipherPair>&& cipher, const QString& peer, Service* parent)
|
||||
|
||||
Reference in New Issue
Block a user