Store version numbers in the appropriate type

This commit is contained in:
sledgehammer999
2025-06-30 10:08:22 +03:00
committed by Vladimir Golovnev (glassez)
parent dd5c934103
commit bb34444ddc
3 changed files with 22 additions and 27 deletions

View File

@@ -1660,11 +1660,11 @@ void MainWindow::handleUpdateCheckFinished(ProgramUpdater *updater, const bool i
updater->deleteLater();
};
const QString newVersion = updater->getNewVersion();
if (!newVersion.isEmpty())
const auto newVersion = updater->getNewVersion();
if (newVersion.isValid())
{
const QString msg {tr("A new version is available.") + u"<br/>"
+ tr("Do you want to download %1?").arg(newVersion) + u"<br/><br/>"
+ tr("Do you want to download %1?").arg(newVersion.toString()) + u"<br/><br/>"
+ u"<a href=\"https://www.qbittorrent.org/news\">%1</a>"_s.arg(tr("Open changelog..."))};
auto *msgBox = new QMessageBox {QMessageBox::Question, tr("qBittorrent Update Available"), msg
, (QMessageBox::Yes | QMessageBox::No), this};