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

fix: wrong availableSizes for DIconProxyEngine #228

Merged
merged 1 commit into from
Mar 12, 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
15 changes: 15 additions & 0 deletions src/util/private/diconproxyengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,21 @@ const
return m_iconEngine ? m_iconEngine->iconName() : QString();
}

QList<QSize> DIconProxyEngine::availableSizes(QIcon::Mode mode, QIcon::State state)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const
#endif
{
return m_iconEngine ? m_iconEngine->availableSizes(mode, state) : QIconEngine::availableSizes(mode, state);
}

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool DIconProxyEngine::isNull()
{
return m_iconEngine ? m_iconEngine->isNull() : QIconEngine::isNull();
}
#endif

QString DIconProxyEngine::proxyKey()
{
ensureEngine();
Expand Down
10 changes: 10 additions & 0 deletions src/util/private/diconproxyengine_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@
#else
QString iconName() const override;
#endif

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QList<QSize> availableSizes(QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) override;
#else
QList<QSize> availableSizes(QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const override;
#endif

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool isNull() override;

Check warning on line 43 in src/util/private/diconproxyengine_p.h

View workflow job for this annotation

GitHub Actions / check_job / DOXYGEN_CHECK

function bool Dtk::Gui::DIconProxyEngine::isNull is not documented!
#endif
inline QString themeName() const { return m_iconThemeName; }

Check warning on line 45 in src/util/private/diconproxyengine_p.h

View workflow job for this annotation

GitHub Actions / check_job / DOXYGEN_CHECK

function QString Dtk::Gui::DIconProxyEngine::themeName is not documented!

QString proxyKey();

Check warning on line 47 in src/util/private/diconproxyengine_p.h

View workflow job for this annotation

GitHub Actions / check_job / DOXYGEN_CHECK

function QString Dtk::Gui::DIconProxyEngine::proxyKey is not documented!
private:
void virtual_hook(int id, void *data) override;

Expand Down
Loading