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,6 +1,7 @@
|
|||
#include "floatingwindow.hpp"
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qqmlengine.h>
|
||||
#include <qqmllist.h>
|
||||
#include <qquickitem.h>
|
||||
#include <qtypes.h>
|
||||
|
@ -37,6 +38,8 @@ FloatingWindowInterface::FloatingWindowInterface(QObject* parent)
|
|||
}
|
||||
|
||||
void FloatingWindowInterface::onReload(QObject* oldInstance) {
|
||||
QQmlEngine::setContextForObject(this->window, QQmlEngine::contextForObject(this));
|
||||
|
||||
auto* old = qobject_cast<FloatingWindowInterface*>(oldInstance);
|
||||
this->window->onReload(old != nullptr ? old->window : nullptr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue