Commit a657df42 authored by Nicolas Fella's avatar Nicolas Fella Committed by Nate Graham
Browse files

[kcms/autostart] Avoid empty application icon

If no icon is available use a fallback one

(cherry picked from commit b23778bc)
parent 2a1f9e44
......@@ -73,7 +73,7 @@ std::optional<AutostartEntry> AutostartModel::loadDesktopEntry(const QString &fi
const auto lstEntry = grp.readXdgListEntry("OnlyShowIn");
const bool onlyInPlasma = lstEntry.contains(QLatin1String("KDE"));
const QString iconName = config.readIcon();
const QString iconName = !config.readIcon().isEmpty() ? config.readIcon() : QStringLiteral("dialog-scripts");
const auto kind = AutostartScriptDesktopFile::isAutostartScript(config) ? XdgScripts : XdgAutoStart; // .config/autostart load desktop at startup
const QString tryCommand = grp.readEntry("TryExec");
......@@ -235,12 +235,14 @@ void AutostartModel::addApplication(const KService::Ptr &service)
const QString iconName = !service->icon().isEmpty() ? service->icon() : QStringLiteral("dialog-scripts");
const auto entry = AutostartEntry{service->name(),
AutostartModel::AutostartEntrySource::XdgAutoStart, // .config/autostart load desktop at startup
int lastApplication = -1;
for (const AutostartEntry &e : qAsConst(m_entries)) {
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