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

Adapt to changes in private headers Qt v6.9 #311

Merged
merged 2 commits into from
Feb 22, 2025
Merged
Changes from 1 commit
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
Next Next commit
Adapt to changes in private headers Qt v6.9
palinek committed Dec 10, 2024

Verified

This commit was signed with the committer’s verified signature.
palinek Palo Kisa
commit 526463dc9edde607fa487092c5b85229905f890f
6 changes: 5 additions & 1 deletion src/xdgiconloader/xdgiconloader.cpp
Original file line number Diff line number Diff line change
@@ -439,7 +439,11 @@ QThemeIconInfo XdgIconLoader::findIconHelper(const QString &themeName,
} else if (gSupportsSvg) {
const QString svgPath = subDir + svgIconName;
if (QFile::exists(svgPath)) {
std::unique_ptr<ScalableEntry> iconEntry = (followColorScheme() && theme.followsColorScheme()) ? std::make_unique<ScalableFollowsColorEntry>() : std::make_unique<ScalableEntry>();
std::unique_ptr<QIconLoaderEngineEntry> iconEntry;
if (followColorScheme() && theme.followsColorScheme())
iconEntry.reset(new ScalableFollowsColorEntry);
else
iconEntry.reset(new ScalableEntry);
iconEntry->dir = dirInfo;
iconEntry->filename = svgPath;
info.entries.push_back(std::move(iconEntry));
3 changes: 2 additions & 1 deletion src/xdgiconloader/xdgiconloader_p.h
Original file line number Diff line number Diff line change
@@ -61,13 +61,14 @@

class XdgIconLoader;

struct ScalableFollowsColorEntry : public ScalableEntry
struct ScalableFollowsColorEntry : public QIconLoaderEngineEntry
{
#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0))
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) override;
#else
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) override;
#endif
QIcon svgIcon;
};

//class QIconLoaderEngine : public QIconEngine