mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
removed compat aliases for SignalVector
This commit is contained in:
parent
843e2ad994
commit
e2c493f369
9 changed files with 15 additions and 28 deletions
|
@ -192,18 +192,6 @@ private:
|
|||
};
|
||||
|
||||
// compatability
|
||||
template <typename T>
|
||||
using SignalVectorItemArgs = SignalVectorItemEvent<T>;
|
||||
|
||||
template <typename T>
|
||||
using ReadOnlySignalVector = SignalVector<T>;
|
||||
|
||||
template <typename T>
|
||||
using BaseSignalVector = SignalVector<T>;
|
||||
|
||||
template <typename T>
|
||||
using UnsortedSignalVector = SignalVector<T>;
|
||||
|
||||
template <typename T, typename Compare>
|
||||
class SortedSignalVector : public SignalVector<T>
|
||||
{
|
||||
|
|
|
@ -25,11 +25,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void initialize(BaseSignalVector<TVectorItem> *vec)
|
||||
void initialize(SignalVector<TVectorItem> *vec)
|
||||
{
|
||||
this->vector_ = vec;
|
||||
|
||||
auto insert = [this](const SignalVectorItemArgs<TVectorItem> &args) {
|
||||
auto insert = [this](const SignalVectorItemEvent<TVectorItem> &args) {
|
||||
if (args.caller == this)
|
||||
{
|
||||
return;
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
int i = 0;
|
||||
for (const TVectorItem &item : vec->raw())
|
||||
{
|
||||
SignalVectorItemArgs<TVectorItem> args{item, i++, 0};
|
||||
SignalVectorItemEvent<TVectorItem> args{item, i++, 0};
|
||||
|
||||
insert(args);
|
||||
}
|
||||
|
@ -89,8 +89,7 @@ public:
|
|||
this->afterInit();
|
||||
}
|
||||
|
||||
SignalVectorModel<TVectorItem> *initialized(
|
||||
BaseSignalVector<TVectorItem> *vec)
|
||||
SignalVectorModel<TVectorItem> *initialized(SignalVector<TVectorItem> *vec)
|
||||
{
|
||||
this->initialize(vec);
|
||||
return this;
|
||||
|
@ -393,7 +392,7 @@ protected:
|
|||
|
||||
private:
|
||||
std::vector<QMap<int, QVariant>> headerData_;
|
||||
BaseSignalVector<TVectorItem> *vector_;
|
||||
SignalVector<TVectorItem> *vector_;
|
||||
std::vector<Row> rows_;
|
||||
|
||||
int columnCount_;
|
||||
|
|
|
@ -22,7 +22,7 @@ class CommandModel;
|
|||
class CommandController final : public Singleton
|
||||
{
|
||||
public:
|
||||
UnsortedSignalVector<Command> items_;
|
||||
SignalVector<Command> items_;
|
||||
|
||||
QString execCommand(const QString &text, std::shared_ptr<Channel> channel,
|
||||
bool dryRun);
|
||||
|
|
|
@ -12,9 +12,9 @@ class HighlightController final : public Singleton
|
|||
public:
|
||||
virtual void initialize(Settings &settings, Paths &paths) override;
|
||||
|
||||
UnsortedSignalVector<HighlightPhrase> phrases;
|
||||
UnsortedSignalVector<HighlightBlacklistUser> blacklistedUsers;
|
||||
UnsortedSignalVector<HighlightPhrase> highlightedUsers;
|
||||
SignalVector<HighlightPhrase> phrases;
|
||||
SignalVector<HighlightBlacklistUser> blacklistedUsers;
|
||||
SignalVector<HighlightPhrase> highlightedUsers;
|
||||
|
||||
bool isHighlightedUser(const QString &username);
|
||||
bool blacklistContains(const QString &username);
|
||||
|
|
|
@ -19,7 +19,7 @@ class IgnoreController final : public Singleton
|
|||
public:
|
||||
virtual void initialize(Settings &settings, Paths &paths) override;
|
||||
|
||||
UnsortedSignalVector<IgnorePhrase> phrases;
|
||||
SignalVector<IgnorePhrase> phrases;
|
||||
|
||||
IgnoreModel *createModel(QObject *parent);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
|
||||
virtual void initialize(Settings &settings, Paths &paths) override;
|
||||
|
||||
UnsortedSignalVector<ModerationAction> items;
|
||||
SignalVector<ModerationAction> items;
|
||||
|
||||
ModerationActionModel *createModel(QObject *parent);
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ public:
|
|||
|
||||
void playSound();
|
||||
|
||||
UnsortedSignalVector<QString> getVector(Platform p);
|
||||
SignalVector<QString> getVector(Platform p);
|
||||
|
||||
std::map<Platform, UnsortedSignalVector<QString>> channelMap;
|
||||
std::map<Platform, SignalVector<QString>> channelMap;
|
||||
|
||||
NotificationModel *createModel(QObject *parent, Platform p);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
private:
|
||||
bool initialized_ = false;
|
||||
|
||||
UnsortedSignalVector<QString> channelVector;
|
||||
SignalVector<QString> channelVector;
|
||||
|
||||
ChatterinoSetting<std::vector<QString>> pingSetting_ = {"/pings/muted"};
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
static inline void *const noEraseCredentialCaller =
|
||||
reinterpret_cast<void *>(1);
|
||||
|
||||
UnsortedSignalVector<IrcServerData> connections;
|
||||
SignalVector<IrcServerData> connections;
|
||||
QAbstractTableModel *newConnectionModel(QObject *parent);
|
||||
|
||||
ChannelPtr getOrAddChannel(int serverId, QString name);
|
||||
|
|
Loading…
Reference in a new issue