summaryrefslogtreecommitdiff
path: root/src/plugins/git/branchmodel.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2018-09-21 01:58:59 +0300
committerOrgad Shaneh <orgads@gmail.com>2018-09-21 08:16:28 +0000
commit6296e7bb387ac6e3a67c493e746dc9dd45feaa74 (patch)
tree2c2114a94f552d824456888c70a1e8cfac227558 /src/plugins/git/branchmodel.cpp
parentf350c4d1d4696074f7f947ca89509dfa5700f364 (diff)
downloadqt-creator-6296e7bb387ac6e3a67c493e746dc9dd45feaa74.tar.gz
Git: Avoid usage of deprecated QDateTime::fromTime_t
Change-Id: I37ce617990ee385e37261624d847a0aef757d283 Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src/plugins/git/branchmodel.cpp')
-rw-r--r--src/plugins/git/branchmodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/git/branchmodel.cpp b/src/plugins/git/branchmodel.cpp
index 2454318eab..a7bba79a45 100644
--- a/src/plugins/git/branchmodel.cpp
+++ b/src/plugins/git/branchmodel.cpp
@@ -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()) {