Changeset View
Changeset View
Standalone View
Standalone View
src/plasma/containmentactions.h
Show All 22 Lines | |||||
23 | #include <QList> | 23 | #include <QList> | ||
24 | 24 | | |||
25 | #include <kplugininfo.h> | 25 | #include <kplugininfo.h> | ||
26 | 26 | | |||
27 | #include <plasma/plasma.h> | 27 | #include <plasma/plasma.h> | ||
28 | #include <plasma/version.h> | 28 | #include <plasma/version.h> | ||
29 | 29 | | |||
30 | class QAction; | 30 | class QAction; | ||
31 | class KPluginMetaData; | ||||
31 | 32 | | |||
32 | namespace Plasma | 33 | namespace Plasma | ||
33 | { | 34 | { | ||
34 | 35 | | |||
35 | class DataEngine; | 36 | class DataEngine; | ||
36 | class Containment; | 37 | class Containment; | ||
37 | class ContainmentActionsPrivate; | 38 | class ContainmentActionsPrivate; | ||
38 | 39 | | |||
Show All 19 Lines | |||||
58 | public: | 59 | public: | ||
59 | /** | 60 | /** | ||
60 | * Default constructor for an empty or null containmentactions | 61 | * Default constructor for an empty or null containmentactions | ||
61 | */ | 62 | */ | ||
62 | explicit ContainmentActions(QObject *parent = nullptr); | 63 | explicit ContainmentActions(QObject *parent = nullptr); | ||
63 | 64 | | |||
64 | ~ContainmentActions(); | 65 | ~ContainmentActions(); | ||
65 | 66 | | |||
66 | /** | 67 | /** | ||
kossebau: The visibility wrappers also need bumping to 5, 67, so the version were the API got deprecated… | |||||
67 | * @return the plugin info for this ContainmentActions instance, | 68 | * @return the plugin info for this ContainmentActions instance, | ||
68 | * including name, pluginName and icon | 69 | * including name, pluginName and icon | ||
69 | * @since 5.0 | 70 | * @since 5.0 | ||
71 | * | ||||
72 | * @deprecated use metadata | ||||
Also add Since note to deprecation, for people reading the generated API dox. @deprecated Since 5.66, use metadata() kossebau: Also add Since note to deprecation, for people reading the generated API dox.
So:
```… | |||||
73 | */ | ||||
74 | PLASMA_DEPRECATED KPluginInfo pluginInfo() const; | ||||
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; kossebau: Also recommended: put PLASMA_DEPRECATED_VERSION onto own line, makes parsing the code more easy… | |||||
75 | | ||||
76 | /** | ||||
77 | * @return metadata for this ContainmentActions instance | ||||
78 | * including name, pluginName and icon | ||||
79 | * @since 5.62 | ||||
broulik: ```
@deprecated since 5.62 use metadata
``` | |||||
70 | */ | 80 | */ | ||
71 | KPluginInfo pluginInfo() const; | 81 | KPluginMetaData metadata() const; | ||
72 | 82 | | |||
73 | /** | 83 | /** | ||
74 | * This method should be called once the plugin is loaded or settings are changed. | 84 | * This method should be called once the plugin is loaded or settings are changed. | ||
75 | * @param config Config group to load settings | 85 | * @param config Config group to load settings | ||
76 | * @see init | 86 | * @see init | ||
77 | **/ | 87 | **/ | ||
78 | virtual void restore(const KConfigGroup &config); | 88 | virtual void restore(const KConfigGroup &config); | ||
79 | 89 | | |||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |
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.