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
|
// 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>
|
template <typename T, typename Compare>
|
||||||
class SortedSignalVector : public SignalVector<T>
|
class SortedSignalVector : public SignalVector<T>
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,11 +25,11 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void initialize(BaseSignalVector<TVectorItem> *vec)
|
void initialize(SignalVector<TVectorItem> *vec)
|
||||||
{
|
{
|
||||||
this->vector_ = vec;
|
this->vector_ = vec;
|
||||||
|
|
||||||
auto insert = [this](const SignalVectorItemArgs<TVectorItem> &args) {
|
auto insert = [this](const SignalVectorItemEvent<TVectorItem> &args) {
|
||||||
if (args.caller == this)
|
if (args.caller == this)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -54,7 +54,7 @@ public:
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (const TVectorItem &item : vec->raw())
|
for (const TVectorItem &item : vec->raw())
|
||||||
{
|
{
|
||||||
SignalVectorItemArgs<TVectorItem> args{item, i++, 0};
|
SignalVectorItemEvent<TVectorItem> args{item, i++, 0};
|
||||||
|
|
||||||
insert(args);
|
insert(args);
|
||||||
}
|
}
|
||||||
|
@ -89,8 +89,7 @@ public:
|
||||||
this->afterInit();
|
this->afterInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
SignalVectorModel<TVectorItem> *initialized(
|
SignalVectorModel<TVectorItem> *initialized(SignalVector<TVectorItem> *vec)
|
||||||
BaseSignalVector<TVectorItem> *vec)
|
|
||||||
{
|
{
|
||||||
this->initialize(vec);
|
this->initialize(vec);
|
||||||
return this;
|
return this;
|
||||||
|
@ -393,7 +392,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<QMap<int, QVariant>> headerData_;
|
std::vector<QMap<int, QVariant>> headerData_;
|
||||||
BaseSignalVector<TVectorItem> *vector_;
|
SignalVector<TVectorItem> *vector_;
|
||||||
std::vector<Row> rows_;
|
std::vector<Row> rows_;
|
||||||
|
|
||||||
int columnCount_;
|
int columnCount_;
|
||||||
|
|
|
@ -22,7 +22,7 @@ class CommandModel;
|
||||||
class CommandController final : public Singleton
|
class CommandController final : public Singleton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UnsortedSignalVector<Command> items_;
|
SignalVector<Command> items_;
|
||||||
|
|
||||||
QString execCommand(const QString &text, std::shared_ptr<Channel> channel,
|
QString execCommand(const QString &text, std::shared_ptr<Channel> channel,
|
||||||
bool dryRun);
|
bool dryRun);
|
||||||
|
|
|
@ -12,9 +12,9 @@ class HighlightController final : public Singleton
|
||||||
public:
|
public:
|
||||||
virtual void initialize(Settings &settings, Paths &paths) override;
|
virtual void initialize(Settings &settings, Paths &paths) override;
|
||||||
|
|
||||||
UnsortedSignalVector<HighlightPhrase> phrases;
|
SignalVector<HighlightPhrase> phrases;
|
||||||
UnsortedSignalVector<HighlightBlacklistUser> blacklistedUsers;
|
SignalVector<HighlightBlacklistUser> blacklistedUsers;
|
||||||
UnsortedSignalVector<HighlightPhrase> highlightedUsers;
|
SignalVector<HighlightPhrase> highlightedUsers;
|
||||||
|
|
||||||
bool isHighlightedUser(const QString &username);
|
bool isHighlightedUser(const QString &username);
|
||||||
bool blacklistContains(const QString &username);
|
bool blacklistContains(const QString &username);
|
||||||
|
|
|
@ -19,7 +19,7 @@ class IgnoreController final : public Singleton
|
||||||
public:
|
public:
|
||||||
virtual void initialize(Settings &settings, Paths &paths) override;
|
virtual void initialize(Settings &settings, Paths &paths) override;
|
||||||
|
|
||||||
UnsortedSignalVector<IgnorePhrase> phrases;
|
SignalVector<IgnorePhrase> phrases;
|
||||||
|
|
||||||
IgnoreModel *createModel(QObject *parent);
|
IgnoreModel *createModel(QObject *parent);
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
|
|
||||||
virtual void initialize(Settings &settings, Paths &paths) override;
|
virtual void initialize(Settings &settings, Paths &paths) override;
|
||||||
|
|
||||||
UnsortedSignalVector<ModerationAction> items;
|
SignalVector<ModerationAction> items;
|
||||||
|
|
||||||
ModerationActionModel *createModel(QObject *parent);
|
ModerationActionModel *createModel(QObject *parent);
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,9 @@ public:
|
||||||
|
|
||||||
void playSound();
|
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);
|
NotificationModel *createModel(QObject *parent, Platform p);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ public:
|
||||||
private:
|
private:
|
||||||
bool initialized_ = false;
|
bool initialized_ = false;
|
||||||
|
|
||||||
UnsortedSignalVector<QString> channelVector;
|
SignalVector<QString> channelVector;
|
||||||
|
|
||||||
ChatterinoSetting<std::vector<QString>> pingSetting_ = {"/pings/muted"};
|
ChatterinoSetting<std::vector<QString>> pingSetting_ = {"/pings/muted"};
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
static inline void *const noEraseCredentialCaller =
|
static inline void *const noEraseCredentialCaller =
|
||||||
reinterpret_cast<void *>(1);
|
reinterpret_cast<void *>(1);
|
||||||
|
|
||||||
UnsortedSignalVector<IrcServerData> connections;
|
SignalVector<IrcServerData> connections;
|
||||||
QAbstractTableModel *newConnectionModel(QObject *parent);
|
QAbstractTableModel *newConnectionModel(QObject *parent);
|
||||||
|
|
||||||
ChannelPtr getOrAddChannel(int serverId, QString name);
|
ChannelPtr getOrAddChannel(int serverId, QString name);
|
||||||
|
|
Loading…
Reference in a new issue