2018-05-06 12:52:47 +02:00
|
|
|
#include "account.hpp"
|
|
|
|
|
2018-05-26 20:25:00 +02:00
|
|
|
#include <tuple>
|
|
|
|
|
2018-05-06 12:52:47 +02:00
|
|
|
namespace chatterino {
|
|
|
|
namespace controllers {
|
|
|
|
namespace accounts {
|
|
|
|
|
2018-05-26 20:25:00 +02:00
|
|
|
Account::Account(const QString &_category)
|
|
|
|
: category(_category)
|
2018-05-06 12:52:47 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const QString &Account::getCategory() const
|
|
|
|
{
|
|
|
|
return this->category;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Account::operator<(const Account &other) const
|
|
|
|
{
|
2018-05-26 20:25:00 +02:00
|
|
|
QString a = this->toString();
|
|
|
|
QString b = other.toString();
|
|
|
|
|
|
|
|
return std::tie(this->category, a) < std::tie(other.category, b);
|
2018-05-06 12:52:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace accounts
|
|
|
|
} // namespace controllers
|
|
|
|
} // namespace chatterino
|