File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ const QStringList CsvImportWidget::m_columnHeader = QStringList()
37
37
<< QObject::tr(" Password" )
38
38
<< QObject::tr(" URL" )
39
39
<< QObject::tr(" Notes" )
40
+ << QObject::tr(" Last Modified" )
41
+ << QObject::tr(" Created" )
40
42
// << QObject::tr("Future field1")
41
43
// << QObject::tr("Future field2")
42
44
// << QObject::tr("Future field3")
@@ -223,6 +225,18 @@ void CsvImportWidget::writeDatabase() {
223
225
entry->setPassword (m_parserModel->data (m_parserModel->index (r, 3 )).toString ());
224
226
entry->setUrl (m_parserModel->data (m_parserModel->index (r, 4 )).toString ());
225
227
entry->setNotes (m_parserModel->data (m_parserModel->index (r, 5 )).toString ());
228
+
229
+ if (m_parserModel->data (m_parserModel->index (r, 6 )).isValid ()) {
230
+ qint64 lastModified = m_parserModel->data (m_parserModel->index (r, 6 )).toString ().toLongLong ();
231
+ qint64 created = m_parserModel->data (m_parserModel->index (r, 7 )).toString ().toLongLong ();
232
+ if (!lastModified || !created)
233
+ continue ;
234
+
235
+ TimeInfo timeInfo;
236
+ timeInfo.setLastModificationTime (QDateTime::fromSecsSinceEpoch (lastModified).toTimeSpec (Qt::UTC));
237
+ timeInfo.setCreationTime (QDateTime::fromSecsSinceEpoch (created).toTimeSpec (Qt::UTC));
238
+ entry->setTimeInfo (timeInfo);
239
+ }
226
240
}
227
241
QBuffer buffer;
228
242
buffer.open (QBuffer::ReadWrite);
You can’t perform that action at this time.
0 commit comments