diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -87,7 +87,7 @@ GROUP_BASE_NAME KF VERSION ${KF5_VERSION} DEPRECATED_BASE_VERSION 0 - DEPRECATION_VERSIONS 5.0 5.15 5.61 5.63 5.66 + DEPRECATION_VERSIONS 5.0 5.15 5.61 5.63 5.66 5.67 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} ) set(kservice_includes diff --git a/src/services/kservice.h b/src/services/kservice.h --- a/src/services/kservice.h +++ b/src/services/kservice.h @@ -275,6 +275,7 @@ */ bool hasMimeType(const QString &mimeType) const; +#if KSERVICE_ENABLE_DEPRECATED_SINCE(5, 67) /** * Set to true if it is allowed to use this service as the default (main) * action for the files it supports (e.g. Left Click in a file manager, or KRun in general). @@ -284,8 +285,11 @@ * Note that servicemenus supersede this functionality though, at least in konqueror. * * @return true if the service may be used as the default (main) handler + * @deprecated since 5.67 due to no known use case */ + KSERVICE_DEPRECATED_VERSION(5, 67, "No known use case") bool allowAsDefault() const; +#endif /** * Returns the actions defined in this desktop file diff --git a/src/services/kservice.cpp b/src/services/kservice.cpp --- a/src/services/kservice.cpp +++ b/src/services/kservice.cpp @@ -979,11 +979,13 @@ return ret; } +#if KSERVICE_BUILD_DEPRECATED_SINCE(5, 67) bool KService::allowAsDefault() const { Q_D(const KService); return d->m_bAllowAsDefault; } +#endif int KService::initialPreference() const { diff --git a/src/services/kserviceoffer.h b/src/services/kserviceoffer.h --- a/src/services/kserviceoffer.h +++ b/src/services/kserviceoffer.h @@ -77,12 +77,16 @@ */ KServiceOffer &operator=(const KServiceOffer &other); +#if KSERVICE_ENABLE_DEPRECATED_SINCE(5, 67) /** * Is it allowed to use this service for default actions * (e.g. Left Click in a file manager, or KRun in general). * @return true if the service is a allowed as default + * @deprecated since 5.67, no know use case. */ + KSERVICE_DEPRECATED_VERSION(5, 67, "No known use case") bool allowAsDefault() const; +#endif /** * The bigger this number is, the better is this service. diff --git a/src/services/kserviceoffer.cpp b/src/services/kserviceoffer.cpp --- a/src/services/kserviceoffer.cpp +++ b/src/services/kserviceoffer.cpp @@ -95,10 +95,12 @@ return _o.d->preference < d->preference; } +#if KSERVICE_BUILD_DEPRECATED_SINCE(5, 67) bool KServiceOffer::allowAsDefault() const { return d->bAllowAsDefault; } +#endif int KServiceOffer::preference() const {