Normalize line endings in already existing files

This commit is contained in:
Leon Richardt
2019-09-08 22:27:57 +02:00
parent 8064f8a49e
commit b06eb9df83
157 changed files with 15175 additions and 15175 deletions
+58 -58
View File
@@ -1,58 +1,58 @@
#include "AccountController.hpp"
#include "controllers/accounts/Account.hpp"
#include "controllers/accounts/AccountModel.hpp"
#include "providers/twitch/TwitchAccount.hpp"
namespace chatterino {
AccountController::AccountController()
{
this->twitch.accounts.itemInserted.connect([this](const auto &args) {
this->accounts_.insertItem(
std::dynamic_pointer_cast<Account>(args.item));
});
this->twitch.accounts.itemRemoved.connect([this](const auto &args) {
if (args.caller != this)
{
auto &accs = this->twitch.accounts.getVector();
auto it = std::find(accs.begin(), accs.end(), args.item);
assert(it != accs.end());
this->accounts_.removeItem(it - accs.begin(), this);
}
});
this->accounts_.itemRemoved.connect([this](const auto &args) {
switch (args.item->getProviderId())
{
case ProviderId::Twitch:
{
if (args.caller != this)
{
auto accs = this->twitch.accounts.cloneVector();
auto it = std::find(accs.begin(), accs.end(), args.item);
assert(it != accs.end());
this->twitch.accounts.removeItem(it - accs.begin(), this);
}
}
break;
}
});
}
void AccountController::initialize(Settings &settings, Paths &paths)
{
this->twitch.load();
}
AccountModel *AccountController::createModel(QObject *parent)
{
AccountModel *model = new AccountModel(parent);
model->init(&this->accounts_);
return model;
}
} // namespace chatterino
#include "AccountController.hpp"
#include "controllers/accounts/Account.hpp"
#include "controllers/accounts/AccountModel.hpp"
#include "providers/twitch/TwitchAccount.hpp"
namespace chatterino {
AccountController::AccountController()
{
this->twitch.accounts.itemInserted.connect([this](const auto &args) {
this->accounts_.insertItem(
std::dynamic_pointer_cast<Account>(args.item));
});
this->twitch.accounts.itemRemoved.connect([this](const auto &args) {
if (args.caller != this)
{
auto &accs = this->twitch.accounts.getVector();
auto it = std::find(accs.begin(), accs.end(), args.item);
assert(it != accs.end());
this->accounts_.removeItem(it - accs.begin(), this);
}
});
this->accounts_.itemRemoved.connect([this](const auto &args) {
switch (args.item->getProviderId())
{
case ProviderId::Twitch:
{
if (args.caller != this)
{
auto accs = this->twitch.accounts.cloneVector();
auto it = std::find(accs.begin(), accs.end(), args.item);
assert(it != accs.end());
this->twitch.accounts.removeItem(it - accs.begin(), this);
}
}
break;
}
});
}
void AccountController::initialize(Settings &settings, Paths &paths)
{
this->twitch.load();
}
AccountModel *AccountController::createModel(QObject *parent)
{
AccountModel *model = new AccountModel(parent);
model->init(&this->accounts_);
return model;
}
} // namespace chatterino