Skip to content

Instantly share code, notes, and snippets.

@MrQubo
Created May 5, 2018 12:59
Show Gist options
  • Save MrQubo/ea4acf1aa7ff794f3d42f4e5b5c84368 to your computer and use it in GitHub Desktop.
Save MrQubo/ea4acf1aa7ff794f3d42f4e5b5c84368 to your computer and use it in GitHub Desktop.
KConfig "ItemAccessors doesn't work with signals" bug MWE

Instructions to reproduce:

  • mkdir build
  • cd build
  • cmake ..
  • make
cmake_minimum_required(VERSION 2.8.12)
set(KF5_MIN_VERSION "5.15.0")
set(ECM_MIN_VERSION "1.8.0")
find_package(ECM ${ECM_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Config ConfigWidgets)
include_directories("${CMAKE_CURRENT_BINARY_DIR}/..")
set(settings_SRCS
main.cpp
)
kconfig_add_kcfg_files(settings_SRCS GENERATE_MOC settings.kcfgc)
add_executable(settings ${settings_SRCS})
target_link_libraries(settings
KF5::ConfigCore KF5::ConfigWidgets
)
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="settingsrc" />
<group name="Settings">
<entry name="example" type="Bool" />
</group>
</kcfg>
File=settings.kcfg
ClassName=Settings
ItemAccessors=true
Mutators=true
GenerateProperties=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment