8#include "filteractionsetstatus.h"
9#include "mailcommon_debug.h"
10#include <Akonadi/MessageStatus>
11#include <KLocalizedString>
16 return new FilterActionSetStatus;
19FilterActionSetStatus::FilterActionSetStatus(
QObject *parent)
20 : FilterActionStatus(QStringLiteral(
"set status"),
i18n(
"Mark As"), parent)
24bool FilterActionSetStatus::isEmpty()
const
26 const int index = mParameterList.
indexOf(mParameter);
30QString FilterActionSetStatus::informationAboutNotValidAction()
const
32 return i18n(
"Status not specified.");
37 const int index = mParameterList.
indexOf(mParameter);
65QString FilterActionSetStatus::sieveCode()
const
68 const QString parameter = argsAsString();
70 flagCode = QStringLiteral(
"\\\\Seen");
72 flagCode = QStringLiteral(
"\\\\Deleted");
74 flagCode = QStringLiteral(
"\\\\Answered");
76 qCDebug(MAILCOMMON_LOG) <<
" FilterActionSetStatus::sieveCode() unknown flags" << parameter;
80 const QString result = QStringLiteral(
"setflag \"%1\";").
arg(flagCode);
84QStringList FilterActionSetStatus::sieveRequires()
const
86 return QStringList() << QStringLiteral(
"imap4flags");
89#include "moc_filteractionsetstatus.cpp"
void setFlags(const Flags &flags)
static const MessageStatus statusUnread()
void setStatusFromFlags(const QSet< QByteArray > &flags)
Abstract base class for mail filter actions.
ReturnCode
Describes the possible return codes of filter processing:
@ ErrorButGoOn
A non-critical error occurred.
@ GoOn
Go on with applying filter actions.
A helper class for the filtering process.
Akonadi::Item & item()
Returns the item of the context.
void setNeedsFlagStore()
Marks that the item's flags has been changed and needs to be written back.
RequiredPart
Possible required parts.
Q_SCRIPTABLE CaptureState status()
QString i18n(const char *text, const TYPE &arg...)
QString arg(Args &&... args) const const
qsizetype indexOf(const QRegularExpression &re, qsizetype from) const const