diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -93,7 +93,7 @@ GROUP_BASE_NAME KF VERSION ${KF5_VERSION} DEPRECATED_BASE_VERSION 0 - DEPRECATION_VERSIONS 4.0 4.1 4.3 4.4 4.5 4.6 4.7 5.0 5.4 5.6 5.25 5.31 5.32 5.64 + DEPRECATION_VERSIONS 4.0 4.1 4.3 4.4 4.5 4.6 4.7 5.0 5.4 5.6 5.25 5.31 5.32 5.64 5.65 ) # TODO: add support for EXCLUDE_DEPRECATED_BEFORE_AND_AT to all KIO libs # needs fixing of undeprecated API being still implemented using own deprecated API diff --git a/src/widgets/kurlpixmapprovider.h b/src/widgets/kurlpixmapprovider.h --- a/src/widgets/kurlpixmapprovider.h +++ b/src/widgets/kurlpixmapprovider.h @@ -40,18 +40,24 @@ * * @short Resolves pixmaps for URLs * @author Carsten Pfeiffer + * + * @deprecated since 5.65, use KIO::iconNameForUrl to get the icon name and use QIcon::fromTheme */ +#if KIOWIDGETS_ENABLE_DEPRECATED_SINCE(5, 65) + class KIOWIDGETS_EXPORT KUrlPixmapProvider : public KPixmapProvider { public: /** * Creates a new url pixmap provider. */ + KIOWIDGETS_DEPRECATED_VERSION(5, 65, "Use KIO::iconNameForUrl to get the icon name and use QIcon::fromTheme") KUrlPixmapProvider(); /** * Destroys the url pixmap provider. */ + KIOWIDGETS_DEPRECATED_VERSION(5, 65, "Use KIO::iconNameForUrl to get the icon name and use QIcon::fromTheme") ~KUrlPixmapProvider(); /** @@ -64,6 +70,7 @@ * @return the resulting pixmap * @see KIconLoader::StdSizes */ + KIOWIDGETS_DEPRECATED_VERSION(5, 65, "Use KIO::iconNameForUrl to get the icon name and use QIcon::fromTheme") QPixmap pixmapFor(const QString &url, int size = 0) override; protected: void virtual_hook(int id, void *data) override; @@ -73,4 +80,6 @@ Private *const d; }; +#endif + #endif // KURLPIXMAPPROVIDER_H diff --git a/src/widgets/kurlpixmapprovider.cpp b/src/widgets/kurlpixmapprovider.cpp --- a/src/widgets/kurlpixmapprovider.cpp +++ b/src/widgets/kurlpixmapprovider.cpp @@ -23,6 +23,8 @@ #include #include +#if KIOWIDGETS_ENABLE_DEPRECATED_SINCE(5, 65) + KUrlPixmapProvider::KUrlPixmapProvider() : d(nullptr) { @@ -42,3 +44,5 @@ { KPixmapProvider::virtual_hook(id, data); } + +#endif