refactor: remove coretool from path.h

This commit is contained in:
sithlord48 2025-03-13 22:52:33 -04:00 committed by Nick Bolton
parent 6990477504
commit fe0ddf85e4

View file

@ -6,12 +6,9 @@
#pragma once #pragma once
#include "common/constants.h" #include "common/Settings.h"
#include "core/CoreTool.h"
#include <QDir> #include <QDir>
#include <QStandardPaths>
#include <QString>
namespace deskflow::gui::paths { namespace deskflow::gui::paths {
@ -20,7 +17,7 @@ namespace deskflow::gui::paths {
*/ */
inline QDir configDir(const bool persist = false) inline QDir configDir(const bool persist = false)
{ {
const QDir configDir(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); const QDir configDir(Settings::settingsPath());
// HACK: since we have the org name set to the app name, the config dir is // HACK: since we have the org name set to the app name, the config dir is
// confusing. make this simple by using the org dir instead. // confusing. make this simple by using the org dir instead.
@ -42,8 +39,7 @@ inline QDir configDir(const bool persist = false)
*/ */
inline QDir coreProfileDir() inline QDir coreProfileDir()
{ {
CoreTool coreTool; return QDir(Settings::settingsPath());
return QDir(coreTool.getProfileDir());
} }
} // namespace deskflow::gui::paths } // namespace deskflow::gui::paths