diff --git a/chatterino.pro b/chatterino.pro index 4f64107f2..e73ae9001 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -116,7 +116,7 @@ SOURCES += \ src/singletons/commandmanager.cpp \ src/singletons/emotemanager.cpp \ src/singletons/fontmanager.cpp \ - src/singletons/helper/completionmodel.cpp \ + src/util/completionmodel.cpp \ src/singletons/helper/loggingchannel.cpp \ src/singletons/helper/moderationaction.cpp \ src/singletons/loggingmanager.cpp \ @@ -210,7 +210,7 @@ HEADERS += \ src/singletons/emotemanager.hpp \ src/singletons/fontmanager.hpp \ src/singletons/helper/chatterinosetting.hpp \ - src/singletons/helper/completionmodel.hpp \ + src/util/completionmodel.hpp \ src/singletons/helper/loggingchannel.hpp \ src/singletons/helper/moderationaction.hpp \ src/singletons/loggingmanager.hpp \ diff --git a/src/channel.hpp b/src/channel.hpp index dd520f734..bd653aee6 100644 --- a/src/channel.hpp +++ b/src/channel.hpp @@ -3,7 +3,7 @@ #include "messages/image.hpp" #include "messages/limitedqueue.hpp" #include "messages/message.hpp" -#include "singletons/helper/completionmodel.hpp" +#include "util/completionmodel.hpp" #include "util/concurrentmap.hpp" #include @@ -65,7 +65,7 @@ public: static std::shared_ptr getEmpty(); - singletons::CompletionModel completionModel; + CompletionModel completionModel; protected: virtual void onConnected(); diff --git a/src/singletons/helper/completionmodel.cpp b/src/util/completionmodel.cpp similarity index 94% rename from src/singletons/helper/completionmodel.cpp rename to src/util/completionmodel.cpp index 02c3be467..e94cd3a44 100644 --- a/src/singletons/helper/completionmodel.cpp +++ b/src/util/completionmodel.cpp @@ -1,4 +1,4 @@ -#include "completionmodel.hpp" +#include "util/completionmodel.hpp" #include "common.hpp" #include "debug/log.hpp" @@ -8,7 +8,6 @@ #include namespace chatterino { -namespace singletons { CompletionModel::CompletionModel(const QString &_channelName) : channelName(_channelName) @@ -95,5 +94,4 @@ void CompletionModel::addUser(const QString &str) this->emotes.insert(this->createUser(str + " ")); } -} // namespace singletons } // namespace chatterino diff --git a/src/singletons/helper/completionmodel.hpp b/src/util/completionmodel.hpp similarity index 94% rename from src/singletons/helper/completionmodel.hpp rename to src/util/completionmodel.hpp index 6c7bef633..0c996a195 100644 --- a/src/singletons/helper/completionmodel.hpp +++ b/src/util/completionmodel.hpp @@ -9,7 +9,6 @@ #include namespace chatterino { -namespace singletons { class CompletionModel : public QAbstractListModel { @@ -89,5 +88,4 @@ private: QString channelName; }; -} // namespace singletons } // namespace chatterino diff --git a/src/widgets/helper/resizingtextedit.cpp b/src/widgets/helper/resizingtextedit.cpp index 89a55fdcb..130db7853 100644 --- a/src/widgets/helper/resizingtextedit.cpp +++ b/src/widgets/helper/resizingtextedit.cpp @@ -1,6 +1,6 @@ #include "widgets/helper/resizingtextedit.hpp" #include "common.hpp" -#include "singletons/helper/completionmodel.hpp" +#include "util/completionmodel.hpp" ResizingTextEdit::ResizingTextEdit() { @@ -97,7 +97,7 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event) } auto *completionModel = - static_cast(this->completer->model()); + static_cast(this->completer->model()); if (!this->completionInProgress) { // First type pressing tab after modifying a message, we refresh our completion model