put singletons into their namespace
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
static void _registerSetting(std::weak_ptr<pajlada::Settings::ISettingData> setting);
|
||||
|
||||
template <typename Type>
|
||||
@@ -65,3 +66,4 @@ public:
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "singletons/emotemanager.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
CompletionModel::CompletionModel(const QString &_channelName)
|
||||
: channelName(_channelName)
|
||||
{
|
||||
@@ -16,7 +17,7 @@ void CompletionModel::refresh()
|
||||
{
|
||||
// debug::Log("[CompletionModel:{}] Refreshing...]", this->channelName);
|
||||
|
||||
auto &emoteManager = EmoteManager::getInstance();
|
||||
auto &emoteManager = singletons::EmoteManager::getInstance();
|
||||
this->emotes.clear();
|
||||
|
||||
// User-specific: Twitch Emotes
|
||||
@@ -60,7 +61,7 @@ void CompletionModel::refresh()
|
||||
}
|
||||
|
||||
// Channel-specific: Usernames
|
||||
auto c = ChannelManager::getInstance().getTwitchChannel(this->channelName);
|
||||
auto c = singletons::ChannelManager::getInstance().getTwitchChannel(this->channelName);
|
||||
auto usernames = c->getUsernamesForCompletions();
|
||||
for (const auto &name : usernames) {
|
||||
assert(!name.displayName.isEmpty());
|
||||
@@ -86,3 +87,4 @@ void CompletionModel::addString(const QString &str)
|
||||
this->emotes.push_back(str + " ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
class CompletionModel : public QAbstractListModel
|
||||
{
|
||||
public:
|
||||
@@ -39,3 +40,4 @@ private:
|
||||
QString channelName;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user