1
Fork 0
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:
Joshua Goins 2023-12-17 11:07:34 -05:00
parent c8258421d5
commit 9676fcd4ef
7 changed files with 11 additions and 11 deletions

View file

@ -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;
}; };

View file

@ -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;

View file

@ -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;
}; };

View file

@ -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;

View file

@ -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;
}; };

View file

@ -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;
} }

View file

@ -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;
} }