Commit 3767b67a authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[kcms/autostart] Fix displaying non-symlinked scripts

While it's not possible to add them from the UI it's still possible to have non-symlinked scripts in .config/autostart-scripts from the old KCM or place them there manually.

Fix showing their file path in the list.
parent 29145e72
......@@ -159,7 +159,7 @@ void AutostartModel::loadScriptsFromDir(const QString &subDir, AutostartModel::A
fileName = fi.symLinkTarget();
}
m_entries.push_back({fi.fileName(), isSymlink ? fileName : QString(), kind, true, fi.absoluteFilePath(), false, QStringLiteral("dialog-scripts")});
m_entries.push_back({fileName, isSymlink ? fileName : QString(), kind, true, fi.absoluteFilePath(), false, QStringLiteral("dialog-scripts")});
}
}
......
......@@ -76,7 +76,7 @@ private:
};
struct AutostartEntry {
QString name; // Human readable name or local script name
QString name; // Human readable name or script file path. In case of symlinks the target file path
QString command; // exec or original .sh file
AutostartModel::AutostartEntrySource source;
bool enabled;
......
......@@ -59,7 +59,7 @@ KCM.ScrollViewKCM {
Label {
height: appIcon.height
text: model.source === AutostartModel.XdgAutoStart ? model.name : model.command
text: model.name
elide: Text.ElideRight
anchors.left: appIcon.right
anchors.leftMargin: Kirigami.Units.largeSpacing
......
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