Verified Commit b4d3e5e0 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

wallpapers/image: use `Package::fileUrl` in `findPreferredImageInPackage`

This drops a redundant conversion.
parent 8b641963
Pipeline #190285 passed with stage
in 7 minutes and 12 seconds
......@@ -223,7 +223,7 @@ Provider::Type MediaProxy::determineType(const QUrl &url)
QUrl MediaProxy::findPreferredImageInPackage()
{
KPackage::Package package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Wallpaper/Images"));
package.setPath(m_source.toLocalFile());
package.setPath(formatUrl(m_source).toLocalFile());
QUrl url;
......@@ -232,7 +232,7 @@ QUrl MediaProxy::findPreferredImageInPackage()
}
PackageFinder::findPreferredImageInPackage(package, m_targetSize);
url = QUrl::fromLocalFile(package.filePath("preferred"));
url = package.fileUrl("preferred");
if (isDarkColorScheme()) {
const QUrl darkUrl = package.fileUrl("preferredDark");
......
Supports Markdown
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