diff --git a/wallpapers/image/image.cpp b/wallpapers/image/image.cpp --- a/wallpapers/image/image.cpp +++ b/wallpapers/image/image.cpp @@ -149,9 +149,6 @@ m_mode = mode; if (m_mode == SlideShow) { - if (m_slidePaths.isEmpty()) { - m_slidePaths << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("share/wallpapers"), QStandardPaths::LocateDirectory); - } startSlideshow(); @@ -359,8 +356,15 @@ m_slidePaths = slidePaths; m_slidePaths.removeAll(QString()); - if (m_slidePaths.isEmpty()) { - m_slidePaths << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("share/wallpapers"), QStandardPaths::LocateDirectory); + if (!m_slidePaths.isEmpty()) { + // Replace 'preferred://wallpaperlocations' with real paths + const QStringList preProcessedPaths = m_slidePaths; + for (const QString &path : preProcessedPaths) { + if (path == QLatin1String("preferred://wallpaperlocations")) { + m_slidePaths << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("wallpapers"), QStandardPaths::LocateDirectory); + m_slidePaths.removeAll(path); + } + } } if (m_mode == SlideShow) { diff --git a/wallpapers/image/slideshowpackage/contents/config/main.xml b/wallpapers/image/slideshowpackage/contents/config/main.xml --- a/wallpapers/image/slideshowpackage/contents/config/main.xml +++ b/wallpapers/image/slideshowpackage/contents/config/main.xml @@ -24,7 +24,7 @@ - + preferred://wallpaperlocations