Commit f9e5b852 authored by Andrey Bondrov's avatar Andrey Bondrov

Add ~/.local/share/icons to icons search paths

Summary: We need to add ~/.local/share/icons to icons search paths in plasma-integration.

Reviewers: jriddell, broulik, davidedmundson

Reviewed By: davidedmundson

Subscribers: rkflx, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision:
parent a12e9ea5
......@@ -34,6 +34,7 @@
#include <QGuiApplication>
#include <QDialogButtonBox>
#include <QScreen>
#include <QStandardPaths>
#include <QDBusConnection>
#include <QDBusInterface>
......@@ -167,24 +168,14 @@ QStringList KHintsSettings::xdgIconThemePaths() const
QStringList paths;
// make sure we have ~/.local/share/icons in paths if it exists
paths << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("icons"), QStandardPaths::LocateDirectory);
const QFileInfo homeIconDir(QDir::homePath() + QStringLiteral("/.icons"));
if (homeIconDir.isDir()) {
paths << homeIconDir.absoluteFilePath();
QString xdgDirString = QFile::decodeName(qgetenv("XDG_DATA_DIRS"));
if (xdgDirString.isEmpty()) {
xdgDirString = QStringLiteral("/usr/local/share:/usr/share");
foreach (const QString &xdgDir, xdgDirString.split(QLatin1Char(':'))) {
const QFileInfo xdgIconsDir(xdgDir + QStringLiteral("/icons"));
if (xdgIconsDir.isDir()) {
paths << xdgIconsDir.absoluteFilePath();
return paths;
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