removed compat aliases for SignalVector

This commit is contained in:
fourtf 2020-02-23 19:37:02 +01:00
parent 843e2ad994
commit e2c493f369
9 changed files with 15 additions and 28 deletions

View file

@ -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>
{

View file

@ -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_;

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -20,7 +20,7 @@ public:
virtual void initialize(Settings &settings, Paths &paths) override;
UnsortedSignalVector<ModerationAction> items;
SignalVector<ModerationAction> items;
ModerationActionModel *createModel(QObject *parent);

View file

@ -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);

View file

@ -28,7 +28,7 @@ public:
private:
bool initialized_ = false;
UnsortedSignalVector<QString> channelVector;
SignalVector<QString> channelVector;
ChatterinoSetting<std::vector<QString>> pingSetting_ = {"/pings/muted"};
};

View file

@ -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);