core: support root: and root:/ paths for the config root

This works everywhere urls are accepted and rewrites them from the
config root as a qsintercept url.
This commit is contained in:
outfoxxed 2024-05-29 15:07:10 -07:00
parent 33fac67798
commit 0519acf1d6
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
7 changed files with 48 additions and 8 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include <qcontainerfwd.h>
#include <qdir.h>
#include <qfilesystemwatcher.h>
#include <qobject.h>
#include <qpair.h>
@ -19,7 +20,7 @@ class EngineGeneration: public QObject {
Q_OBJECT;
public:
explicit EngineGeneration(QmlScanner scanner);
explicit EngineGeneration(const QDir& rootPath, QmlScanner scanner);
~EngineGeneration() override;
Q_DISABLE_COPY_MOVE(EngineGeneration);
@ -33,6 +34,7 @@ public:
static EngineGeneration* findObjectGeneration(QObject* object);
RootWrapper* wrapper = nullptr;
QDir rootPath;
QmlScanner scanner;
QsUrlInterceptor urlInterceptor;
QsInterceptNetworkAccessManagerFactory interceptNetFactory;