From 4734123a70943faf2227a4932f52f8d648fb293d Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Fri, 2 Jul 2021 11:46:42 -0400 Subject: [PATCH] qtwrapper: Resolve type discrepancy in fileTransferInfo. * src/qtwrapper/configurationmanager_wrap.h (fileTransferInfo) <int64_t&>: Change type of TOTAL and PROGRESS to qlonglong&. Convert to int64_t via reinterpret_cast. This is safe as both types are guaranteed to be 64 bits. Change-Id: I91d7e12e751ef5e4d07ac4647b4e99a15b05b507 --- src/qtwrapper/configurationmanager_wrap.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qtwrapper/configurationmanager_wrap.h b/src/qtwrapper/configurationmanager_wrap.h index d353b400..250baa74 100644 --- a/src/qtwrapper/configurationmanager_wrap.h +++ b/src/qtwrapper/configurationmanager_wrap.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2014-2021 Savoir-faire Linux Inc. * + * Copyright (C) 2014-2021 Savoir-faire Linux Inc. * * Author : Philippe Groarke <philippe.groarke@savoirfairelinux.com> * * Author : Alexandre Lision <alexandre.lision@savoirfairelinux.com> * * * @@ -860,16 +860,16 @@ public Q_SLOTS: // METHODS QString conversationId, QString fileId, QString& path, - int64_t& total, - int64_t& progress) + qlonglong& total, + qlonglong& progress) { std::string pathstr; auto result = uint32_t(DRing::fileTransferInfo(accountId.toStdString(), conversationId.toStdString(), fileId.toStdString(), pathstr, - total, - progress)); + reinterpret_cast<int64_t&>(total), + reinterpret_cast<int64_t&>(progress))); path = pathstr.c_str(); return result; } -- GitLab