Skip to content

Commit

Permalink
modules: use 'fromSecsSinceEpoch' instead of 'fromTime_t'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Chiitoo authored and Emdek committed Aug 7, 2024
1 parent e963342 commit 60b64fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ void OperaBookmarksImportJob::start()
}
else if (line.startsWith(QLatin1String("\tCREATED=")))
{
bookmark->setData(QDateTime::fromTime_t(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeAddedRole);
bookmark->setData(QDateTime::fromSecsSinceEpoch(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeAddedRole);
}
else if (line.startsWith(QLatin1String("\tVISITED=")))
{
bookmark->setData(QDateTime::fromTime_t(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeVisitedRole);
bookmark->setData(QDateTime::fromSecsSinceEpoch(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeVisitedRole);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ bool OperaNotesImportDataExchanger::importData(const QString &path)
}
else if (line.startsWith(QLatin1String("\tCREATED=")))
{
note->setData(QDateTime::fromTime_t(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeAddedRole);
note->setData(QDateTime::fromSecsSinceEpoch(line.section(QLatin1Char('='), 1, -1).toUInt()), BookmarksModel::TimeAddedRole);
}
}
}
Expand Down

0 comments on commit 60b64fd

Please sign in to comment.