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
KDE CLI tools
Commits
8674694e
Commit
8674694e
authored
Oct 25, 2020
by
Nicolas Fella
Browse files
Avoid pointless KCModuleInfo usage
We can get the icon from the KService directly.
parent
84fda4ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
kcmshell/main.cpp
View file @
8674694e
...
...
@@ -30,7 +30,6 @@
#include
<KAboutData>
#include
<KAuthorized>
#include
<KCModuleInfo>
#include
<KCModuleProxy>
#include
<QDebug>
#include
<KLocalizedString>
...
...
@@ -310,7 +309,7 @@ int main(int _argc, char *_argv[])
if
(
parser
.
isSet
(
QStringLiteral
(
"icon"
)))
{
dlg
->
setWindowIcon
(
QIcon
::
fromTheme
(
parser
.
value
(
QStringLiteral
(
"icon"
))));
}
else
if
(
!
parser
.
isSet
(
QStringLiteral
(
"icon"
))
&&
!
modules
.
isEmpty
())
{
const
QString
iconName
=
KCModuleInfo
(
modules
.
first
()
).
icon
();
const
QString
iconName
=
modules
.
first
()
->
icon
();
dlg
->
setWindowIcon
(
QIcon
::
fromTheme
(
iconName
)
);
}
...
...
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