Close databases when they are locked.

Previously we've only hidden access to them.

Closes #275
This commit is contained in:
Felix Geyer 2015-01-11 16:20:59 +01:00
parent 33650c4a04
commit 9e051e835b
11 changed files with 149 additions and 91 deletions

View file

@ -109,8 +109,7 @@ void EditGroupWidget::save()
m_group->setIcon(iconStruct.uuid);
}
m_group = Q_NULLPTR;
m_database = Q_NULLPTR;
clear();
Q_EMIT editFinished(true);
}
@ -121,9 +120,14 @@ void EditGroupWidget::cancel()
m_group->setIcon(Entry::DefaultIconNumber);
}
clear();
Q_EMIT editFinished(false);
}
void EditGroupWidget::clear()
{
m_group = Q_NULLPTR;
m_database = Q_NULLPTR;
Q_EMIT editFinished(false);
}
void EditGroupWidget::addTriStateItems(QComboBox* comboBox, bool inheritDefault)

View file

@ -41,6 +41,7 @@ public:
~EditGroupWidget();
void loadGroup(Group* group, bool create, Database* database);
void clear();
Q_SIGNALS:
void editFinished(bool accepted);