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
4
Merge Requests
4
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
b4ee04e8
Commit
b4ee04e8
authored
May 07, 2018
by
Aleix Pol Gonzalez
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix filtering
Don't try to match when the URL isn't adequate. Also check the state.
parent
0709cf85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
libdiscover/backends/DummyBackend/DummyBackend.cpp
libdiscover/backends/DummyBackend/DummyBackend.cpp
+8
-1
No files found.
libdiscover/backends/DummyBackend/DummyBackend.cpp
View file @
b4ee04e8
...
...
@@ -96,9 +96,16 @@ int DummyBackend::updatesCount() const
ResultsStream
*
DummyBackend
::
search
(
const
AbstractResourcesBackend
::
Filters
&
filter
)
{
QVector
<
AbstractResource
*>
ret
;
if
(
!
filter
.
resourceUrl
.
isEmpty
()
&&
filter
.
resourceUrl
.
scheme
()
==
QLatin1String
(
"dummy"
)
)
if
(
!
filter
.
resourceUrl
.
isEmpty
())
return
findResourceByPackageName
(
filter
.
resourceUrl
);
else
foreach
(
AbstractResource
*
r
,
m_resources
)
{
if
(
r
->
isTechnical
()
&&
filter
.
state
!=
AbstractResource
::
Upgradeable
)
{
continue
;
}
if
(
r
->
state
()
<
filter
.
state
)
continue
;
if
(
r
->
name
().
contains
(
filter
.
search
,
Qt
::
CaseInsensitive
)
||
r
->
comment
().
contains
(
filter
.
search
,
Qt
::
CaseInsensitive
))
ret
+=
r
;
}
...
...
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