mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 12:47:44 +00:00
Modernize GameInstaller
This commit is contained in:
parent
dc298a24f1
commit
4d45f5b4bc
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue