CollectionSetup: added writeConfig() function.

Idea taken from amaroK.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/24/head
Mavridis Philippe 4 years ago
parent eacf9e0adb
commit 4d09225252
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -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"

@ -49,6 +49,7 @@ public:
TQMap<TQString,int> m_refcount;
TQStringList pruneSelectedDirs();
void writeConfig( const char* optGroup, const char* optName );
signals:
void dirsSelected(TQStringList& dirs);

Loading…
Cancel
Save