Changeset View
Standalone View
src/abstractrunner.h
Show First 20 Lines • Show All 140 Lines • ▼ Show 20 Line(s) | 70 | public: | |||
---|---|---|---|---|---|
141 | 141 | | |||
142 | /** | 142 | /** | ||
143 | * Triggers a call to match. This will call match() internally. | 143 | * Triggers a call to match. This will call match() internally. | ||
144 | * | 144 | * | ||
145 | * @param context the search context used in executing this match. | 145 | * @param context the search context used in executing this match. | ||
146 | */ | 146 | */ | ||
147 | void performMatch(Plasma::RunnerContext &context); | 147 | void performMatch(Plasma::RunnerContext &context); | ||
148 | 148 | | |||
149 | #if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 70) | ||||
149 | /** | 150 | /** | ||
150 | * If the runner has options that the user can interact with to modify | 151 | * If the runner has options that the user can interact with to modify | ||
151 | * what happens when run or one of the actions created in match | 152 | * what happens when run or one of the actions created in match | ||
152 | * is called, the runner should return true | 153 | * is called, the runner should return true | ||
154 | * @deprecated since 5.70, feature removed since version 5.0 | ||||
kossebau: The text in the API dox can stay "Since 5.0".
The only crititical thing where the number of… | |||||
That makes sense, but I want to express that this method has been defunct since version 5.0 alex: That makes sense, but I want to express that this method has been defunct since version 5.0
so… | |||||
I would just say in the docs "@deprecated Since 5,0, this feature has been defunct". This is what has been done elsewhere where API got retrroactively tagged as deprecated. This is just text in the docs, now with up-to-date information, so other than the macros will not affect anything. kossebau: I would just say in the docs "@deprecated Since 5,0, this feature has been defunct". This is… | |||||
Should be "5.0", not "5,0" here in the API dox text and elsewhere, no? (dot instead of comma) kossebau: Should be "5.0", not "5,0" here in the API dox text and elsewhere, no? (dot instead of comma) | |||||
alex: Yes. I accidentally did it this way, because in German you use a comma :D | |||||
153 | */ | 155 | */ | ||
156 | KRUNNER_DEPRECATED_VERSION(5, 70, "No longer use, feature removed") | ||||
ECMGenerateExportHeader now (for 5.71) features support for using a different version number to be shown in the compiler warning: KRUNNER_DEPRECATED_VERSION_BELATED So you could make this: KRUNNER_DEPRECATED_VERSION_BELATED(5, 71, 5, 0, "No longer use, feature removed") kossebau: ECMGenerateExportHeader now (for 5.71) features support for using a different version number to… | |||||
alex: This is pretty cool, many thanks again. | |||||
154 | bool hasRunOptions(); | 157 | bool hasRunOptions(); | ||
158 | #endif | ||||
155 | 159 | | |||
160 | #if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 70) | ||||
156 | /** | 161 | /** | ||
157 | * If hasRunOptions() returns true, this method may be called to get | 162 | * If hasRunOptions() returns true, this method may be called to get | ||
158 | * a widget displaying the options the user can interact with to modify | 163 | * a widget displaying the options the user can interact with to modify | ||
159 | * the behaviour of what happens when a given match is selected. | 164 | * the behaviour of what happens when a given match is selected. | ||
160 | * | 165 | * | ||
161 | * @param widget the parent of the options widgets. | 166 | * @param widget the parent of the options widgets. | ||
167 | * @deprecated since 5.70, feature removed since version 5.0 | ||||
162 | */ | 168 | */ | ||
169 | KRUNNER_DEPRECATED_VERSION(5, 70, "No longer use, feature removed") | ||||
163 | virtual void createRunOptions(QWidget *widget); | 170 | virtual void createRunOptions(QWidget *widget); | ||
171 | #endif | ||||
164 | 172 | | |||
165 | /** | 173 | /** | ||
166 | * Called whenever an exact or possible match associated with this | 174 | * Called whenever an exact or possible match associated with this | ||
167 | * runner is triggered. | 175 | * runner is triggered. | ||
168 | * | 176 | * | ||
169 | * @param context The context in which the match is triggered, i.e. for which | 177 | * @param context The context in which the match is triggered, i.e. for which | ||
170 | * the match was created. | 178 | * the match was created. | ||
171 | * @param match The actual match to run/execute. | 179 | * @param match The actual match to run/execute. | ||
▲ Show 20 Lines • Show All 153 Lines • ▼ Show 20 Line(s) | 321 | protected: | |||
325 | */ | 333 | */ | ||
326 | void suspendMatching(bool suspend); | 334 | void suspendMatching(bool suspend); | ||
327 | 335 | | |||
328 | /** | 336 | /** | ||
329 | * Provides access to the runner's configuration object. | 337 | * Provides access to the runner's configuration object. | ||
330 | */ | 338 | */ | ||
331 | KConfigGroup config() const; | 339 | KConfigGroup config() const; | ||
332 | 340 | | |||
341 | #if KRUNNER_ENABLE_DEPRECATED_SINCE(5, 70) | ||||
333 | /** | 342 | /** | ||
334 | * Sets whether or not the runner has options for matches | 343 | * Sets whether or not the runner has options for matches | ||
344 | * @deprecated since 5.70, feature removed since version 5.0 | ||||
335 | */ | 345 | */ | ||
346 | KRUNNER_DEPRECATED_VERSION(5, 70, "No longer use, feature removed") | ||||
336 | void setHasRunOptions(bool hasRunOptions); | 347 | void setHasRunOptions(bool hasRunOptions); | ||
348 | #endif | ||||
337 | 349 | | |||
338 | /** | 350 | /** | ||
339 | * Sets the nominal speed of the runner. Only slow runners need | 351 | * Sets the nominal speed of the runner. Only slow runners need | ||
340 | * to call this within their constructor because the default | 352 | * to call this within their constructor because the default | ||
341 | * speed is NormalSpeed. Runners that use D-Bus should call | 353 | * speed is NormalSpeed. Runners that use D-Bus should call | ||
342 | * this within their constructors. | 354 | * this within their constructors. | ||
343 | */ | 355 | */ | ||
344 | void setSpeed(Speed newSpeed); | 356 | void setSpeed(Speed newSpeed); | ||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |
The text in the API dox can stay "Since 5.0".
The only crititical thing where the number of an older, already released version should not be used is the KRUNNER_ENABLE_DEPRECATED_SINCE macro. Because that reacts to KF_DISABLE_DEPRECATED_BEFORE_AND_AT (or KRUNNER_DISABLE_DEPRECATED_BEFORE_AND_AT if set). And someone using, say KF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x050000 in their projects because they checked their software and it has not used any deprecated API up to that version, and who still uses this newly deprecated API, would suddenly get no longer building software, which especially is annoying with already released code.
So: when retroactively tagging deprecated API, in the API dox text mention the correct version where actual deprecation happened, in the macros the version of the upcoming release where the deprecation macros are first existing for API users. Makes sense?