forked from quickshell/quickshell
core: synthesized qmldir files and new qml scanning strategy
This commit is contained in:
parent
1687ff3614
commit
ffbdac9977
14 changed files with 354 additions and 90 deletions
|
@ -1,23 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include <qfilesystemwatcher.h>
|
||||
#include <qobject.h>
|
||||
#include <qtclasshelpermacros.h>
|
||||
|
||||
#include "qsintercept.hpp"
|
||||
#include "scan.hpp"
|
||||
#include "shell.hpp"
|
||||
#include "singleton.hpp"
|
||||
|
||||
class EngineGeneration {
|
||||
class EngineGeneration: public QObject {
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
explicit EngineGeneration();
|
||||
~EngineGeneration();
|
||||
explicit EngineGeneration(QmlScanner scanner);
|
||||
~EngineGeneration() override;
|
||||
Q_DISABLE_COPY_MOVE(EngineGeneration);
|
||||
|
||||
// assumes root has been initialized, consumes old generation
|
||||
void onReload(EngineGeneration* old);
|
||||
void setWatchingFiles(bool watching);
|
||||
|
||||
static EngineGeneration* findObjectGeneration(QObject* object);
|
||||
|
||||
QmlScanner scanner;
|
||||
QsInterceptNetworkAccessManagerFactory interceptNetFactory;
|
||||
QQmlEngine engine;
|
||||
ShellRoot* root = nullptr;
|
||||
SingletonRegistry singletonRegistry;
|
||||
QFileSystemWatcher* watcher = nullptr;
|
||||
|
||||
signals:
|
||||
void filesChanged();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue