mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 20:47:45 +00:00
Replace QVector with QList
This commit is contained in:
parent
c8258421d5
commit
9676fcd4ef
7 changed files with 11 additions and 11 deletions
|
@ -43,7 +43,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void insertAccount(Account *account);
|
void insertAccount(Account *account);
|
||||||
|
|
||||||
QVector<Account *> m_accounts;
|
QList<Account *> m_accounts;
|
||||||
|
|
||||||
LauncherCore &m_launcher;
|
LauncherCore &m_launcher;
|
||||||
};
|
};
|
|
@ -57,7 +57,7 @@ private:
|
||||||
|
|
||||||
void processPatch(const QueuedPatch &patch);
|
void processPatch(const QueuedPatch &patch);
|
||||||
|
|
||||||
QVector<QueuedPatch> m_patchQueue;
|
QList<QueuedPatch> m_patchQueue;
|
||||||
|
|
||||||
QDir m_patchesDir;
|
QDir m_patchesDir;
|
||||||
QString m_baseDirectory;
|
QString m_baseDirectory;
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QVector>
|
|
||||||
|
|
||||||
class Patch
|
class Patch
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QString name, url, repository, version;
|
QString name, url, repository, version;
|
||||||
QVector<QString> hashes;
|
QList<QString> hashes;
|
||||||
long hashBlockSize = 0;
|
long hashBlockSize = 0;
|
||||||
long length = 0;
|
long length = 0;
|
||||||
};
|
};
|
||||||
|
@ -20,10 +20,10 @@ class PatchList
|
||||||
public:
|
public:
|
||||||
explicit PatchList(const QString &patchList);
|
explicit PatchList(const QString &patchList);
|
||||||
|
|
||||||
[[nodiscard]] QVector<Patch> patches() const;
|
[[nodiscard]] QList<Patch> patches() const;
|
||||||
|
|
||||||
[[nodiscard]] bool isEmpty() const;
|
[[nodiscard]] bool isEmpty() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QVector<Patch> m_patches;
|
QList<Patch> m_patches;
|
||||||
};
|
};
|
|
@ -184,7 +184,7 @@ private:
|
||||||
ProfileConfig *m_config = nullptr;
|
ProfileConfig *m_config = nullptr;
|
||||||
Account *m_account = nullptr;
|
Account *m_account = nullptr;
|
||||||
|
|
||||||
QVector<QString> m_expansionNames;
|
QList<QString> m_expansionNames;
|
||||||
|
|
||||||
BootData *m_bootData = nullptr;
|
BootData *m_bootData = nullptr;
|
||||||
GameData *m_gameData = nullptr;
|
GameData *m_gameData = nullptr;
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
Q_INVOKABLE Profile *addProfile();
|
Q_INVOKABLE Profile *addProfile();
|
||||||
Q_INVOKABLE void deleteProfile(Profile *profile);
|
Q_INVOKABLE void deleteProfile(Profile *profile);
|
||||||
|
|
||||||
[[nodiscard]] QVector<Profile *> profiles() const;
|
[[nodiscard]] QList<Profile *> profiles() const;
|
||||||
[[nodiscard]] Q_INVOKABLE int numProfiles() const;
|
[[nodiscard]] Q_INVOKABLE int numProfiles() const;
|
||||||
|
|
||||||
Q_INVOKABLE bool canDelete(Profile *account) const;
|
Q_INVOKABLE bool canDelete(Profile *account) const;
|
||||||
|
@ -49,7 +49,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void insertProfile(Profile *profile);
|
void insertProfile(Profile *profile);
|
||||||
|
|
||||||
QVector<Profile *> m_profiles;
|
QList<Profile *> m_profiles;
|
||||||
|
|
||||||
LauncherCore &m_launcher;
|
LauncherCore &m_launcher;
|
||||||
};
|
};
|
|
@ -34,7 +34,7 @@ PatchList::PatchList(const QString &patchList)
|
||||||
qDebug(ASTRA_PATCHER) << "Finished parsing patch list. # of patches:" << m_patches.size();
|
qDebug(ASTRA_PATCHER) << "Finished parsing patch list. # of patches:" << m_patches.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<Patch> PatchList::patches() const
|
QList<Patch> PatchList::patches() const
|
||||||
{
|
{
|
||||||
return m_patches;
|
return m_patches;
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ void ProfileManager::insertProfile(Profile *profile)
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<Profile *> ProfileManager::profiles() const
|
QList<Profile *> ProfileManager::profiles() const
|
||||||
{
|
{
|
||||||
return m_profiles;
|
return m_profiles;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue