From 533ff88a5430655f3b969b3e1a86ac71064c57ef Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Sun, 18 Apr 2021 21:46:56 +0200 Subject: Deprecate KDesktopFile::readDevice() Since the FSDevice .desktop template hasn't been installed for a long time, this method in KDesktopFile hasn't been useful. The whole FSDesktop concept seems to be redundant nowadays, since CDRom and Floppy drives have been replaced by USB sticks. See this KF6 taks for more details: https://phabricator.kde.org/T14295#253759 --- src/core/CMakeLists.txt | 2 +- src/core/kdesktopfile.cpp | 2 ++ src/core/kdesktopfile.h | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index eb16d039..0c0aa72c 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -31,7 +31,7 @@ ecm_generate_export_header(KF5ConfigCore GROUP_BASE_NAME KF VERSION ${KF_VERSION} DEPRECATED_BASE_VERSION 0 - DEPRECATION_VERSIONS 4.0 5.0 5.24 5.42 + DEPRECATION_VERSIONS 4.0 5.0 5.24 5.42 5.82 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} ) diff --git a/src/core/kdesktopfile.cpp b/src/core/kdesktopfile.cpp index cae8b98d..338692e6 100644 --- a/src/core/kdesktopfile.cpp +++ b/src/core/kdesktopfile.cpp @@ -206,11 +206,13 @@ QString KDesktopFile::readPath() const return d->desktopGroup.readEntry("Path", QString()); } +#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 82) QString KDesktopFile::readDevice() const { Q_D(const KDesktopFile); return d->desktopGroup.readEntry("Dev", QString()); } +#endif QString KDesktopFile::readUrl() const { diff --git a/src/core/kdesktopfile.h b/src/core/kdesktopfile.h index c98bf1bb..25420083 100644 --- a/src/core/kdesktopfile.h +++ b/src/core/kdesktopfile.h @@ -129,11 +129,16 @@ public: */ QString readPath() const; +#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 82) /** * Returns the value of the "Dev=" entry. * @return the device or QString() if not specified + * @deprecated since 5.82, for lack of usage, the FSDevice .desktop template + * hadn't been installed for a long time. */ + KCONFIGCORE_DEPRECATED_VERSION(5, 82, "For lack of usage.") QString readDevice() const; +#endif /** * Returns the value of the "URL=" entry. -- cgit v1.2.1