Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/csvImport/CsvImportWidget.cpp')
-rw-r--r--src/gui/csvImport/CsvImportWidget.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/csvImport/CsvImportWidget.cpp b/src/gui/csvImport/CsvImportWidget.cpp
index 23db871f3..ad56a873b 100644
--- a/src/gui/csvImport/CsvImportWidget.cpp
+++ b/src/gui/csvImport/CsvImportWidget.cpp
@@ -37,6 +37,8 @@ const QStringList CsvImportWidget::m_columnHeader = QStringList()
<< QObject::tr("Password")
<< QObject::tr("URL")
<< QObject::tr("Notes")
+ << QObject::tr("Last Modified")
+ << QObject::tr("Created")
// << QObject::tr("Future field1")
// << QObject::tr("Future field2")
// << QObject::tr("Future field3")
@@ -223,6 +225,21 @@ void CsvImportWidget::writeDatabase() {
entry->setPassword(m_parserModel->data(m_parserModel->index(r, 3)).toString());
entry->setUrl(m_parserModel->data(m_parserModel->index(r, 4)).toString());
entry->setNotes(m_parserModel->data(m_parserModel->index(r, 5)).toString());
+
+ TimeInfo timeInfo;
+ if (m_parserModel->data(m_parserModel->index(r, 6)).isValid()) {
+ qint64 lastModified = m_parserModel->data(m_parserModel->index(r, 6)).toString().toLongLong();
+ if (lastModified) {
+ timeInfo.setLastModificationTime(QDateTime::fromMSecsSinceEpoch(lastModified * 1000).toTimeSpec(Qt::UTC));
+ }
+ }
+ if (m_parserModel->data(m_parserModel->index(r, 7)).isValid()) {
+ qint64 created = m_parserModel->data(m_parserModel->index(r, 7)).toString().toLongLong();
+ if (created) {
+ timeInfo.setCreationTime(QDateTime::fromMSecsSinceEpoch(created * 1000).toTimeSpec(Qt::UTC));
+ }
+ }
+ entry->setTimeInfo(timeInfo);
}
QBuffer buffer;
buffer.open(QBuffer::ReadWrite);