renamed *Manager files

This commit is contained in:
fourtf
2018-06-28 19:46:45 +02:00
parent 5604ae6a67
commit 2df142bd50
80 changed files with 125 additions and 125 deletions
+39
View File
@@ -0,0 +1,39 @@
#include "singletons/Logging.hpp"
#include "Application.hpp"
#include "debug/Log.hpp"
#include "singletons/Paths.hpp"
#include "singletons/Settings.hpp"
#include <QDir>
#include <QStandardPaths>
#include <unordered_map>
namespace chatterino {
void LoggingManager::initialize()
{
this->pathManager = getApp()->paths;
}
void LoggingManager::addMessage(const QString &channelName, MessagePtr message)
{
auto app = getApp();
if (!app->settings->enableLogging) {
return;
}
auto it = this->loggingChannels.find(channelName);
if (it == this->loggingChannels.end()) {
auto channel = new LoggingChannel(channelName);
channel->addMessage(message);
this->loggingChannels.emplace(channelName,
std::unique_ptr<LoggingChannel>(std::move(channel)));
} else {
it->second->addMessage(message);
}
}
} // namespace chatterino