Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Discover
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Discover
Commits
2d9fb83a
Commit
2d9fb83a
authored
Jan 09, 2018
by
Aleix Pol Gonzalez
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure the categories are sorted from the start
parent
69c2d24a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
libdiscover/Category/CategoriesReader.cpp
libdiscover/Category/CategoriesReader.cpp
+3
-0
libdiscover/Category/CategoryModel.cpp
libdiscover/Category/CategoryModel.cpp
+0
-1
No files found.
libdiscover/Category/CategoriesReader.cpp
View file @
2d9fb83a
...
...
@@ -35,6 +35,8 @@ QVector<Category*> CategoriesReader::loadCategoriesFile(AbstractResourcesBackend
auto
cat
=
backend
->
category
();
if
(
cat
.
isEmpty
())
qWarning
()
<<
"Couldn't find a category for "
<<
backend
->
name
();
Category
::
sortCategories
(
cat
);
return
cat
;
}
return
loadCategoriesPath
(
path
);
...
...
@@ -68,5 +70,6 @@ QVector<Category*> CategoriesReader::loadCategoriesPath(const QString& path)
node
=
node
.
nextSibling
();
}
Category
::
sortCategories
(
ret
);
return
ret
;
}
libdiscover/Category/CategoryModel.cpp
View file @
2d9fb83a
...
...
@@ -53,7 +53,6 @@ void CategoryModel::populateCategories()
if
(
ret
.
isEmpty
())
{
ret
=
cats
;
Category
::
sortCategories
(
ret
);
}
else
{
Q_FOREACH
(
Category
*
c
,
cats
)
Category
::
addSubcategory
(
ret
,
c
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment