mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-24 13:27:45 +00:00
Fix more empty statements, remove some unused includes
This commit is contained in:
parent
37c4c0bb9c
commit
e2f915a990
6 changed files with 13 additions and 7 deletions
|
@ -42,7 +42,7 @@ private:
|
|||
long length;
|
||||
bool isBoot;
|
||||
|
||||
long bytesDownloaded;
|
||||
long bytesDownloaded = 0;
|
||||
bool downloaded = false;
|
||||
|
||||
[[nodiscard]] QString getVersion() const
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
|
||||
Q_INVOKABLE bool canDelete(Profile *account) const;
|
||||
|
||||
Q_INVOKABLE bool hasAnyExistingInstallations() const;
|
||||
[[nodiscard]] Q_INVOKABLE bool hasAnyExistingInstallations() const;
|
||||
|
||||
static QString getDefaultGamePath(const QString &uuid);
|
||||
static QString getDefaultWinePrefixPath(const QString &uuid);
|
||||
|
|
|
@ -28,7 +28,7 @@ void AccountManager::load()
|
|||
|
||||
int AccountManager::rowCount(const QModelIndex &index) const
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
Q_UNUSED(index)
|
||||
return static_cast<int>(m_accounts.size());
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,14 @@ QCoro::Task<bool> Patcher::patch(const PatchList &patchList)
|
|||
|
||||
const QString patchPath = repositoryDir.absoluteFilePath(filename);
|
||||
|
||||
const QueuedPatch queuedPatch{patch.name, patch.repository, patch.version, patchPath, patch.hashes, patch.hashBlockSize, patch.length, isBoot()};
|
||||
const QueuedPatch queuedPatch{.name = patch.name,
|
||||
.repository = patch.repository,
|
||||
.version = patch.version,
|
||||
.path = patchPath,
|
||||
.hashes = patch.hashes,
|
||||
.hashBlockSize = patch.hashBlockSize,
|
||||
.length = patch.length,
|
||||
.isBoot = isBoot()};
|
||||
|
||||
qDebug(ASTRA_PATCHER) << "Adding a queued patch:";
|
||||
qDebug(ASTRA_PATCHER) << "- Name:" << patch.name;
|
||||
|
@ -96,6 +103,7 @@ QCoro::Task<bool> Patcher::patch(const PatchList &patchList)
|
|||
auto patchReply = m_launcher.mgr()->get(patchRequest);
|
||||
|
||||
connect(patchReply, &QNetworkReply::downloadProgress, this, [this, ourIndex, queuedPatch](int received, int total) {
|
||||
Q_UNUSED(total)
|
||||
updateDownloadProgress(ourIndex, received);
|
||||
});
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
#include "patchlist.h"
|
||||
#include "astra_patcher_log.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
PatchList::PatchList(const QString &patchList)
|
||||
{
|
||||
const QStringList parts = patchList.split(QStringLiteral("\r\n"));
|
||||
|
|
|
@ -107,7 +107,7 @@ void ProfileManager::load()
|
|||
|
||||
int ProfileManager::rowCount(const QModelIndex &index) const
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
Q_UNUSED(index)
|
||||
return static_cast<int>(m_profiles.size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue