quickshell/src/core/rootwrapper.hpp
outfoxxed bccf43f1f7
fix: root is now destroyed on exit
This should fix a whole lot of things never being able to run cleanup.
2024-03-03 06:26:41 -08:00

31 lines
566 B
C++

#pragma once
#include <qobject.h>
#include <qqmlengine.h>
#include <qtclasshelpermacros.h>
#include <qtmetamacros.h>
#include <qurl.h>
#include "shell.hpp"
#include "watcher.hpp"
class RootWrapper: public QObject {
Q_OBJECT;
public:
explicit RootWrapper(QString rootPath);
~RootWrapper() override;
Q_DISABLE_COPY_MOVE(RootWrapper);
void reloadGraph(bool hard);
private slots:
void onConfigChanged();
void onWatchedFilesChanged();
private:
QString rootPath;
QQmlEngine engine;
ShellRoot* root = nullptr;
FiletreeWatcher* configWatcher = nullptr;
};