diff --git a/src/kiconloader.h b/src/kiconloader.h --- a/src/kiconloader.h +++ b/src/kiconloader.h @@ -586,67 +586,73 @@ Q_PRIVATE_SLOT(d, void _k_refreshIcons(int group)) }; +#ifndef KICONTHEMES_NO_DEPRECATED /** * \relates KIconLoader * Load a desktop icon. + * @deprecated since 5.63. Prefer QIcon::fromTheme instead where possible, + * if you need a pixmap use QIcon::pixmap with KIconLoader::StdSizes, + * if you need the overlay, use KIconLoader::loadIcon. */ -KICONTHEMES_EXPORT QPixmap DesktopIcon(const QString &name, int size = 0, +KICONTHEMES_DEPRECATED_EXPORT QPixmap DesktopIcon(const QString &name, int size = 0, int state = KIconLoader::DefaultState, const QStringList &overlays = QStringList()); /** * \relates KIconLoader * Load a desktop icon, and apply the necessary effects to get an IconSet. * @deprecated use QIcon::fromTheme instead */ -#ifndef KICONTHEMES_NO_DEPRECATED KICONTHEMES_DEPRECATED_EXPORT QIcon DesktopIconSet(const QString &name, int size = 0); -#endif /** * \relates KIconLoader * Load a toolbar icon. + * @deprecated since 5.63. Prefer QIcon::fromTheme instead where possible, + * if you need a pixmap use QIcon::pixmap with KIconLoader::StdSizes, + * if you need the overlay, use KIconLoader::loadIcon. */ -KICONTHEMES_EXPORT QPixmap BarIcon(const QString &name, int size = 0, int state = KIconLoader::DefaultState, +KICONTHEMES_DEPRECATED_EXPORT QPixmap BarIcon(const QString &name, int size = 0, int state = KIconLoader::DefaultState, const QStringList &overlays = QStringList()); /** * \relates KIconLoader * Load a toolbar icon, and apply the necessary effects to get an IconSet. * @deprecated use QIcon::fromTheme instead */ -#ifndef KICONTHEMES_NO_DEPRECATED KICONTHEMES_DEPRECATED_EXPORT QIcon BarIconSet(const QString &name, int size = 0); -#endif /** * \relates KIconLoader * Load a small icon. + * @deprecated since 5.63. Prefer QIcon::fromTheme instead where possible, + * if you need a pixmap use QIcon::pixmap with KIconLoader::StdSizes, + * if you need the overlay, use KIconLoader::loadIcon. */ -KICONTHEMES_EXPORT QPixmap SmallIcon(const QString &name, int size = 0, +KICONTHEMES_DEPRECATED_EXPORT QPixmap SmallIcon(const QString &name, int size = 0, int state = KIconLoader::DefaultState, const QStringList &overlays = QStringList()); /** * \relates KIconLoader * Load a small icon, and apply the necessary effects to get an IconSet. * @deprecated use QIcon::fromTheme instead */ -#ifndef KICONTHEMES_NO_DEPRECATED KICONTHEMES_DEPRECATED_EXPORT QIcon SmallIconSet(const QString &name, int size = 0); -#endif /** * \relates KIconLoader * Load a main toolbar icon. + * @deprecated since 5.63. Prefer QIcon::fromTheme instead where possible, + * if you need a pixmap use QIcon::pixmap with KIconLoader::StdSizes, + * if you need the overlay, use KIconLoader::loadIcon. */ -KICONTHEMES_EXPORT QPixmap MainBarIcon(const QString &name, int size = 0, +KICONTHEMES_DEPRECATED_EXPORT QPixmap MainBarIcon(const QString &name, int size = 0, int state = KIconLoader::DefaultState, const QStringList &overlays = QStringList()); /** * \relates KIconLoader * Load a main toolbar icon, and apply the effects to get an IconSet. * @deprecated use QIcon::fromTheme instead */ -#ifndef KICONTHEMES_NO_DEPRECATED KICONTHEMES_DEPRECATED_EXPORT QIcon MainBarIconSet(const QString &name, int size = 0); #endif diff --git a/src/kiconloader.cpp b/src/kiconloader.cpp --- a/src/kiconloader.cpp +++ b/src/kiconloader.cpp @@ -1699,59 +1699,53 @@ // Easy access functions +#ifndef KICONTHEMES_NO_DEPRECATED QPixmap DesktopIcon(const QString &name, int force_size, int state, const QStringList &overlays) { KIconLoader *loader = KIconLoader::global(); return loader->loadIcon(name, KIconLoader::Desktop, force_size, state, overlays); } // deprecated -#ifndef KICONTHEMES_NO_DEPRECATED QIcon DesktopIconSet(const QString &name, int force_size) { KIconLoader *loader = KIconLoader::global(); return loader->loadIconSet(name, KIconLoader::Desktop, force_size); } -#endif QPixmap BarIcon(const QString &name, int force_size, int state, const QStringList &overlays) { KIconLoader *loader = KIconLoader::global(); return loader->loadIcon(name, KIconLoader::Toolbar, force_size, state, overlays); } // deprecated -#ifndef KICONTHEMES_NO_DEPRECATED QIcon BarIconSet(const QString &name, int force_size) { KIconLoader *loader = KIconLoader::global(); return loader->loadIconSet(name, KIconLoader::Toolbar, force_size); } -#endif QPixmap SmallIcon(const QString &name, int force_size, int state, const QStringList &overlays) { KIconLoader *loader = KIconLoader::global(); return loader->loadIcon(name, KIconLoader::Small, force_size, state, overlays); } // deprecated -#ifndef KICONTHEMES_NO_DEPRECATED QIcon SmallIconSet(const QString &name, int force_size) { KIconLoader *loader = KIconLoader::global(); return loader->loadIconSet(name, KIconLoader::Small, force_size); } -#endif QPixmap MainBarIcon(const QString &name, int force_size, int state, const QStringList &overlays) { KIconLoader *loader = KIconLoader::global(); return loader->loadIcon(name, KIconLoader::MainToolbar, force_size, state, overlays); } // deprecated -#ifndef KICONTHEMES_NO_DEPRECATED QIcon MainBarIconSet(const QString &name, int force_size) { KIconLoader *loader = KIconLoader::global();