Instead of relying on the older KPluginInfo which is slower (parses de metadata twice) and comes from a much higher tier.
Details
- Reviewers
mart - Group Reviewers
Plasma - Commits
- R242:591aceb3f926: Make use of KPluginMetaData where we can
Running plasmashell with it
Diff Detail
- Repository
- R242 Plasma Framework (Library)
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/plasma/containmentactions.h | ||
---|---|---|
71–73 | @deprecated since 5.62 use metadata | |
src/plasma/dataengine.cpp | ||
70 | Where is this constructor used? | |
src/plasma/dataengine.h | ||
82 | Docs, with @since | |
124 | 5 | |
src/plasma/scripting/dataenginescript.cpp | ||
91–96 | Does this need a KPluginMetadata getter? | |
src/plasma/theme.cpp | ||
444 | Does this need a separate metadata() getter? | |
src/plasma/theme.h | ||
323–325 | Separate @deprecated since line |
src/plasma/dataengine.cpp | ||
---|---|---|
70 | Unsure, but we can't remove symbols anyway... |
Also some nitpicks on the style... remember that API dox tool and compiler both need all data duplicated sadly, both deprecated-at version and what-to-do-instead.
Please also compare https://community.kde.org/Policies/Library_Code_Policy#Deprecation_of_API and improve where needed,
src/plasma/containmentactions.h | ||
---|---|---|
73 | Also add Since note to deprecation, for people reading the generated API dox. @deprecated Since 5.66, use metadata() | |
75 | Also recommended: put PLASMA_DEPRECATED_VERSION onto own line, makes parsing the code more easy PLASMA_DEPRECATED_VERSION(5, 64, "use metadata()") KPluginInfo pluginInfo() const; | |
src/plasma/dataengine.h | ||
77 | For people reading the generated API dox, we need to duplicate the recommendation what to do: @deprecated Since 5.66, use xyz | |
80–91 | own line again recommended | |
119 | own line | |
src/plasma/scripting/dataenginescript.h | ||
114 | No visibility wrappers here? (#if PLASMA_ENABLE_DEPRECATED_SINCE(5, 66)) | |
117 | @deprecated Since 5.66, use metadata() | |
src/plasma/theme.h | ||
327 | own line |
src/plasma/containmentactions.h | ||
---|---|---|
67 | The visibility wrappers also need bumping to 5, 67, so the version were the API got deprecated, to not break things for people who use *_DISABLE_DEPRECATED_BEFORE_AND_AT with 5.64-5.66 and who still use this API. Will fix directly now. just mentioning here as reminder for future similar deprecation patches. And yes, this data duplication sucks, but no-one found a way around yet for this macro magic to have the features of control both about visibility and warnings separately. |