mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 08:50:08 -05:00
Using QScopedPointer
This commit is contained in:
parent
0fe06b3fbb
commit
a1aad5d165
@ -162,8 +162,8 @@ void DatabaseOpenWidget::enterKey(const QString& pw, const QString& keyFile)
|
|||||||
void DatabaseOpenWidget::openDatabase()
|
void DatabaseOpenWidget::openDatabase()
|
||||||
{
|
{
|
||||||
KeePass2Reader reader;
|
KeePass2Reader reader;
|
||||||
CompositeKey* masterKey = databaseKey();
|
QScopedPointer<CompositeKey> masterKey(databaseKey());
|
||||||
if (masterKey == nullptr) {
|
if (masterKey.isNull()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,8 +190,6 @@ void DatabaseOpenWidget::openDatabase()
|
|||||||
MessageWidget::Error);
|
MessageWidget::Error);
|
||||||
m_ui->editPassword->clear();
|
m_ui->editPassword->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
delete masterKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CompositeKey* DatabaseOpenWidget::databaseKey()
|
CompositeKey* DatabaseOpenWidget::databaseKey()
|
||||||
|
Loading…
Reference in New Issue
Block a user