From e2c493f3697854ffacfb6517417442cb817ffbf7 Mon Sep 17 00:00:00 2001 From: fourtf Date: Sun, 23 Feb 2020 19:37:02 +0100 Subject: [PATCH] removed compat aliases for SignalVector --- src/common/SignalVector.hpp | 12 ------------ src/common/SignalVectorModel.hpp | 11 +++++------ src/controllers/commands/CommandController.hpp | 2 +- src/controllers/highlights/HighlightController.hpp | 6 +++--- src/controllers/ignores/IgnoreController.hpp | 2 +- .../moderationactions/ModerationActions.hpp | 2 +- .../notifications/NotificationController.hpp | 4 ++-- src/controllers/pings/PingController.hpp | 2 +- src/providers/irc/Irc2.hpp | 2 +- 9 files changed, 15 insertions(+), 28 deletions(-) diff --git a/src/common/SignalVector.hpp b/src/common/SignalVector.hpp index bf8cbfc51..7181067fb 100644 --- a/src/common/SignalVector.hpp +++ b/src/common/SignalVector.hpp @@ -192,18 +192,6 @@ private: }; // compatability -template -using SignalVectorItemArgs = SignalVectorItemEvent; - -template -using ReadOnlySignalVector = SignalVector; - -template -using BaseSignalVector = SignalVector; - -template -using UnsortedSignalVector = SignalVector; - template class SortedSignalVector : public SignalVector { diff --git a/src/common/SignalVectorModel.hpp b/src/common/SignalVectorModel.hpp index 31129769b..a13bd97f0 100644 --- a/src/common/SignalVectorModel.hpp +++ b/src/common/SignalVectorModel.hpp @@ -25,11 +25,11 @@ public: } } - void initialize(BaseSignalVector *vec) + void initialize(SignalVector *vec) { this->vector_ = vec; - auto insert = [this](const SignalVectorItemArgs &args) { + auto insert = [this](const SignalVectorItemEvent &args) { if (args.caller == this) { return; @@ -54,7 +54,7 @@ public: int i = 0; for (const TVectorItem &item : vec->raw()) { - SignalVectorItemArgs args{item, i++, 0}; + SignalVectorItemEvent args{item, i++, 0}; insert(args); } @@ -89,8 +89,7 @@ public: this->afterInit(); } - SignalVectorModel *initialized( - BaseSignalVector *vec) + SignalVectorModel *initialized(SignalVector *vec) { this->initialize(vec); return this; @@ -393,7 +392,7 @@ protected: private: std::vector> headerData_; - BaseSignalVector *vector_; + SignalVector *vector_; std::vector rows_; int columnCount_; diff --git a/src/controllers/commands/CommandController.hpp b/src/controllers/commands/CommandController.hpp index 5435a60b9..ebc57d8cb 100644 --- a/src/controllers/commands/CommandController.hpp +++ b/src/controllers/commands/CommandController.hpp @@ -22,7 +22,7 @@ class CommandModel; class CommandController final : public Singleton { public: - UnsortedSignalVector items_; + SignalVector items_; QString execCommand(const QString &text, std::shared_ptr channel, bool dryRun); diff --git a/src/controllers/highlights/HighlightController.hpp b/src/controllers/highlights/HighlightController.hpp index 5f746c8bf..6741e1dbd 100644 --- a/src/controllers/highlights/HighlightController.hpp +++ b/src/controllers/highlights/HighlightController.hpp @@ -12,9 +12,9 @@ class HighlightController final : public Singleton public: virtual void initialize(Settings &settings, Paths &paths) override; - UnsortedSignalVector phrases; - UnsortedSignalVector blacklistedUsers; - UnsortedSignalVector highlightedUsers; + SignalVector phrases; + SignalVector blacklistedUsers; + SignalVector highlightedUsers; bool isHighlightedUser(const QString &username); bool blacklistContains(const QString &username); diff --git a/src/controllers/ignores/IgnoreController.hpp b/src/controllers/ignores/IgnoreController.hpp index 1279f4a88..e3330c33a 100644 --- a/src/controllers/ignores/IgnoreController.hpp +++ b/src/controllers/ignores/IgnoreController.hpp @@ -19,7 +19,7 @@ class IgnoreController final : public Singleton public: virtual void initialize(Settings &settings, Paths &paths) override; - UnsortedSignalVector phrases; + SignalVector phrases; IgnoreModel *createModel(QObject *parent); diff --git a/src/controllers/moderationactions/ModerationActions.hpp b/src/controllers/moderationactions/ModerationActions.hpp index e1bf1b802..7388019ba 100644 --- a/src/controllers/moderationactions/ModerationActions.hpp +++ b/src/controllers/moderationactions/ModerationActions.hpp @@ -20,7 +20,7 @@ public: virtual void initialize(Settings &settings, Paths &paths) override; - UnsortedSignalVector items; + SignalVector items; ModerationActionModel *createModel(QObject *parent); diff --git a/src/controllers/notifications/NotificationController.hpp b/src/controllers/notifications/NotificationController.hpp index 228348add..a9c048efe 100644 --- a/src/controllers/notifications/NotificationController.hpp +++ b/src/controllers/notifications/NotificationController.hpp @@ -30,9 +30,9 @@ public: void playSound(); - UnsortedSignalVector getVector(Platform p); + SignalVector getVector(Platform p); - std::map> channelMap; + std::map> channelMap; NotificationModel *createModel(QObject *parent, Platform p); diff --git a/src/controllers/pings/PingController.hpp b/src/controllers/pings/PingController.hpp index 80805e856..b0b5542b4 100644 --- a/src/controllers/pings/PingController.hpp +++ b/src/controllers/pings/PingController.hpp @@ -28,7 +28,7 @@ public: private: bool initialized_ = false; - UnsortedSignalVector channelVector; + SignalVector channelVector; ChatterinoSetting> pingSetting_ = {"/pings/muted"}; }; diff --git a/src/providers/irc/Irc2.hpp b/src/providers/irc/Irc2.hpp index de484924a..0cdc60c77 100644 --- a/src/providers/irc/Irc2.hpp +++ b/src/providers/irc/Irc2.hpp @@ -41,7 +41,7 @@ public: static inline void *const noEraseCredentialCaller = reinterpret_cast(1); - UnsortedSignalVector connections; + SignalVector connections; QAbstractTableModel *newConnectionModel(QObject *parent); ChannelPtr getOrAddChannel(int serverId, QString name);