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
8f2c0553
Commit
8f2c0553
authored
Apr 04, 2012
by
Lamarque Souza
Browse files
Cache the icon name instead of its resource uri.
CCBUG: 296894 (cherry picked from commit
17bd98d6
)
parent
0ae9b852
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/metadatamodel/metadatamodel.cpp
View file @
8f2c0553
...
...
@@ -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
());
...
...
Write
Preview
Supports
Markdown
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