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: path tweaks and log cleanup #12482

Merged
merged 2 commits into from
Feb 7, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/skin/legacy/legacyskinparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ QWidget* LegacySkinParser::parseSkin(const QString& skinPath, QWidget* pParent)
// that use the same template inheritance scheme like official skins, but we
// don't because unfortunately there is no reliable way to apply equivalent
// path replacement in stylesheetAbsIconPaths().
QString systemSkinsPath(m_pConfig->getResourcePath() + "/skins/");
QDir::addSearchPath("skins", systemSkinsPath);
QString systemSkinsPath(m_pConfig->getResourcePath() + "skins/");
QDir::setSearchPaths("skins", QStringList{systemSkinsPath});

ColorSchemeParser::setupLegacyColorSchemes(skinDocument, m_pConfig, &m_style, m_pContext.get());

Expand Down
8 changes: 4 additions & 4 deletions src/skin/skinloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,19 @@ SkinPointer SkinLoader::getConfiguredSkin() const {
DEBUG_ASSERT(!configSkin.isEmpty());
SkinPointer pSkin = getSkin(configSkin);
if (pSkin && pSkin->isValid()) {
qInfo() << "Loaded skin" << configSkin;
return pSkin;
}
qWarning() << "Failed to load skin" << configSkin;
qWarning() << "Failed to find configured skin" << configSkin;

// Fallback to default skin as last resort
const QString defaultSkinName = getDefaultSkinName();
DEBUG_ASSERT(!defaultSkinName.isEmpty());
pSkin = getSkin(defaultSkinName);
VERIFY_OR_DEBUG_ASSERT(pSkin && pSkin->isValid()) {
qWarning() << "Failed to load default skin" << defaultSkinName;
qWarning() << "Can't find default skin" << defaultSkinName;
return nullptr;
}
qInfo() << "Loaded default skin" << defaultSkinName;
qInfo() << "Found default skin" << defaultSkinName;
return pSkin;
}

Expand Down Expand Up @@ -181,6 +180,7 @@ QWidget* SkinLoader::loadConfiguredSkin(QWidget* pParent,
VERIFY_OR_DEBUG_ASSERT(pLoadedSkin != nullptr) {
qCritical() << "No skin can be loaded, please check your installation.";
}
qInfo() << "Loaded skin" << pSkin->name() << "from" << pSkin->path().filePath();
return pLoadedSkin;
}

Expand Down
Loading