Make runnable again (#40)

* Compile before push DansGame

* Initialize them when they are needed, not on startup. This is THREAD-SAFE since C++11

* Changed user to account
This commit is contained in:
Bur0k 2017-04-19 15:25:05 +02:00 committed by fourtf
parent 38062cb3c5
commit b6d0776917
6 changed files with 4 additions and 8 deletions

View file

@ -2,8 +2,6 @@
namespace chatterino { namespace chatterino {
AccountManager AccountManager::instance;
AccountManager::AccountManager() AccountManager::AccountManager()
: _twitchAnon("justinfan64537", "", "") : _twitchAnon("justinfan64537", "", "")
, _twitchUsers() , _twitchUsers()

View file

@ -13,6 +13,7 @@ class AccountManager
public: public:
static AccountManager &getInstance() static AccountManager &getInstance()
{ {
static AccountManager instance;
return instance; return instance;
} }
@ -23,7 +24,6 @@ public:
void addTwitchUser(const twitch::TwitchUser &user); void addTwitchUser(const twitch::TwitchUser &user);
private: private:
static AccountManager instance;
AccountManager(); AccountManager();

View file

@ -9,8 +9,6 @@ using namespace chatterino::messages;
namespace chatterino { namespace chatterino {
SettingsManager SettingsManager::instance;
SettingsManager::SettingsManager() SettingsManager::SettingsManager()
: _settings(Path::getAppdataPath() + "settings.ini", QSettings::IniFormat) : _settings(Path::getAppdataPath() + "settings.ini", QSettings::IniFormat)
, _wordTypeMask(Word::Default) , _wordTypeMask(Word::Default)

View file

@ -72,11 +72,11 @@ private:
public: public:
static SettingsManager &getInstance() static SettingsManager &getInstance()
{ {
static SettingsManager instance;
return instance; return instance;
} }
private: private:
static SettingsManager instance;
}; };
} // namespace chatterino } // namespace chatterino

View file

@ -1,6 +1,6 @@
#include "widgets/accountpopup.h" #include "widgets/accountpopup.h"
#include "channel.h" #include "channel.h"
#include "ui_userpopup.h" #include "ui_accountpopupform.h"
#include <QDebug> #include <QDebug>

View file

@ -4,7 +4,7 @@
#include "messages/message.h" #include "messages/message.h"
#include "messages/wordpart.h" #include "messages/wordpart.h"
#include "settingsmanager.h" #include "settingsmanager.h"
#include "ui_userpopup.h" #include "ui_accountpopupform.h"
#include "widgets/chatwidget.h" #include "widgets/chatwidget.h"
#include <math.h> #include <math.h>