Allow passing entry cloning flags to Group::clone().

This commit is contained in:
Felix Geyer 2013-11-22 13:34:34 +01:00
parent f2dfef8c41
commit a992c76d6a
2 changed files with 3 additions and 3 deletions

View file

@ -464,7 +464,7 @@ QSet<Uuid> Group::customIconsRecursive() const
return result; return result;
} }
Group* Group::clone() const Group* Group::clone(Entry::CloneFlags entryFlags) const
{ {
Group* clonedGroup = new Group(); Group* clonedGroup = new Group();
@ -474,7 +474,7 @@ Group* Group::clone() const
clonedGroup->m_data = m_data; clonedGroup->m_data = m_data;
Q_FOREACH (Entry* entry, entries()) { Q_FOREACH (Entry* entry, entries()) {
Entry* clonedEntry = entry->clone(Entry::CloneNewUuid | Entry::CloneResetTimeInfo); Entry* clonedEntry = entry->clone(entryFlags);
clonedEntry->setGroup(clonedGroup); clonedEntry->setGroup(clonedGroup);
} }

View file

@ -107,7 +107,7 @@ public:
* Note that you need to copy the custom icons manually when inserting the * Note that you need to copy the custom icons manually when inserting the
* new group into another database. * new group into another database.
*/ */
Group* clone() const; Group* clone(Entry::CloneFlags entryFlags = Entry::CloneNewUuid | Entry::CloneResetTimeInfo) const;
void copyDataFrom(const Group* other); void copyDataFrom(const Group* other);
QList<Entry*> search(const QString& searchTerm, Qt::CaseSensitivity caseSensitivity, QList<Entry*> search(const QString& searchTerm, Qt::CaseSensitivity caseSensitivity,