refactor: remove ReleaseChannel keeping track of its own indexes (#5366)

This commit is contained in:
RickyRister 2024-12-28 15:51:37 -08:00 committed by GitHub
parent c8d49b5bf9
commit 25d21a3da6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 13 additions and 18 deletions

View file

@ -21,11 +21,8 @@
#define GIT_SHORT_HASH_LEN 7
int ReleaseChannel::sharedIndex = 0;
ReleaseChannel::ReleaseChannel() : netMan(new QNetworkAccessManager(this)), response(nullptr), lastRelease(nullptr)
{
index = sharedIndex++;
}
ReleaseChannel::~ReleaseChannel()

View file

@ -82,9 +82,6 @@ public:
~ReleaseChannel() override;
protected:
// shared by all instances
static int sharedIndex;
int index;
QNetworkAccessManager *netMan;
QNetworkReply *response;
Release *lastRelease;
@ -94,10 +91,6 @@ protected:
virtual QString getReleaseChannelUrl() const = 0;
public:
int getIndex() const
{
return index;
}
Release *getLastRelease()
{
return lastRelease;