forked from quickshell/quickshell
core/lazyloader: add LazyLoader
Also fixes qml incubation in general, which was completely broken, meaning the native qml Loader type should also work now.
This commit is contained in:
parent
8d742e315e
commit
518977932d
11 changed files with 499 additions and 0 deletions
|
@ -1,9 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <qcontainerfwd.h>
|
||||
#include <qfilesystemwatcher.h>
|
||||
#include <qobject.h>
|
||||
#include <qqmlincubator.h>
|
||||
#include <qtclasshelpermacros.h>
|
||||
|
||||
#include "incubator.hpp"
|
||||
#include "qsintercept.hpp"
|
||||
#include "scan.hpp"
|
||||
#include "shell.hpp"
|
||||
|
@ -21,6 +24,8 @@ public:
|
|||
void onReload(EngineGeneration* old);
|
||||
void setWatchingFiles(bool watching);
|
||||
|
||||
void registerIncubationController(QQmlIncubationController* controller);
|
||||
|
||||
static EngineGeneration* findObjectGeneration(QObject* object);
|
||||
|
||||
QmlScanner scanner;
|
||||
|
@ -29,7 +34,15 @@ public:
|
|||
ShellRoot* root = nullptr;
|
||||
SingletonRegistry singletonRegistry;
|
||||
QFileSystemWatcher* watcher = nullptr;
|
||||
DelayedQmlIncubationController delayedIncubationController;
|
||||
|
||||
signals:
|
||||
void filesChanged();
|
||||
|
||||
private slots:
|
||||
void incubationControllerDestroyed();
|
||||
|
||||
private:
|
||||
void assignIncubationController();
|
||||
QVector<QQmlIncubationController*> incubationControllers;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue