Execute upon T12309. The KServiceOffer still takes a 'bool allowedAsDefault', that needs an overload, but in a different patch
Details
- Reviewers
dfaure - Group Reviewers
Frameworks - Commits
- R309:f45bfd1c9fc0: Deprecated allowAsDefault
builds
Diff Detail
- Repository
- R309 KService
- Branch
- allo
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 21215 Build 21233: arc lint + arc unit
src/services/kservice.cpp | ||
---|---|---|
982 | This should be BUILD, not ENABLE. *BUILD* macros are controlled by the EXCLUDE_DEPRECATED_BEFORE_AND_AT value, which iis what is used at build time of the library itself, and then hardcoded with the installed headers. #if KSERVICE_ENABLE_DEPRECATED_SINCE(5, 65) AND KSERVICE_BUILD_DEPRECATED_SINCE(5, 65) While it works to use *ENABLE* also in the sources, like the reuse works in the headers, it is bad practice as it blurs the purposes of the ENABLE vs the BUILD macros, where the latter is only to be set at build time of the library itself. So to not give people wrong ideas, the BUILD macros should be used everywhere where only in the build of the library itself it is deciced via the EXCLUDE_DEPRECATED_BEFORE_AND_AT value whether code should be part of the created library. | |
src/services/kserviceoffer.cpp | ||
98 | KSERVICE_BUILD_DEPRECATED_SINCE |
This makes kde-cli-tools fail to build for me with Qt 5.14 on openSUSE Tumbleweed:
[ 43%] Linking CXX executable ../bin/kioclient5 /home/nate/kde/src/kde-cli-tools/keditfiletype/mimetypedata.cpp: In member function ‘QStringList MimeTypeData::getAppOffers() const’: /home/nate/kde/src/kde-cli-tools/keditfiletype/mimetypedata.cpp:217:20: error: ‘class KService’ has no member named ‘allowAsDefault’ 217 | if ((*it)->allowAsDefault()) | ^~~~~~~~~~~~~~
I guess we found a use case. :)
Removed: https://commits.kde.org/kde-cli-tools/e435a827bba9ebfbe7f988fe063b5848f5ff524b
(also merged to master)
It's not an actual use case for the feature when zero desktop file sets this field :)