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 | | |||
67 | #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 64) | ||||
kossebau: The visibility wrappers also need bumping to 5, 67, so the version were the API got deprecated… | |||||
66 | /** | 68 | /** | ||
67 | * @return the plugin info for this ContainmentActions instance, | 69 | * @return the plugin info for this ContainmentActions instance, | ||
68 | * including name, pluginName and icon | 70 | * including name, pluginName and icon | ||
69 | * @since 5.0 | 71 | * @since 5.0 | ||
72 | * | ||||
73 | * @deprecated since 5.67, use metadata | ||||
broulik: ```
@deprecated since 5.62 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:
```… | |||||
70 | */ | 74 | */ | ||
75 | PLASMA_DEPRECATED_VERSION(5, 67, "use metadata()") | ||||
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… | |||||
71 | KPluginInfo pluginInfo() const; | 76 | KPluginInfo pluginInfo() const; | ||
77 | #endif | ||||
78 | | ||||
79 | /** | ||||
80 | * @return metadata for this ContainmentActions instance | ||||
81 | * including name, pluginName and icon | ||||
82 | * @since 5.62 | ||||
83 | */ | ||||
84 | KPluginMetaData metadata() const; | ||||
72 | 85 | | |||
73 | /** | 86 | /** | ||
74 | * This method should be called once the plugin is loaded or settings are changed. | 87 | * This method should be called once the plugin is loaded or settings are changed. | ||
75 | * @param config Config group to load settings | 88 | * @param config Config group to load settings | ||
76 | * @see init | 89 | * @see init | ||
77 | **/ | 90 | **/ | ||
78 | virtual void restore(const KConfigGroup &config); | 91 | virtual void restore(const KConfigGroup &config); | ||
79 | 92 | | |||
▲ 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.