19#include "../util/btassert.h"
25#include <installmgr.h>
50 return normalizeCompletionPercentage<int>((done / total) * 100);
53template <
typename T,
class =
void>
55 template <
typename ... Args>
61 std::void_t<decltype(std::declval<T &>().setTimeoutMillis(0))>>
63 template <
typename ... Args>
65 { c.setTimeoutMillis(std::forward<Args>(args)...); }
77 , m_firstCallOfPreStatus(true)
107 const int totalPercent = calculateIntPercentage<double>(dlnow +
m_completedBytes,
109 const int filePercent = calculateIntPercentage(dlnow, dltotal);
void percentCompleted(const int total, const int file)
BtInstallMgr(QObject *parent=nullptr)
bool m_firstCallOfPreStatus
void statusUpdate(double dltotal, double dlnow) override
bool isUserDisclaimerConfirmed() const override
void preStatus(long totalBytes, long completedBytes, const char *message) override
int calculateIntPercentage(T done, T total)
T normalizeCompletionPercentage(const T value)
static void setTimeoutMillis(T &c, Args &&... args)
static void setTimeoutMillis(Args &&...) noexcept