mirror of
https://github.com/KDE/kasts.git
synced 2025-01-30 17:15:03 +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
|
../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)
|
||||||
|
@ -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());
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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 ".."
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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"
|
||||||
|
@ -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 ".."
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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 ".."
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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