mirror of
https://github.com/KDE/kasts.git
synced 2025-01-30 09:04:53 +01:00
Modernize config registration
This commit is contained in:
parent
981ee01dbd
commit
b8c28b2f7f
@ -225,7 +225,7 @@ ecm_add_app_icon(kasts ICONS ${kasts_ICONS_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_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)
|
||||
|
@ -129,8 +129,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
about.processCommandLine(&parser);
|
||||
|
||||
qmlRegisterSingletonInstance("org.kde.kasts.settings", 1, 0, "SettingsManager", SettingsManager::self());
|
||||
|
||||
if (!SettingsManager::self()->colorScheme().isEmpty()) {
|
||||
ColorSchemer::instance().apply(SettingsManager::self()->colorScheme());
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.delegates as AddonDelegates
|
||||
import org.kde.kmediasession
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
AddonDelegates.RoundedItemDelegate {
|
||||
id: root
|
||||
|
@ -12,7 +12,6 @@ import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.delegates as Delegates
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
Kirigami.Dialog {
|
||||
id: overlay
|
||||
|
@ -13,7 +13,6 @@ import org.kde.kirigami as Kirigami
|
||||
import org.kde.kmediasession
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
import ".."
|
||||
|
||||
|
@ -13,7 +13,6 @@ import org.kde.kirigami as Kirigami
|
||||
import org.kde.kmediasession
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
Kirigami.ScrollablePage {
|
||||
id: page
|
||||
|
@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.delegates as AddonDelegates
|
||||
|
||||
import org.kde.kmediasession
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
AddonDelegates.RoundedItemDelegate {
|
||||
id: listItem
|
||||
|
@ -13,7 +13,6 @@ import QtQuick.Window
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -15,7 +15,6 @@ import org.kde.kirigami as Kirigami
|
||||
import org.kde.config as KConfig
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
import "Desktop"
|
||||
import "Mobile"
|
||||
|
@ -14,7 +14,6 @@ import org.kde.kirigami as Kirigami
|
||||
import org.kde.kmediasession
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
import ".."
|
||||
|
||||
|
@ -10,7 +10,6 @@ import QtQuick.Layouts
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
Kirigami.Dialog {
|
||||
id: customizeRatesDialog
|
||||
|
@ -10,7 +10,6 @@ import QtQuick.Layouts
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
Controls.Menu {
|
||||
id: playbackRateMenu
|
||||
|
@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
||||
import org.kde.kmediasession
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
FormCard.FormCardPage {
|
||||
id: root
|
||||
|
@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
||||
import org.kde.kmediasession
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
FormCard.FormCardPage {
|
||||
id: root
|
||||
|
@ -15,7 +15,6 @@ import org.kde.kirigamiaddons.formcard as FormCard
|
||||
import org.kde.kirigamiaddons.labs.components as Addons
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
FormCard.FormCardPage {
|
||||
id: root
|
||||
|
@ -13,7 +13,6 @@ import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
FormCard.FormCardPage {
|
||||
id: root
|
||||
|
@ -14,7 +14,6 @@ import org.kde.kirigamiaddons.delegates as Delegates
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
import ".."
|
||||
|
||||
|
@ -10,7 +10,6 @@ import QtQuick.Layouts
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
Kirigami.Dialog {
|
||||
id: sleepTimerDialog
|
||||
|
@ -11,7 +11,6 @@ import QtQuick.Layouts
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.kasts
|
||||
import org.kde.kasts.settings
|
||||
|
||||
Kirigami.Dialog {
|
||||
id: syncPasswordOverlay
|
||||
|
@ -1,7 +0,0 @@
|
||||
File=settingsmanager.kcfg
|
||||
ClassName=SettingsManager
|
||||
Mutators=true
|
||||
DefaultValueGetters=true
|
||||
GenerateProperties=true
|
||||
ParentInConstructor=true
|
||||
Singleton=true
|
Loading…
x
Reference in New Issue
Block a user