changed AccountManager to AccountController

This commit is contained in:
fourtf
2018-05-26 20:25:00 +02:00
parent b016f0fb88
commit 8c9be20f9b
41 changed files with 364 additions and 118 deletions
+8 -9
View File
@@ -1,10 +1,13 @@
#include "account.hpp"
#include <tuple>
namespace chatterino {
namespace controllers {
namespace accounts {
Account::Account(const QString &category)
Account::Account(const QString &_category)
: category(_category)
{
}
@@ -15,14 +18,10 @@ const QString &Account::getCategory() const
bool Account::operator<(const Account &other) const
{
if (this->category < other.category) {
return true;
} else if (this->category == other.category) {
if (this->toString() < other.toString()) {
return true;
}
}
return false;
QString a = this->toString();
QString b = other.toString();
return std::tie(this->category, a) < std::tie(other.category, b);
}
} // namespace accounts