Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Mobile
Commits
17bd98d6
Commit
17bd98d6
authored
Apr 04, 2012
by
Lamarque Souza
Browse files
Cache the icon name instead of its resource uri.
CCBUG: 296894
parent
47d2273b
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/metadatamodel/metadatamodel.cpp
View file @
17bd98d6
...
...
@@ -554,7 +554,8 @@ void MetadataModel::newEntries(const QList< Nepomuk::Query::Result > &entries)
Soprano
::
Node
symbol
=
res
.
requestProperties
().
value
(
NAO
::
hasSymbol
());
if
(
!
symbol
.
toString
().
isEmpty
())
{
m_cachedResources
[
resource
][
Icon
]
=
symbol
.
toString
();
Nepomuk
::
Resource
symbolRes
(
symbol
.
uri
());
m_cachedResources
[
resource
][
Icon
]
=
symbolRes
.
genericLabel
();
}
else
{
//if it's an application, fetch the icon from the desktop file
Nepomuk
::
Types
::
Class
resClass
(
resource
.
resourceType
());
...
...
@@ -562,6 +563,8 @@ void MetadataModel::newEntries(const QList< Nepomuk::Query::Result > &entries)
KService
::
Ptr
serv
=
KService
::
serviceByDesktopPath
(
m_cachedResources
[
resource
][
Url
].
toUrl
().
path
());
if
(
serv
)
{
m_cachedResources
[
resource
][
Icon
]
=
serv
->
icon
();
}
else
{
m_cachedResources
[
resource
][
Icon
]
=
KMimeType
::
iconNameForUrl
(
m_cachedResources
[
resource
][
Url
].
toString
());
}
}
else
{
m_cachedResources
[
resource
][
Icon
]
=
KMimeType
::
iconNameForUrl
(
m_cachedResources
[
resource
][
Url
].
toString
());
...
...
Lamarque Souza
@lvsouza
mentioned in commit
8f2c0553
·
Jan 17, 2022
mentioned in commit
8f2c0553
mentioned in commit 8f2c05533cfd337aded1ac708c13dbd5bca0e784
Toggle commit list
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