-rw-r--r-- | library/categoryedit_p.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/categoryedit_p.cpp b/library/categoryedit_p.cpp index 06e5fec..07e707e 100644 --- a/library/categoryedit_p.cpp +++ b/library/categoryedit_p.cpp | |||
@@ -72,15 +72,17 @@ void CategoryEdit::setCategories( const QArray<int> &recCats, | |||
72 | const QString &appName, const QString &visibleName ) | 72 | const QString &appName, const QString &visibleName ) |
73 | { | 73 | { |
74 | if ( !d ) | 74 | if ( !d ) |
75 | d = new CategoryEditPrivate( (QWidget*)parent(), name() ); | 75 | d = new CategoryEditPrivate( (QWidget*)parent(), name() ); |
76 | d->mStrApp = appName; | 76 | d->mStrApp = appName; |
77 | d->mVisible = visibleName; | 77 | d->mVisible = visibleName; |
78 | QArray<int> cats = d->mCategories.ids( d->mStrApp ); | 78 | |
79 | lvView->clear(); | ||
80 | QStringList appCats = d->mCategories.labels( d->mStrApp ); | 79 | QStringList appCats = d->mCategories.labels( d->mStrApp ); |
80 | QArray<int> cats = d->mCategories.ids(d->mStrApp, appCats); | ||
81 | lvView->clear(); | ||
82 | |||
81 | QStringList::ConstIterator it; | 83 | QStringList::ConstIterator it; |
82 | int i, j; | 84 | int i, j; |
83 | for ( i = 0, it = appCats.begin(); it != appCats.end(); i++, ++it ) { | 85 | for ( i = 0, it = appCats.begin(); it != appCats.end(); i++, ++it ) { |
84 | QCheckListItem *chk; | 86 | QCheckListItem *chk; |
85 | chk = new QCheckListItem( lvView, (*it), QCheckListItem::CheckBox ); | 87 | chk = new QCheckListItem( lvView, (*it), QCheckListItem::CheckBox ); |
86 | if ( !d->mCategories.isGlobal((*it)) ) | 88 | if ( !d->mCategories.isGlobal((*it)) ) |