summaryrefslogtreecommitdiffabout
path: root/kaddressbook/filter.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/filter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/filter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/filter.cpp b/kaddressbook/filter.cpp
index 9cb4c2d..7a869fa 100644
--- a/kaddressbook/filter.cpp
+++ b/kaddressbook/filter.cpp
@@ -128,49 +128,49 @@ void Filter::setCategories( const QStringList &list )
{
mCategoryList = list;
}
const QStringList &Filter::categories() const
{
return mCategoryList;
}
void Filter::save( KConfig *config )
{
config->writeEntry( "Name", mName );
config->writeEntry( "Enabled", mEnabled );
config->writeEntry( "Categories", mCategoryList );
config->writeEntry( "MatchRule", (int)mMatchRule );
config->writeEntry( "Criteria", (int)mCriteria );
}
void Filter::restore( KConfig *config )
{
mName = config->readEntry( "Name", "<internal error>" );
mEnabled = config->readBoolEntry( "Enabled", true );
mCategoryList = config->readListEntry( "Categories" );
mMatchRule = (MatchRule)config->readNumEntry( "MatchRule", Matching );
- mCriteria = config->readNumEntry( "Criteria", (ShowPublic | ShowPrivate| ShowConfidential) );
+ mCriteria = config->readNumEntry( "Criteria", (ShowPublic | ShowPrivate| ShowConfidential ) );
}
void Filter::save( KConfig *config, QString baseGroup, Filter::List &list )
{
{
KConfigGroupSaver s( config, baseGroup );
// remove the old filters
uint count = config->readNumEntry( "Count" );
/* // memory access violation here
for ( uint i = 0; i < count; ++i )
config->deleteGroup( QString( "%1_%2" ).arg( baseGroup ).arg( i ) );
*/
}
int index = 0;
Filter::List::Iterator iter;
for ( iter = list.begin(); iter != list.end(); ++iter ) {
if ( !(*iter).mInternal ) {
KConfigGroupSaver s( config, QString( "%1_%2" ).arg( baseGroup ).arg( index ) );
(*iter).save( config );
index++;
}