mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-17 11:37:10 +03:00
chore: generate config for core
This generates the config from XML representation to be used directly in the C++ code.
This commit is contained in:
parent
ce251e115a
commit
5fe5619727
@ -18,8 +18,12 @@ target_link_libraries(
|
||||
Qt5::Core
|
||||
Qt5::Quick
|
||||
Qt5::Qml
|
||||
KF5::ConfigCore
|
||||
KF5::ConfigGui
|
||||
)
|
||||
|
||||
kconfig_add_kcfg_files(bismuth_core GENERATE_MOC "config.kcfgc")
|
||||
|
||||
install(
|
||||
FILES "qmldir"
|
||||
DESTINATION "${KDE_INSTALL_QMLDIR}/org/kde/bismuth/core"
|
||||
|
@ -1,8 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2022 Mikhail Zolotukhin <mail@genda.life>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
namespace Bismuth
|
||||
{
|
||||
struct Config {
|
||||
};
|
||||
}
|
12
src/core/config.kcfgc
Normal file
12
src/core/config.kcfgc
Normal file
@ -0,0 +1,12 @@
|
||||
# SPDX-FileCopyrightText: 2022 Mikhail Zolotukhin <mail@genda.life>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# See: https://api.kde.org/frameworks/kconfig/html/kconfig_compiler.html
|
||||
File=../config/bismuth_config.kcfg
|
||||
NameSpace=Bismuth
|
||||
ClassName=Config
|
||||
Mutators=true
|
||||
ParentInConstructor=true
|
||||
GenerateProperties=true
|
||||
UseEnumTypes=true
|
||||
HeaderExtension=hpp
|
@ -3,6 +3,10 @@
|
||||
|
||||
#include "qml-plugin.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "config.hpp"
|
||||
|
||||
void CorePlugin::registerTypes(const char *uri)
|
||||
{
|
||||
Q_ASSERT(uri == QLatin1String("org.kde.bismuth.core"));
|
||||
@ -15,7 +19,7 @@ Core::Core(QQuickItem *parent)
|
||||
: QQuickItem(parent)
|
||||
, m_kwinApi()
|
||||
, m_qmlElements()
|
||||
, m_config()
|
||||
, m_config(std::make_unique<Bismuth::Config>())
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user