From 7eb31c31e5e30b187f92b0fcc39191a6f46f8ca0 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 7 Dec 2022 13:47:48 +0100 Subject: [PATCH] Fix loss of integer precision in parameters for fileLockTimeRemainingMinutes Signed-off-by: Claudio Cambra --- src/gui/editlocallyjob.cpp | 2 +- src/gui/editlocallyjob.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/editlocallyjob.cpp b/src/gui/editlocallyjob.cpp index b4607d579eb70..de01a2cc2a9b9 100644 --- a/src/gui/editlocallyjob.cpp +++ b/src/gui/editlocallyjob.cpp @@ -645,7 +645,7 @@ void EditLocallyJob::fileLockProcedureComplete(const QString ¬ificationTitle, openFile(); } -int EditLocallyJob::fileLockTimeRemainingMinutes(const int lockTime, const int lockTimeOut) +int EditLocallyJob::fileLockTimeRemainingMinutes(const qint64 lockTime, const qint64 lockTimeOut) { const auto lockExpirationTime = lockTime + lockTimeOut; const auto remainingTime = QDateTime::currentDateTime().secsTo(QDateTime::fromSecsSinceEpoch(lockExpirationTime)); diff --git a/src/gui/editlocallyjob.h b/src/gui/editlocallyjob.h index 60637889e6c46..158e0fc5d2e73 100644 --- a/src/gui/editlocallyjob.h +++ b/src/gui/editlocallyjob.h @@ -87,7 +87,7 @@ private slots: [[nodiscard]] const QString getRelativePathToRemoteRootForFile() const; // returns either '/' or a (relative path - Folder::remotePath()) for folders pointing to a non-root remote path e.g. '/subfolder' instead of '/' [[nodiscard]] const QString getRelativePathParent() const; - [[nodiscard]] static int fileLockTimeRemainingMinutes(const int lockTime, const int lockTimeOut); + [[nodiscard]] static int fileLockTimeRemainingMinutes(const qint64 lockTime, const qint64 lockTimeOut); bool _tokenVerified = false;