Remove unused appdatapath class

Reformat some code
This commit is contained in:
Rasmus Karlsson
2018-01-05 02:56:18 +01:00
parent fd8ddcff55
commit 334860dad2
7 changed files with 12 additions and 71 deletions
-4
View File
@@ -1,11 +1,7 @@
#include "singletons/settingsmanager.hpp"
#include "appdatapath.hpp"
#include "debug/log.hpp"
#include "singletons/pathmanager.hpp"
#include <QDir>
#include <QStandardPaths>
using namespace chatterino::messages;
namespace chatterino {
+4 -12
View File
@@ -1,14 +1,13 @@
#include "windowmanager.hpp"
#include "appdatapath.hpp"
#include "debug/log.hpp"
#include "singletons/fontmanager.hpp"
#include "singletons/thememanager.hpp"
#include <QDebug>
#include <QStandardPaths>
#include <boost/foreach.hpp>
namespace chatterino {
namespace singletons {
WindowManager &WindowManager::getInstance()
{
static WindowManager instance(ThemeManager::getInstance());
@@ -26,13 +25,6 @@ void WindowManager::initMainWindow()
this->selectedWindow = this->mainWindow = new widgets::Window("main", this->themeManager, true);
}
static const std::string &getSettingsPath()
{
static std::string path = (Path::getAppdataPath() + "uilayout.json").toStdString();
return path;
}
void WindowManager::layoutVisibleChatWidgets(Channel *channel)
{
this->layout(channel);
@@ -87,7 +79,7 @@ widgets::Window *WindowManager::windowAt(int index)
if (index < 0 || (size_t)index >= this->windows.size()) {
return nullptr;
}
qDebug() << "getting window at bad index" << index;
debug::Log("getting window at bad index {}", index);
return this->windows.at(index);
}
@@ -103,5 +95,5 @@ void WindowManager::save()
}
}
} // namespace singletons
} // namespace chatterino
}
+2 -2
View File
@@ -14,10 +14,10 @@ class WindowManager
public:
static WindowManager &getInstance();
void initMainWindow();
void layoutVisibleChatWidgets(Channel *channel = nullptr);
void repaintVisibleChatWidgets(Channel *channel = nullptr);
void repaintGifEmotes();
void initMainWindow();
// void updateAll();
widgets::Window &getMainWindow();
@@ -41,5 +41,5 @@ private:
widgets::Window *selectedWindow = nullptr;
};
} // namespace singletons
} // namespace chatterino
}