cleanup(plugin): remove dependency on unstable moc functions

This commit is contained in:
outfoxxed 2024-02-26 00:08:30 -08:00
parent 3bd587cfcc
commit c0faebc700
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 11 additions and 9 deletions

View file

@ -10,7 +10,17 @@ class WaylandPlugin: public QuickshellPlugin {
bool applies() override { return QGuiApplication::platformName() == "wayland"; }
void registerTypes() override {
qmlRegisterType<WaylandPanelInterface>("QuickShell", 1, 0, "PanelWindow");
qmlRegisterType<WaylandPanelInterface>("QuickShell._WaylandOverlay", 1, 0, "PanelWindow");
// If any types are defined inside a module using QML_ELEMENT then all QML_ELEMENT types
// will not be registered. This can be worked around with a module import which makes
// the QML_ELMENT module import the old register-type style module.
qmlRegisterModuleImport(
"QuickShell",
QQmlModuleImportModuleAny,
"QuickShell._WaylandOverlay",
QQmlModuleImportLatest
);
}
};