Add editFinished signal which can be used to auto save the database.
This commit is contained in:
@@ -147,6 +147,7 @@ DatabaseWidget::DatabaseWidget(Database* db, QWidget* parent)
|
||||
connect(m_groupView, SIGNAL(groupChanged(Group*)), this, SLOT(clearLastGroup(Group*)));
|
||||
connect(m_groupView, SIGNAL(groupChanged(Group*)), SLOT(updateGroupActions(Group*)));
|
||||
connect(m_groupView, SIGNAL(groupChanged(Group*)), m_entryView, SLOT(setGroup(Group*)));
|
||||
connect(m_groupView, SIGNAL(editFinished()), this, SIGNAL(editFinished()));
|
||||
connect(m_entryView, SIGNAL(entryActivated(Entry*)), SLOT(switchToEntryEdit(Entry*)));
|
||||
connect(m_editEntryWidget, SIGNAL(editFinished(bool)), SLOT(switchToView(bool)));
|
||||
connect(m_editEntryWidget, SIGNAL(historyEntryActivated(Entry*)), SLOT(switchToHistoryView(Entry*)));
|
||||
@@ -258,6 +259,8 @@ void DatabaseWidget::cloneEntry()
|
||||
entry->setGroup(currentEntry->group());
|
||||
m_entryView->setFocus();
|
||||
m_entryView->setCurrentEntry(entry);
|
||||
|
||||
Q_EMIT editFinished();
|
||||
}
|
||||
|
||||
void DatabaseWidget::deleteEntry()
|
||||
@@ -282,6 +285,8 @@ void DatabaseWidget::deleteEntry()
|
||||
else {
|
||||
m_db->recycleEntry(currentEntry);
|
||||
}
|
||||
|
||||
Q_EMIT editFinished();
|
||||
}
|
||||
|
||||
void DatabaseWidget::copyUsername()
|
||||
@@ -341,6 +346,8 @@ void DatabaseWidget::deleteGroup()
|
||||
else {
|
||||
m_db->recycleGroup(currentGroup);
|
||||
}
|
||||
|
||||
Q_EMIT editFinished();
|
||||
}
|
||||
|
||||
int DatabaseWidget::addWidget(QWidget* w)
|
||||
@@ -398,6 +405,8 @@ void DatabaseWidget::switchToView(bool accepted)
|
||||
m_newParent = 0;
|
||||
}
|
||||
|
||||
Q_EMIT editFinished();
|
||||
|
||||
setCurrentIndex(0);
|
||||
}
|
||||
|
||||
@@ -446,6 +455,8 @@ void DatabaseWidget::updateMasterKey(bool accepted)
|
||||
return;
|
||||
}
|
||||
|
||||
Q_EMIT editFinished();
|
||||
|
||||
setCurrentIndex(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user