Git: Avoid usage of deprecated QDateTime::fromTime_t

Change-Id: I37ce617990ee385e37261624d847a0aef757d283
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2018-09-21 01:58:59 +03:00
committed by Orgad Shaneh
parent f350c4d1d4
commit 6296e7bb38
3 changed files with 6 additions and 6 deletions

View File

@@ -593,7 +593,7 @@ QModelIndex BranchModel::addBranch(const QString &name, bool track, const QModel
VcsCommand::SuppressCommandLogging)) {
const QStringList values = output.split(' ');
startSha = values[0];
branchDateTime = QDateTime::fromTime_t(values[1].toUInt());
branchDateTime = QDateTime::fromSecsSinceEpoch(values[1].toLongLong());
}
}
@@ -677,8 +677,8 @@ void BranchModel::parseOutputLine(const QString &line)
if (strDateTime.isEmpty())
strDateTime = lineParts.at(4);
if (!strDateTime.isEmpty()) {
const uint timeT = strDateTime.leftRef(strDateTime.indexOf(' ')).toUInt();
dateTime = QDateTime::fromTime_t(timeT);
const qint64 timeT = strDateTime.leftRef(strDateTime.indexOf(' ')).toLongLong();
dateTime = QDateTime::fromSecsSinceEpoch(timeT);
}
if (!m_oldBranchesIncluded && !current && dateTime.isValid()) {