Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skins: append / when setting skin base path #4151

Merged
merged 1 commit into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/skin/legacy/legacyskinparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ QWidget* LegacySkinParser::parseSkin(const QString& skinPath, QWidget* pParent)

LaunchImage* LegacySkinParser::parseLaunchImage(const QString& skinPath, QWidget* pParent) {
m_pContext = std::make_unique<SkinContext>(m_pConfig, skinPath + "/skin.xml");
m_pContext->setSkinBasePath(skinPath + "/");
m_pContext->setSkinBasePath(skinPath);

QDomElement skinDocument = openSkin(skinPath);
if (skinDocument.isNull()) {
Expand Down Expand Up @@ -2308,7 +2308,5 @@ QString LegacySkinParser::stylesheetAbsIconPaths(QString& style) {
// <Style> nodes) with absolute file paths.
// TODO Can be removed/disabled as soon as all target distros have the fixed
// package in their repo.
// Note: It's safe to use the base path after parseSkin() has updated it
// (parseLaunchImage() appends "/" earlier)
return style.replace("url(skin:", "url(" + m_pContext->getSkinBasePath());
}
2 changes: 1 addition & 1 deletion src/skin/legacy/skincontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class SkinContext {
void setSkinBasePath(const QString& skinBasePath) {
QStringList skinPaths(skinBasePath);
QDir::setSearchPaths("skin", skinPaths);
m_skinBasePath = skinBasePath;
m_skinBasePath = skinBasePath + "/";
}

// Sets the base path used by getSkinPath.
Expand Down