plugins/overview: Precompile qml code

This saves us qml parsing extra step.
This commit is contained in:
Vlad Zahorodnii 2023-06-20 17:54:19 +03:00
parent 16cc0f5ebb
commit acf1333bee
2 changed files with 12 additions and 3 deletions

View file

@ -16,6 +16,17 @@ kconfig_add_kcfg_files(overview_SOURCES
)
kwin_add_builtin_effect(overview ${overview_SOURCES})
qt6_add_qml_module(overview
NO_PLUGIN
URI overview
RESOURCE_PREFIX /
QML_FILES
qml/DesktopBar.qml
qml/DesktopView.qml
qml/main.qml
)
target_link_libraries(overview PRIVATE
kwineffects
@ -25,5 +36,3 @@ target_link_libraries(overview PRIVATE
Qt::Quick
)
install(DIRECTORY qml DESTINATION ${KDE_INSTALL_DATADIR}/kwin/effects/overview)

View file

@ -54,7 +54,7 @@ OverviewEffect::OverviewEffect()
initConfig<OverviewConfig>();
reconfigure(ReconfigureAll);
setSource(QUrl::fromLocalFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kwin/effects/overview/qml/main.qml"))));
setSource(QUrl(QStringLiteral("qrc:/overview/qml/main.qml")));
}
OverviewEffect::~OverviewEffect()