From be288d26ca442cad0485a532d9bdd21906271053 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Thu, 4 Apr 2013 21:25:11 +0200 Subject: [PATCH] Change Entry::clone() to set a random uuid. --- src/core/Entry.cpp | 2 +- src/gui/DatabaseWidget.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/Entry.cpp b/src/core/Entry.cpp index 1254aef28..bd19e2a49 100644 --- a/src/core/Entry.cpp +++ b/src/core/Entry.cpp @@ -436,7 +436,7 @@ Entry* Entry::clone() const { Entry* entry = new Entry(); entry->setUpdateTimeinfo(false); - entry->m_uuid = m_uuid; + entry->m_uuid = Uuid::random(); entry->m_data = m_data; entry->m_attributes->copyDataFrom(m_attributes); entry->m_attachments->copyDataFrom(m_attachments); diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 57f845772..277853e5b 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -222,7 +222,6 @@ void DatabaseWidget::cloneEntry() } Entry* entry = currentEntry->clone(); - entry->setUuid(Uuid::random()); entry->setGroup(currentEntry->group()); m_entryView->setFocus(); m_entryView->setCurrentEntry(entry);