mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
removed compat class for SignalVector
This commit is contained in:
parent
7e49371ba1
commit
89389608e9
7 changed files with 7 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -27,8 +27,7 @@ public:
|
|||
TwitchAccountManager twitch;
|
||||
|
||||
private:
|
||||
SortedSignalVector<std::shared_ptr<Account>, SharedPtrElementLess<Account>>
|
||||
accounts_;
|
||||
SignalVector<std::shared_ptr<Account>> accounts_;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
namespace chatterino {
|
||||
|
||||
TaggedUsersController::TaggedUsersController()
|
||||
: users(std::less<TaggedUser>{})
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue