forked from quickshell/quickshell
all: import module dependencies via qmldir
Improves compatibility with qml tooling.
This commit is contained in:
parent
0519acf1d6
commit
569c40494d
7 changed files with 23 additions and 66 deletions
|
|
@ -9,21 +9,14 @@ qt_add_qml_module(quickshell-hyprland-global-shortcuts
|
|||
VERSION 0.1
|
||||
)
|
||||
|
||||
add_library(quickshell-hyprland-global-shortcuts-init OBJECT init.cpp)
|
||||
|
||||
wl_proto(quickshell-hyprland-global-shortcuts
|
||||
hyprland-global-shortcuts-v1
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/hyprland-global-shortcuts-v1.xml"
|
||||
)
|
||||
|
||||
target_link_libraries(quickshell-hyprland-global-shortcuts PRIVATE ${QT_DEPS} wayland-client)
|
||||
target_link_libraries(quickshell-hyprland-global-shortcuts-init PRIVATE ${QT_DEPS})
|
||||
|
||||
qs_pch(quickshell-hyprland-global-shortcuts)
|
||||
qs_pch(quickshell-hyprland-global-shortcutsplugin)
|
||||
qs_pch(quickshell-hyprland-global-shortcuts-init)
|
||||
|
||||
target_link_libraries(quickshell PRIVATE
|
||||
quickshell-hyprland-global-shortcutsplugin
|
||||
quickshell-hyprland-global-shortcuts-init
|
||||
)
|
||||
target_link_libraries(quickshell PRIVATE quickshell-hyprland-global-shortcutsplugin)
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
#include <qqml.h>
|
||||
|
||||
#include "../../../core/plugin.hpp"
|
||||
|
||||
namespace {
|
||||
|
||||
class HyprlandFocusGrabPlugin: public QuickshellPlugin {
|
||||
void registerTypes() override {
|
||||
qmlRegisterModuleImport(
|
||||
"Quickshell.Hyprland",
|
||||
QQmlModuleImportModuleAny,
|
||||
"Quickshell.Hyprland._GlobalShortcuts",
|
||||
QQmlModuleImportLatest
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
QS_REGISTER_PLUGIN(HyprlandFocusGrabPlugin);
|
||||
|
||||
} // namespace
|
||||
Loading…
Add table
Add a link
Reference in a new issue