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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion src/xdgiconloader/xdgiconloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 2 additions & 1 deletion src/xdgiconloader/xdgiconloader_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Member

@tsujan tsujan Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it better to put the above changes inside #if (QT_VERSION >= QT_VERSION_CHECK(6,8,0))? We still support Qt 6.6.

EDIT: Never mind; Qt 6.6 will be OK with this.

};

//class QIconLoaderEngine : public QIconEngine
Expand Down