Modernize config registration

This commit is contained in:
Tobias Fella 2025-01-19 20:00:56 +01:00
parent 981ee01dbd
commit b8c28b2f7f
No known key found for this signature in database
GPG Key ID: E676397E8AAFFC34
20 changed files with 1 additions and 27 deletions

View File

@ -225,7 +225,7 @@ ecm_add_app_icon(kasts ICONS ${kasts_ICONS_PNG}
../icons/128-apps-kasts.png ../icons/128-apps-kasts.png
) )
kconfig_add_kcfg_files(kasts settingsmanager.kcfgc GENERATE_MOC) kconfig_target_kcfg_file(kasts FILE settingsmanager.kcfg CLASS_NAME SettingsManager MUTATORS GENERATE_PROPERTIES DEFAULT_VALUE_GETTERS PARENT_IN_CONSTRUCTOR SINGLETON GENERATE_MOC QML_REGISTRATION)
target_include_directories(kasts PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models ${CMAKE_CURRENT_SOURCE_DIR}/utils ${CMAKE_CURRENT_SOURCE_DIR}/sync) target_include_directories(kasts PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models ${CMAKE_CURRENT_SOURCE_DIR}/utils ${CMAKE_CURRENT_SOURCE_DIR}/sync)
target_link_libraries(kasts PRIVATE Qt::Core Qt::Qml Qt::Quick Qt::QuickControls2 Qt::Sql Qt::Svg Qt::Xml Qt::Network KF6::Kirigami KF6::Syndication KF6::CoreAddons KF6::ConfigGui KF6::I18n Taglib::Taglib ${QTKEYCHAIN_LIBRARIES} KF6::ThreadWeaver KF6::ColorScheme KMediaSession) target_link_libraries(kasts PRIVATE Qt::Core Qt::Qml Qt::Quick Qt::QuickControls2 Qt::Sql Qt::Svg Qt::Xml Qt::Network KF6::Kirigami KF6::Syndication KF6::CoreAddons KF6::ConfigGui KF6::I18n Taglib::Taglib ${QTKEYCHAIN_LIBRARIES} KF6::ThreadWeaver KF6::ColorScheme KMediaSession)

View File

@ -129,8 +129,6 @@ int main(int argc, char *argv[])
} }
about.processCommandLine(&parser); about.processCommandLine(&parser);
qmlRegisterSingletonInstance("org.kde.kasts.settings", 1, 0, "SettingsManager", SettingsManager::self());
if (!SettingsManager::self()->colorScheme().isEmpty()) { if (!SettingsManager::self()->colorScheme().isEmpty()) {
ColorSchemer::instance().apply(SettingsManager::self()->colorScheme()); ColorSchemer::instance().apply(SettingsManager::self()->colorScheme());
} }

View File

@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.delegates as AddonDelegates
import org.kde.kmediasession import org.kde.kmediasession
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
AddonDelegates.RoundedItemDelegate { AddonDelegates.RoundedItemDelegate {
id: root id: root

View File

@ -12,7 +12,6 @@ import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.delegates as Delegates import org.kde.kirigamiaddons.delegates as Delegates
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
Kirigami.Dialog { Kirigami.Dialog {
id: overlay id: overlay

View File

@ -13,7 +13,6 @@ import org.kde.kirigami as Kirigami
import org.kde.kmediasession import org.kde.kmediasession
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
import ".." import ".."

View File

@ -13,7 +13,6 @@ import org.kde.kirigami as Kirigami
import org.kde.kmediasession import org.kde.kmediasession
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
Kirigami.ScrollablePage { Kirigami.ScrollablePage {
id: page id: page

View File

@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.delegates as AddonDelegates
import org.kde.kmediasession import org.kde.kmediasession
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
AddonDelegates.RoundedItemDelegate { AddonDelegates.RoundedItemDelegate {
id: listItem id: listItem

View File

@ -13,7 +13,6 @@ import QtQuick.Window
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
Item { Item {
id: root id: root

View File

@ -15,7 +15,6 @@ import org.kde.kirigami as Kirigami
import org.kde.config as KConfig import org.kde.config as KConfig
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
import "Desktop" import "Desktop"
import "Mobile" import "Mobile"

View File

@ -14,7 +14,6 @@ import org.kde.kirigami as Kirigami
import org.kde.kmediasession import org.kde.kmediasession
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
import ".." import ".."

View File

@ -10,7 +10,6 @@ import QtQuick.Layouts
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
Kirigami.Dialog { Kirigami.Dialog {
id: customizeRatesDialog id: customizeRatesDialog

View File

@ -10,7 +10,6 @@ import QtQuick.Layouts
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
Controls.Menu { Controls.Menu {
id: playbackRateMenu id: playbackRateMenu

View File

@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.kmediasession import org.kde.kmediasession
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
FormCard.FormCardPage { FormCard.FormCardPage {
id: root id: root

View File

@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.kmediasession import org.kde.kmediasession
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
FormCard.FormCardPage { FormCard.FormCardPage {
id: root id: root

View File

@ -15,7 +15,6 @@ import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.kirigamiaddons.labs.components as Addons import org.kde.kirigamiaddons.labs.components as Addons
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
FormCard.FormCardPage { FormCard.FormCardPage {
id: root id: root

View File

@ -13,7 +13,6 @@ import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.formcard as FormCard import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
FormCard.FormCardPage { FormCard.FormCardPage {
id: root id: root

View File

@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.delegates as Delegates
import org.kde.kirigamiaddons.formcard as FormCard import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
import ".." import ".."

View File

@ -10,7 +10,6 @@ import QtQuick.Layouts
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
Kirigami.Dialog { Kirigami.Dialog {
id: sleepTimerDialog id: sleepTimerDialog

View File

@ -11,7 +11,6 @@ import QtQuick.Layouts
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
import org.kde.kasts import org.kde.kasts
import org.kde.kasts.settings
Kirigami.Dialog { Kirigami.Dialog {
id: syncPasswordOverlay id: syncPasswordOverlay

View File

@ -1,7 +0,0 @@
File=settingsmanager.kcfg
ClassName=SettingsManager
Mutators=true
DefaultValueGetters=true
GenerateProperties=true
ParentInConstructor=true
Singleton=true