From 4d09225252b6605dbc2ff5a53a1fc863d34fe1f4 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Fri, 19 Feb 2021 12:38:30 +0200 Subject: CollectionSetup: added writeConfig() function. Idea taken from amaroK. Signed-off-by: Mavridis Philippe --- src/directorylist.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/directorylist.cpp') diff --git a/src/directorylist.cpp b/src/directorylist.cpp index c4ff438..8e8bf76 100644 --- a/src/directorylist.cpp +++ b/src/directorylist.cpp @@ -20,6 +20,8 @@ #include #include +#include +#include #include #include #include @@ -528,4 +530,12 @@ TQStringList CollectionSetup::pruneSelectedDirs(){ return filepattern; } +void CollectionSetup::writeConfig( const char* optGroup, const char* optName ) +{ + TDEConfig *config = TDEGlobal::config(); + config->setGroup( optGroup ); + config->writeEntry( optName, dirs() ); + config->sync(); +} + #include "directorylist.moc" -- cgit v1.2.1