Skip to content

Commit

Permalink
Fix loss of integer precision in parameters for fileLockTimeRemaining…
Browse files Browse the repository at this point in the history
…Minutes

Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Dec 7, 2022
1 parent 1b5b30d commit 7eb31c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/editlocallyjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ void EditLocallyJob::fileLockProcedureComplete(const QString &notificationTitle,
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));
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editlocallyjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7eb31c3

Please sign in to comment.