mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-10 07:20:23 -04:00
Fix memory leaks in tests
This commit is contained in:
parent
ccfd7a065c
commit
72a1c65d00
4 changed files with 30 additions and 22 deletions
|
@ -117,7 +117,14 @@ void TestGui::cleanup()
|
|||
triggerAction("actionDatabaseClose");
|
||||
Tools::wait(100);
|
||||
|
||||
if (m_db) {
|
||||
delete m_db;
|
||||
}
|
||||
m_db = nullptr;
|
||||
|
||||
if (m_dbWidget) {
|
||||
delete m_dbWidget;
|
||||
}
|
||||
m_dbWidget = nullptr;
|
||||
}
|
||||
|
||||
|
@ -1060,7 +1067,7 @@ void TestGui::dragAndDropGroup(const QModelIndex& sourceIndex, const QModelIndex
|
|||
QVERIFY(sourceIndex.isValid());
|
||||
QVERIFY(targetIndex.isValid());
|
||||
|
||||
GroupModel* groupModel = qobject_cast<GroupModel*>(m_dbWidget->findChild<GroupView*>("groupView")->model());
|
||||
auto groupModel = qobject_cast<GroupModel*>(m_dbWidget->findChild<GroupView*>("groupView")->model());
|
||||
|
||||
QMimeData mimeData;
|
||||
QByteArray encoded;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue