removed compat functions in SignalVector
This commit is contained in:
@@ -9,8 +9,7 @@ namespace chatterino {
|
||||
AccountController::AccountController()
|
||||
{
|
||||
this->twitch.accounts.itemInserted.connect([this](const auto &args) {
|
||||
this->accounts_.insertItem(
|
||||
std::dynamic_pointer_cast<Account>(args.item));
|
||||
this->accounts_.insert(std::dynamic_pointer_cast<Account>(args.item));
|
||||
});
|
||||
|
||||
this->twitch.accounts.itemRemoved.connect([this](const auto &args) {
|
||||
@@ -20,7 +19,7 @@ AccountController::AccountController()
|
||||
auto it = std::find(accs.begin(), accs.end(), args.item);
|
||||
assert(it != accs.end());
|
||||
|
||||
this->accounts_.removeItem(it - accs.begin(), this);
|
||||
this->accounts_.removeAt(it - accs.begin(), this);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ void CommandController::initialize(Settings &, Paths &paths)
|
||||
// of commands)
|
||||
for (const auto &command : this->commandsSetting_->getValue())
|
||||
{
|
||||
this->items_.appendItem(command);
|
||||
this->items_.append(command);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ void IgnoreController::initialize(Settings &, Paths &)
|
||||
|
||||
for (const IgnorePhrase &phrase : this->ignoresSetting_.getValue())
|
||||
{
|
||||
this->phrases.appendItem(phrase);
|
||||
this->phrases.append(phrase);
|
||||
}
|
||||
|
||||
this->phrases.delayedItemsChanged.connect([this] { //
|
||||
|
||||
@@ -23,7 +23,7 @@ void ModerationActions::initialize(Settings &settings, Paths &paths)
|
||||
|
||||
for (auto &val : this->setting_->getValue())
|
||||
{
|
||||
this->items.insertItem(val);
|
||||
this->items.insert(val);
|
||||
}
|
||||
|
||||
this->items.delayedItemsChanged.connect([this] { //
|
||||
|
||||
@@ -26,12 +26,11 @@ void NotificationController::initialize(Settings &settings, Paths &paths)
|
||||
this->initialized_ = true;
|
||||
for (const QString &channelName : this->twitchSetting_.getValue())
|
||||
{
|
||||
this->channelMap[Platform::Twitch].appendItem(channelName);
|
||||
this->channelMap[Platform::Twitch].append(channelName);
|
||||
}
|
||||
|
||||
this->channelMap[Platform::Twitch].delayedItemsChanged.connect([this] { //
|
||||
this->twitchSetting_.setValue(
|
||||
this->channelMap[Platform::Twitch].raw());
|
||||
this->twitchSetting_.setValue(this->channelMap[Platform::Twitch].raw());
|
||||
});
|
||||
/*
|
||||
for (const QString &channelName : this->mixerSetting_.getValue()) {
|
||||
@@ -81,18 +80,18 @@ bool NotificationController::isChannelNotified(const QString &channelName,
|
||||
void NotificationController::addChannelNotification(const QString &channelName,
|
||||
Platform p)
|
||||
{
|
||||
channelMap[p].appendItem(channelName);
|
||||
channelMap[p].append(channelName);
|
||||
}
|
||||
|
||||
void NotificationController::removeChannelNotification(
|
||||
const QString &channelName, Platform p)
|
||||
{
|
||||
for (std::vector<int>::size_type i = 0;
|
||||
i != channelMap[p].raw().size(); i++)
|
||||
for (std::vector<int>::size_type i = 0; i != channelMap[p].raw().size();
|
||||
i++)
|
||||
{
|
||||
if (channelMap[p].raw()[i].toLower() == channelName.toLower())
|
||||
{
|
||||
channelMap[p].removeItem(i);
|
||||
channelMap[p].removeAt(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ void PingController::initialize(Settings &settings, Paths &paths)
|
||||
this->initialized_ = true;
|
||||
for (const QString &channelName : this->pingSetting_.getValue())
|
||||
{
|
||||
this->channelVector.appendItem(channelName);
|
||||
this->channelVector.append(channelName);
|
||||
}
|
||||
|
||||
this->channelVector.delayedItemsChanged.connect([this] { //
|
||||
@@ -37,7 +37,7 @@ bool PingController::isMuted(const QString &channelName)
|
||||
|
||||
void PingController::muteChannel(const QString &channelName)
|
||||
{
|
||||
channelVector.appendItem(channelName);
|
||||
channelVector.append(channelName);
|
||||
}
|
||||
|
||||
void PingController::unmuteChannel(const QString &channelName)
|
||||
@@ -47,7 +47,7 @@ void PingController::unmuteChannel(const QString &channelName)
|
||||
{
|
||||
if (channelVector.raw()[i].toLower() == channelName.toLower())
|
||||
{
|
||||
channelVector.removeItem(i);
|
||||
channelVector.removeAt(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user