Skip to content

Commit 60b64fd

Browse files
ChiitooEmdek
authored andcommitted
modules: use 'fromSecsSinceEpoch' instead of 'fromTime_t'
Required for Qt 6, and 'fromTime_t' has become obsolete already during Qt 5 times. - https://code.qt.io/cgit/qt/qtbase.git/commit/?id=8c8eae279d5 Picked from: #1770
1 parent e963342 commit 60b64fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/modules/importers/opera/OperaBookmarksImportDataExchanger.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,11 @@ void OperaBookmarksImportJob::start()
285285
}
286286
else if (line.startsWith(QLatin1String("\tCREATED=")))
287287
{
288-
bookmark->setData(QDateTime::fromTime_t(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeAddedRole);
288+
bookmark->setData(QDateTime::fromSecsSinceEpoch(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeAddedRole);
289289
}
290290
else if (line.startsWith(QLatin1String("\tVISITED=")))
291291
{
292-
bookmark->setData(QDateTime::fromTime_t(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeVisitedRole);
292+
bookmark->setData(QDateTime::fromSecsSinceEpoch(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeVisitedRole);
293293
}
294294
}
295295
}

src/modules/importers/opera/OperaNotesImportDataExchanger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ bool OperaNotesImportDataExchanger::importData(const QString &path)
243243
}
244244
else if (line.startsWith(QLatin1String("\tCREATED=")))
245245
{
246-
note->setData(QDateTime::fromTime_t(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeAddedRole);
246+
note->setData(QDateTime::fromSecsSinceEpoch(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeAddedRole);
247247
}
248248
}
249249
}

0 commit comments

Comments
 (0)