1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 12:47:44 +00:00

Modernize GameInstaller

This commit is contained in:
Joshua Goins 2023-09-16 21:28:22 -04:00
parent dc298a24f1
commit 4d45f5b4bc

View file

@ -3,6 +3,7 @@
#include "gameinstaller.h" #include "gameinstaller.h"
#include <KLocalizedString>
#include <QFile> #include <QFile>
#include <QNetworkReply> #include <QNetworkReply>
#include <QStandardPaths> #include <QStandardPaths>
@ -30,7 +31,7 @@ void GameInstaller::installGame()
auto reply = m_launcher.mgr->get(request); auto reply = m_launcher.mgr->get(request);
QObject::connect(reply, &QNetworkReply::finished, [this, reply, installDirectory] { QObject::connect(reply, &QNetworkReply::finished, [this, reply, installDirectory] {
if (reply->error() != QNetworkReply::NetworkError::NoError) { if (reply->error() != QNetworkReply::NetworkError::NoError) {
Q_EMIT error(QStringLiteral("An error has occurred when downloading the installer.\n\n%1").arg(reply->errorString())); Q_EMIT error(i18n("An error has occurred when downloading the installer.\n\n%1", reply->errorString()));
return; return;
} }