checkUpates: installer support (Win), use GUI buildTag and version

This commit is contained in:
xiphon
2020-04-23 14:19:20 +00:00
parent 585fb2810d
commit 9b98e0a2f5
5 changed files with 86 additions and 5 deletions

View File

@@ -463,10 +463,18 @@ bool WalletManager::saveQrCode(const QString &code, const QString &path) const
return QRCodeImageProvider::genQrImage(code, &size).scaled(size.expandedTo(QSize(240, 240)), Qt::KeepAspectRatio).save(path, "PNG", 100);
}
void WalletManager::checkUpdatesAsync(const QString &software, const QString &subdir)
void WalletManager::checkUpdatesAsync(
const QString &software,
const QString &subdir,
const QString &buildTag,
const QString &version)
{
m_scheduler.run([this, software, subdir] {
const auto updateInfo = Monero::WalletManager::checkUpdates(software.toStdString(), subdir.toStdString());
m_scheduler.run([this, software, subdir, buildTag, version] {
const auto updateInfo = Monero::WalletManager::checkUpdates(
software.toStdString(),
subdir.toStdString(),
buildTag.toStdString().c_str(),
version.toStdString().c_str());
if (!std::get<0>(updateInfo))
{
return;