Changeset View
Changeset View
Standalone View
Standalone View
src/filter/mailfilter.h
Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Line(s) | 193 | /** Set whether this filter should be applied on | |||
---|---|---|---|---|---|
194 | inbound messages for all accounts (@p aApply == All) or | 194 | inbound messages for all accounts (@p aApply == All) or | ||
195 | inbound messages for all but IMAP accounts (@p aApply == ButImap) or | 195 | inbound messages for all but IMAP accounts (@p aApply == ButImap) or | ||
196 | for a specified set of accounts only. | 196 | for a specified set of accounts only. | ||
197 | Only applicable to filters that are applied on inbound messages. | 197 | Only applicable to filters that are applied on inbound messages. | ||
198 | @see setApplyOnInbound setApplyOnAccount | 198 | @see setApplyOnInbound setApplyOnAccount | ||
199 | */ | 199 | */ | ||
200 | void setApplicability(AccountType aApply = All); | 200 | void setApplicability(AccountType aApply = All); | ||
201 | 201 | | |||
202 | /** Sets whether the filter should be applied on inbound emails in all | ||||
203 | folders, not just Inbox. | ||||
204 | */ | ||||
205 | void setApplyOnAllFoldersInbound(bool aApply = true); | ||||
mlaurent: why adding a default value here ? | |||||
The other similar setApply* methods also have a default value, so I used it here too just to keep the API consistent. dvratil: The other similar setApply* methods also have a default value, so I used it here too just to… | |||||
mlaurent: Ah ok API seems wierd.
I will look at if after your commit.
| |||||
206 | | ||||
207 | /** Returns whether the filter should be applied on inbound emails in all | ||||
208 | folders, not just Inbox. | ||||
209 | */ | ||||
210 | bool applyOnAllFoldersInbound() const; | ||||
211 | | ||||
202 | /** @return true if this filter should be applied on | 212 | /** @return true if this filter should be applied on | ||
203 | inbound messages for all accounts, or false if this filter | 213 | inbound messages for all accounts, or false if this filter | ||
204 | is to be applied on a specified set of accounts only. | 214 | is to be applied on a specified set of accounts only. | ||
205 | Only applicable to filters that are applied on inbound messages. | 215 | Only applicable to filters that are applied on inbound messages. | ||
206 | @see setApplicability | 216 | @see setApplicability | ||
207 | */ | 217 | */ | ||
208 | AccountType applicability() const; | 218 | AccountType applicability() const; | ||
209 | 219 | | |||
▲ Show 20 Lines • Show All 112 Lines • ▼ Show 20 Line(s) | 328 | private: | |||
322 | QStringList mAccounts; | 332 | QStringList mAccounts; | ||
323 | QString mIcon; | 333 | QString mIcon; | ||
324 | QString mToolbarName; | 334 | QString mToolbarName; | ||
325 | QKeySequence mShortcut; | 335 | QKeySequence mShortcut; | ||
326 | bool bApplyOnInbound : 1; | 336 | bool bApplyOnInbound : 1; | ||
327 | bool bApplyBeforeOutbound : 1; | 337 | bool bApplyBeforeOutbound : 1; | ||
328 | bool bApplyOnOutbound : 1; | 338 | bool bApplyOnOutbound : 1; | ||
329 | bool bApplyOnExplicit : 1; | 339 | bool bApplyOnExplicit : 1; | ||
340 | bool bApplyOnAllFolders : 1; | ||||
330 | bool bStopProcessingHere : 1; | 341 | bool bStopProcessingHere : 1; | ||
331 | bool bConfigureShortcut : 1; | 342 | bool bConfigureShortcut : 1; | ||
332 | bool bConfigureToolbar : 1; | 343 | bool bConfigureToolbar : 1; | ||
333 | bool bAutoNaming : 1; | 344 | bool bAutoNaming : 1; | ||
334 | bool bEnabled : 1; | 345 | bool bEnabled : 1; | ||
335 | AccountType mApplicability; | 346 | AccountType mApplicability; | ||
336 | }; | 347 | }; | ||
337 | 348 | | |||
338 | MAILCOMMON_EXPORT QDataStream &operator<<(QDataStream &stream, const MailFilter &filter); | 349 | MAILCOMMON_EXPORT QDataStream &operator<<(QDataStream &stream, const MailFilter &filter); | ||
339 | MAILCOMMON_EXPORT QDataStream &operator>>(QDataStream &stream, MailFilter &filter); | 350 | MAILCOMMON_EXPORT QDataStream &operator>>(QDataStream &stream, MailFilter &filter); | ||
340 | } | 351 | } | ||
341 | 352 | | |||
342 | #endif /*MAILCOMMON_MAILFILTER_H*/ | 353 | #endif /*MAILCOMMON_MAILFILTER_H*/ |
why adding a default value here ?