Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Plasma
Discover
Commits
2c131e8d
Commit
2c131e8d
authored
Jan 24, 2018
by
Aleix Pol Gonzalez
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KNS: Don't add the fallback screenshot if it's already present
parent
bdbe226d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
libdiscover/backends/KNSBackend/KNSResource.cpp
libdiscover/backends/KNSBackend/KNSResource.cpp
+6
-4
No files found.
libdiscover/backends/KNSBackend/KNSResource.cpp
View file @
2c131e8d
...
...
@@ -166,10 +166,12 @@ QString KNSResource::section()
static
void
appendIfValid
(
QList
<
QUrl
>&
list
,
const
QUrl
&
value
,
const
QUrl
&
fallback
=
{})
{
if
(
value
.
isValid
()
&&
!
value
.
isEmpty
()
&&
!
list
.
contains
(
value
))
list
<<
value
;
else
if
(
!
fallback
.
isEmpty
())
appendIfValid
(
list
,
fallback
);
if
(
list
.
contains
(
value
))
{
if
(
value
.
isValid
()
&&
!
value
.
isEmpty
())
list
<<
value
;
else
if
(
!
fallback
.
isEmpty
())
appendIfValid
(
list
,
fallback
);
}
}
void
KNSResource
::
fetchScreenshots
()
...
...
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