mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
changed initialization order of account
This commit is contained in:
parent
8b618899f7
commit
99bb415ad5
1 changed files with 7 additions and 5 deletions
|
@ -10,7 +10,7 @@
|
||||||
#include "ircconnection.h"
|
#include "ircconnection.h"
|
||||||
#include "qnetworkrequest.h"
|
#include "qnetworkrequest.h"
|
||||||
|
|
||||||
Account *IrcManager::account = const_cast<Account *>(Account::anon());
|
Account *IrcManager::account = nullptr;
|
||||||
IrcConnection *IrcManager::connection = NULL;
|
IrcConnection *IrcManager::connection = NULL;
|
||||||
QMutex IrcManager::connectionMutex;
|
QMutex IrcManager::connectionMutex;
|
||||||
long IrcManager::connectionIteration = 0;
|
long IrcManager::connectionIteration = 0;
|
||||||
|
@ -35,6 +35,8 @@ IrcManager::connect()
|
||||||
void
|
void
|
||||||
IrcManager::beginConnecting()
|
IrcManager::beginConnecting()
|
||||||
{
|
{
|
||||||
|
IrcManager::account = const_cast<Account *>(Account::anon());
|
||||||
|
|
||||||
int iteration = ++connectionIteration;
|
int iteration = ++connectionIteration;
|
||||||
|
|
||||||
auto c = new IrcConnection();
|
auto c = new IrcConnection();
|
||||||
|
@ -207,8 +209,8 @@ IrcManager::tryAddIgnoredUser(QString const &username, QString &errorMessage)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
errorMessage = "Error while ignoring user \"" + username +
|
errorMessage = "Error while ignoring user \"" + username + "\": " +
|
||||||
"\": " + reply->errorString();
|
reply->errorString();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,8 +243,8 @@ IrcManager::tryRemoveIgnoredUser(QString const &username, QString &errorMessage)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
errorMessage = "Error while unignoring user \"" + username +
|
errorMessage = "Error while unignoring user \"" + username + "\": " +
|
||||||
"\": " + reply->errorString();
|
reply->errorString();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue