Replaced Uuid with QUuid

This commit is contained in:
pasdam
2018-03-22 22:56:05 +01:00
committed by Jonathan White
parent dcece140a0
commit ad4423d226
49 changed files with 413 additions and 612 deletions

View File

@@ -192,8 +192,8 @@ void CsvImportWidget::load(const QString& filename, Database* const db)
m_parserModel->setFilename(filename);
m_ui->labelFilename->setText(filename);
Group* group = m_db->rootGroup();
group->setUuid(Uuid::random());
group->setNotes(tr("Imported from CSV file\nOriginal data: %1").arg(filename));
group->setUuid(QUuid::createUuid());
group->setNotes(tr("Imported from CSV file").append("\n").append(tr("Original data: ")) + filename);
parse();
}
@@ -235,7 +235,7 @@ void CsvImportWidget::writeDatabase()
if (not m_parserModel->data(m_parserModel->index(r, 1)).isValid())
continue;
Entry* entry = new Entry();
entry->setUuid(Uuid::random());
entry->setUuid(QUuid::createUuid());
entry->setGroup(splitGroups(m_parserModel->data(m_parserModel->index(r, 0)).toString()));
entry->setTitle(m_parserModel->data(m_parserModel->index(r, 1)).toString());
entry->setUsername(m_parserModel->data(m_parserModel->index(r, 2)).toString());
@@ -324,7 +324,7 @@ Group* CsvImportWidget::splitGroups(QString label)
Group* brandNew = new Group();
brandNew->setParent(current);
brandNew->setName(groupName);
brandNew->setUuid(Uuid::random());
brandNew->setUuid(QUuid::createUuid());
current = brandNew;
} else {
Q_ASSERT(children != nullptr);