diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-02-19 12:38:30 +0200 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-02-19 12:38:30 +0200 |
commit | 4d09225252b6605dbc2ff5a53a1fc863d34fe1f4 (patch) | |
tree | 386db200b0f9562e9962b643f82e1be3ef33e558 /src/directorylist.cpp | |
parent | eacf9e0adbf7ec4ee903e82b3b84b4770ae02476 (diff) | |
download | klamav-4d09225252b6605dbc2ff5a53a1fc863d34fe1f4.tar.gz klamav-4d09225252b6605dbc2ff5a53a1fc863d34fe1f4.zip |
CollectionSetup: added writeConfig() function.
Idea taken from amaroK.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src/directorylist.cpp')
-rw-r--r-- | src/directorylist.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 <tqtooltip.h> #include <tqdir.h> +#include <tdeconfig.h> +#include <tdeglobal.h> #include <tdemessagebox.h> #include <tdefileitem.h> #include <tdelocale.h> @@ -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" |