-rw-r--r-- | korganizer/calendarview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 0015bd6..1e83236 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2028,33 +2028,33 @@ void CalendarView::writeSettings() | |||
2028 | void CalendarView::readFilterSettings(KConfig *config) | 2028 | void CalendarView::readFilterSettings(KConfig *config) |
2029 | { | 2029 | { |
2030 | // kdDebug() << "CalendarView::readFilterSettings()" << endl; | 2030 | // kdDebug() << "CalendarView::readFilterSettings()" << endl; |
2031 | 2031 | ||
2032 | mFilters.clear(); | 2032 | mFilters.clear(); |
2033 | 2033 | ||
2034 | config->setGroup("General"); | 2034 | config->setGroup("General"); |
2035 | QStringList filterList = config->readListEntry("CalendarFilters"); | 2035 | QStringList filterList = config->readListEntry("CalendarFilters"); |
2036 | 2036 | ||
2037 | QStringList::ConstIterator it = filterList.begin(); | 2037 | QStringList::ConstIterator it = filterList.begin(); |
2038 | QStringList::ConstIterator end = filterList.end(); | 2038 | QStringList::ConstIterator end = filterList.end(); |
2039 | while(it != end) { | 2039 | while(it != end) { |
2040 | // kdDebug() << " filter: " << (*it) << endl; | 2040 | // kdDebug() << " filter: " << (*it) << endl; |
2041 | 2041 | ||
2042 | CalFilter *filter; | 2042 | CalFilter *filter; |
2043 | filter = new CalFilter(*it); | 2043 | filter = new CalFilter(*it); |
2044 | config->setGroup("Filter_" + (*it)); | 2044 | config->setGroup("Filter_" + (*it).utf8()); |
2045 | //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); | 2045 | //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); |
2046 | filter->setCriteria(config->readNumEntry("Criteria",0)); | 2046 | filter->setCriteria(config->readNumEntry("Criteria",0)); |
2047 | filter->setCategoryList(config->readListEntry("CategoryList")); | 2047 | filter->setCategoryList(config->readListEntry("CategoryList")); |
2048 | mFilters.append(filter); | 2048 | mFilters.append(filter); |
2049 | 2049 | ||
2050 | ++it; | 2050 | ++it; |
2051 | } | 2051 | } |
2052 | 2052 | ||
2053 | if (mFilters.count() == 0) { | 2053 | if (mFilters.count() == 0) { |
2054 | CalFilter *filter = new CalFilter(i18n("Default")); | 2054 | CalFilter *filter = new CalFilter(i18n("Default")); |
2055 | mFilters.append(filter); | 2055 | mFilters.append(filter); |
2056 | } | 2056 | } |
2057 | mFilterView->updateFilters(); | 2057 | mFilterView->updateFilters(); |
2058 | config->setGroup("FilterView"); | 2058 | config->setGroup("FilterView"); |
2059 | 2059 | ||
2060 | mFilterView->blockSignals(true); | 2060 | mFilterView->blockSignals(true); |
@@ -2062,33 +2062,33 @@ void CalendarView::readFilterSettings(KConfig *config) | |||
2062 | mFilterView->setSelectedFilter(config->readEntry("Current Filter")); | 2062 | mFilterView->setSelectedFilter(config->readEntry("Current Filter")); |
2063 | mFilterView->blockSignals(false); | 2063 | mFilterView->blockSignals(false); |
2064 | // We do it manually to avoid it being done twice by the above calls | 2064 | // We do it manually to avoid it being done twice by the above calls |
2065 | updateFilter(); | 2065 | updateFilter(); |
2066 | } | 2066 | } |
2067 | 2067 | ||
2068 | void CalendarView::writeFilterSettings(KConfig *config) | 2068 | void CalendarView::writeFilterSettings(KConfig *config) |
2069 | { | 2069 | { |
2070 | // kdDebug() << "CalendarView::writeFilterSettings()" << endl; | 2070 | // kdDebug() << "CalendarView::writeFilterSettings()" << endl; |
2071 | 2071 | ||
2072 | QStringList filterList; | 2072 | QStringList filterList; |
2073 | 2073 | ||
2074 | CalFilter *filter = mFilters.first(); | 2074 | CalFilter *filter = mFilters.first(); |
2075 | while(filter) { | 2075 | while(filter) { |
2076 | // kdDebug() << " fn: " << filter->name() << endl; | 2076 | // kdDebug() << " fn: " << filter->name() << endl; |
2077 | filterList << filter->name(); | 2077 | filterList << filter->name(); |
2078 | config->setGroup("Filter_" + filter->name()); | 2078 | config->setGroup("Filter_" + filter->name().utf8()); |
2079 | config->writeEntry("Criteria",filter->criteria()); | 2079 | config->writeEntry("Criteria",filter->criteria()); |
2080 | config->writeEntry("CategoryList",filter->categoryList()); | 2080 | config->writeEntry("CategoryList",filter->categoryList()); |
2081 | filter = mFilters.next(); | 2081 | filter = mFilters.next(); |
2082 | } | 2082 | } |
2083 | config->setGroup("General"); | 2083 | config->setGroup("General"); |
2084 | config->writeEntry("CalendarFilters",filterList); | 2084 | config->writeEntry("CalendarFilters",filterList); |
2085 | 2085 | ||
2086 | config->setGroup("FilterView"); | 2086 | config->setGroup("FilterView"); |
2087 | config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); | 2087 | config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); |
2088 | config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); | 2088 | config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); |
2089 | } | 2089 | } |
2090 | 2090 | ||
2091 | 2091 | ||
2092 | void CalendarView::goToday() | 2092 | void CalendarView::goToday() |
2093 | { | 2093 | { |
2094 | if ( mViewManager->currentView()->isMonthView() ) | 2094 | if ( mViewManager->currentView()->isMonthView() ) |