summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/categories.cpp8
-rw-r--r--library/backend/categories.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/library/backend/categories.cpp b/library/backend/categories.cpp
index cce9f38..34ff6fe 100644
--- a/library/backend/categories.cpp
+++ b/library/backend/categories.cpp
@@ -926,6 +926,14 @@ void CheckedListView::setChecked( const QStringList &checked )
*/
/*! \fn CategoryGroup::CategoryGroup(const CategoryGroup &c)
\internal
*/
+
+/* ### FIXME properly merge */
+QStringList Categories::labels( const QString & app, const QArray<int> &catids ) const
+{
+ QStringList strs = mGlobalCats.labels( catids );
+ strs += mAppCats[app].labels( catids );
+ return strs;
+}
diff --git a/library/backend/categories.h b/library/backend/categories.h
index d5b3669..91c93e7 100644
--- a/library/backend/categories.h
+++ b/library/backend/categories.h
@@ -148,12 +148,15 @@ public:
* If extra = UnfiledLabel, then Unfiled is prepended
*/
QStringList labels( const QString &app,
bool includeGlobal = TRUE,
ExtraLabels extra = NoExtra ) const;
+ QStringList labels( const QString &app,
+ const QArray<int> &catids ) const;
+
enum DisplaySingle { ShowMulti, ShowAll, ShowFirst };
/** Returns a single string associated with the cat ids for display in
* a combobox or any area that requires one string. If catids are empty
* then "Unfiled" will be returned. If multiple categories are assigned
* then the behavior depends on the DisplaySingle type.