on xenial help sign in
Eh, 4 spaces, not 2
commitb28d91318fec92b5519bf1e56ed8ac8056c426e6 authorMichal Hruby <michal.mhr@gmail.com> dateTue 25 Jun 2013, 16:59 (13 years ago) parentdff251b
1 file changed+24−24
plugins/Unity/categories.cpp+24−24
plugins/Unity/categories.cpp+24−24
@@ -113,29 +113,29 @@ Categories::data(const QModelIndex& index, int role) const
113113 }
114114
115115 switch (role) {
116− case RoleId:
117− return QVariant::fromValue(index.row());
118− case RoleName:
119− return QVariant::fromValue(DeeListModel::data(index, 1)); //DISPLAY_NAME
120− case RoleIcon:
121− return QVariant::fromValue(DeeListModel::data(index, 2)); //ICON_HINT
122− case RoleRenderer:
123− return QVariant::fromValue(DeeListModel::data(index, 3)); //RENDERER_NAME
124− case RoleContentType:
125− {
126− auto hints = QVariant::fromValue(DeeListModel::data(index, 4)).toHash();
127− return hints.contains("content-type") ? hints["content-type"] : QVariant(QString("default"));
128− }
129− case RoleHints:
130− return QVariant::fromValue(DeeListModel::data(index, 4)); //HINTS
131− case RoleResults:
132− return QVariant::fromValue(getFilter(index.row()));
133− case RoleCount:
134− {
135− CategoryFilter* filter = getFilter(index.row());
136− return QVariant::fromValue(filter->rowCount());
137− }
138− default:
139− return QVariant();
116+ case RoleId:
117+ return QVariant::fromValue(index.row());
118+ case RoleName:
119+ return QVariant::fromValue(DeeListModel::data(index, 1)); //DISPLAY_NAME
120+ case RoleIcon:
121+ return QVariant::fromValue(DeeListModel::data(index, 2)); //ICON_HINT
122+ case RoleRenderer:
123+ return QVariant::fromValue(DeeListModel::data(index, 3)); //RENDERER_NAME
124+ case RoleContentType:
125+ {
126+ auto hints = QVariant::fromValue(DeeListModel::data(index, 4)).toHash();
127+ return hints.contains("content-type") ? hints["content-type"] : QVariant(QString("default"));
128+ }
129+ case RoleHints:
130+ return QVariant::fromValue(DeeListModel::data(index, 4)); //HINTS
131+ case RoleResults:
132+ return QVariant::fromValue(getFilter(index.row()));
133+ case RoleCount:
134+ {
135+ CategoryFilter* filter = getFilter(index.row());
136+ return QVariant::fromValue(filter->rowCount());
137+ }
138+ default:
139+ return QVariant();
140140 }
141141}