Commit 8674694e authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Avoid pointless KCModuleInfo usage

We can get the icon from the KService directly.
parent 84fda4ba
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <KAboutData> #include <KAboutData>
#include <KAuthorized> #include <KAuthorized>
#include <KCModuleInfo>
#include <KCModuleProxy> #include <KCModuleProxy>
#include <QDebug> #include <QDebug>
#include <KLocalizedString> #include <KLocalizedString>
...@@ -310,7 +309,7 @@ int main(int _argc, char *_argv[]) ...@@ -310,7 +309,7 @@ int main(int _argc, char *_argv[])
if (parser.isSet(QStringLiteral("icon"))) { if (parser.isSet(QStringLiteral("icon"))) {
dlg->setWindowIcon(QIcon::fromTheme(parser.value(QStringLiteral("icon")))); dlg->setWindowIcon(QIcon::fromTheme(parser.value(QStringLiteral("icon"))));
} else if (!parser.isSet(QStringLiteral("icon")) && !modules.isEmpty()) { } 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) ); dlg->setWindowIcon( QIcon::fromTheme(iconName) );
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment