quickshell/src/window/init.cpp
outfoxxed 2996e40ff9
core/plugin: rename QuickshellPlugin to QsEnginePlugin
Fixes conflict with the autogenerated qml plugin of the same name.
2024-11-22 18:59:15 -08:00

25 lines
532 B
C++

#include <qqml.h>
#include <qstring.h>
#include "../core/plugin.hpp"
namespace {
class WindowPlugin: public QsEnginePlugin {
// _Window has to be registered before wayland or x11 modules, otherwise module overlays
// will apply in the wrong order.
QString name() override { return "window"; }
void registerTypes() override {
qmlRegisterModuleImport(
"Quickshell",
QQmlModuleImportModuleAny,
"Quickshell._Window",
QQmlModuleImportLatest
);
}
};
QS_REGISTER_PLUGIN(WindowPlugin);
} // namespace