quickshell/src/core/incubator.hpp
outfoxxed 518977932d
core/lazyloader: add LazyLoader
Also fixes qml incubation in general, which was completely broken,
meaning the native qml Loader type should also work now.
2024-03-19 05:35:44 -07:00

30 lines
680 B
C++

#pragma once
#include <qloggingcategory.h>
#include <qobject.h>
#include <qqmlincubator.h>
#include <qtmetamacros.h>
Q_DECLARE_LOGGING_CATEGORY(logIncubator);
class QsQmlIncubator
: public QObject
, public QQmlIncubator {
Q_OBJECT;
public:
explicit QsQmlIncubator(QsQmlIncubator::IncubationMode mode, QObject* parent = nullptr)
: QObject(parent)
, QQmlIncubator(mode) {}
void statusChanged(QQmlIncubator::Status status) override;
signals:
void completed();
void failed();
};
class DelayedQmlIncubationController: public QQmlIncubationController {
// Do nothing.
// This ensures lazy loaders don't start blocking before onReload creates windows.
};