Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Discover
Commits
03e22070
Commit
03e22070
authored
Dec 14, 2020
by
Aleix Pol Gonzalez
🐧
Browse files
Port away from applicationBackends
It's not used elsewhere and skips the creation of a weird intermediary container.
parent
a0c91a2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
libdiscover/resources/ResourcesModel.cpp
View file @
03e22070
...
...
@@ -393,13 +393,12 @@ void ResourcesModel::initApplicationsBackend()
{
const
auto
name
=
applicationSourceName
();
const
auto
backends
=
applicationBackends
();
auto
idx
=
kIndexOf
(
backends
,
[
name
](
AbstractResourcesBackend
*
b
)
{
return
b
->
name
()
==
name
;
});
auto
idx
=
kIndexOf
(
m_backends
,
[
name
](
AbstractResourcesBackend
*
b
)
{
return
b
->
hasApplications
()
&&
b
->
name
()
==
name
;
});
if
(
idx
<
0
)
{
idx
=
kIndexOf
(
backends
,
[](
AbstractResourcesBackend
*
b
)
{
return
b
->
hasApplications
();
});
idx
=
kIndexOf
(
m_
backends
,
[](
AbstractResourcesBackend
*
b
)
{
return
b
->
hasApplications
();
});
qCDebug
(
LIBDISCOVER_LOG
)
<<
"falling back applications backend to"
<<
idx
;
}
setCurrentApplicationBackend
(
backends
.
value
(
idx
,
nullptr
),
false
);
setCurrentApplicationBackend
(
m_
backends
.
value
(
idx
,
nullptr
),
false
);
}
QString
ResourcesModel
::
applicationSourceName
()
const
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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