diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -106,7 +106,7 @@ GROUP_BASE_NAME KF VERSION ${KF5_VERSION} DEPRECATED_BASE_VERSION 0 - DEPRECATION_VERSIONS 5.0 5.13 5.63 + DEPRECATION_VERSIONS 5.0 5.13 5.63 5.65 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} ) diff --git a/src/kurllabel.h b/src/kurllabel.h --- a/src/kurllabel.h +++ b/src/kurllabel.h @@ -275,59 +275,71 @@ * @param url The URL for this label. */ void enteredUrl(const QString &url); - +#if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 65) /** * Emitted when the mouse has passed over the label. + * @deprecated Since 5.65, use enteredUrl(const QString &url); */ + KWIDGETSADDONS_DEPRECATED_VERSION(5, 65, "Use KUrlLabel::enteredUrl(const QString&)") void enteredUrl(); - +#endif /** * Emitted when the mouse is no longer over the label. * * @param url The URL for this label. */ void leftUrl(const QString &url); +#if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 65) /** * Emitted when the mouse is no longer over the label. + * @deprecated Since 5.65, use leftUrl(const QString &url); */ + KWIDGETSADDONS_DEPRECATED_VERSION(5, 65, "Use KUrlLabel::leftUrl(const QString&)") void leftUrl(); - +#endif /** * Emitted when the user clicked the left mouse button on this label. * * @param url The URL for this label. */ void leftClickedUrl(const QString &url); - +#if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 65) /** * Emitted when the user clicked the left mouse button on this label. + * @deprecated Since 5.65, use leftClickedUrl(const QString &url); */ + KWIDGETSADDONS_DEPRECATED_VERSION(5, 65, "Use KUrlLabel::leftClickedUrl(const QString&)") void leftClickedUrl(); - +#endif /** * Emitted when the user clicked the right mouse button on this label. * * @param url The URL for this label. */ void rightClickedUrl(const QString &url); - +#if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 65) /** * Emitted when the user clicked the right mouse button on this label. + * @deprecated Since 5.65, use rightClickedUrl(const QString &url); */ + KWIDGETSADDONS_DEPRECATED_VERSION(5, 65, "Use KUrlLabel::rightClickedUrl(const QString&)") void rightClickedUrl(); - +#endif /** * Emitted when the user clicked the middle mouse button on this label. * * @param url The URL for this label. */ void middleClickedUrl(const QString &url); - +#if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 65) /** * Emitted when the user clicked the left mouse button on this label. + * @deprecated Since 5.65, use middleClickedUrl(const QString &url); */ + KWIDGETSADDONS_DEPRECATED_VERSION(5, 65, "Use KUrlLabel::middleClickedUrl(const QString&)") void middleClickedUrl(); +#endif protected: /** diff --git a/src/kurllabel.cpp b/src/kurllabel.cpp --- a/src/kurllabel.cpp +++ b/src/kurllabel.cpp @@ -115,17 +115,23 @@ switch (event->button()) { case Qt::LeftButton: +#if KWIDGETSADDONS_BUILD_DEPRECATED_SINCE(5, 65) emit leftClickedUrl(); +#endif emit leftClickedUrl(d->url); break; case Qt::MidButton: +#if KWIDGETSADDONS_BUILD_DEPRECATED_SINCE(5, 65) emit middleClickedUrl(); +#endif emit middleClickedUrl(d->url); break; case Qt::RightButton: +#if KWIDGETSADDONS_BUILD_DEPRECATED_SINCE(5, 65) emit rightClickedUrl(); +#endif emit rightClickedUrl(d->url); break; @@ -291,8 +297,9 @@ setUnderline(true); } } - +#if KWIDGETSADDONS_BUILD_DEPRECATED_SINCE(5, 65) emit enteredUrl(); +#endif emit enteredUrl(d->url); } @@ -309,8 +316,9 @@ } setUnderline(d->realUnderlined); - +#if KWIDGETSADDONS_BUILD_DEPRECATED_SINCE(5, 65) emit leftUrl(); +#endif emit leftUrl(d->url); }