removed compat class for SignalVector

This commit is contained in:
fourtf 2020-02-23 19:49:45 +01:00
parent 7e49371ba1
commit 89389608e9
7 changed files with 7 additions and 18 deletions

View file

@ -171,15 +171,4 @@ private:
std::function<bool(const T &, const T &)> itemCompare_;
};
// compatability
template <typename T, typename Compare>
class SortedSignalVector : public SignalVector<T>
{
public:
SortedSignalVector()
: SignalVector<T>(Compare{})
{
}
};
} // namespace chatterino

View file

@ -7,6 +7,7 @@
namespace chatterino {
AccountController::AccountController()
: accounts_(SharedPtrElementLess<Account>{})
{
this->twitch.accounts.itemInserted.connect([this](const auto &args) {
this->accounts_.insert(std::dynamic_pointer_cast<Account>(args.item));

View file

@ -27,8 +27,7 @@ public:
TwitchAccountManager twitch;
private:
SortedSignalVector<std::shared_ptr<Account>, SharedPtrElementLess<Account>>
accounts_;
SignalVector<std::shared_ptr<Account>> accounts_;
};
} // namespace chatterino

View file

@ -5,6 +5,7 @@
namespace chatterino {
TaggedUsersController::TaggedUsersController()
: users(std::less<TaggedUser>{})
{
}

View file

@ -14,7 +14,7 @@ class TaggedUsersController final : public Singleton
public:
TaggedUsersController();
SortedSignalVector<TaggedUser, std::less<TaggedUser>> users;
SignalVector<TaggedUser> users;
TaggedUsersModel *createModel(QObject *parent = nullptr);
};

View file

@ -7,7 +7,8 @@
namespace chatterino {
TwitchAccountManager::TwitchAccountManager()
: anonymousUser_(new TwitchAccount(ANONYMOUS_USERNAME, "", "", ""))
: accounts(SharedPtrElementLess<TwitchAccount>{})
, anonymousUser_(new TwitchAccount(ANONYMOUS_USERNAME, "", "", ""))
{
this->currentUserChanged.connect([this] {
auto currentUser = this->getCurrent();

View file

@ -51,9 +51,7 @@ public:
pajlada::Signals::NoArgSignal currentUserChanged;
pajlada::Signals::NoArgSignal userListUpdated;
SortedSignalVector<std::shared_ptr<TwitchAccount>,
SharedPtrElementLess<TwitchAccount>>
accounts;
SignalVector<std::shared_ptr<TwitchAccount>> accounts;
private:
enum class AddUserResponse {