-QString UserCategoryItem::categoryId() {
- if(_category < categories.count())
- return categories[_category].displayString;
- else
- return tr("Users");
+// caching this makes no sense, since we display the user number dynamically
+QString UserCategoryItem::categoryName() const {
+ int n = childCount();
+ switch(_category) {
+ case 0: return tr("%n Owner(s)", 0, n);
+ case 1: return tr("%n Admin(s)", 0, n);
+ case 2: return tr("%n Operator(s)", 0, n);
+ case 3: return tr("%n Half-Op(s)", 0, n);
+ case 4: return tr("%n Voiced", 0, n);
+ default: return tr("%n User(s)", 0, n);
+ }