core: synthesized qmldir files and new qml scanning strategy

This commit is contained in:
outfoxxed 2024-03-14 00:16:22 -07:00
parent 1687ff3614
commit ffbdac9977
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
14 changed files with 354 additions and 90 deletions

View file

@ -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();
};