File indexing completed on 2024-09-22 04:50:00

0001 /*
0002  * SPDX-FileCopyrightText: 1996-1998 Stefan Taferner <taferner@kde.org>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-or-later
0005  *
0006  */
0007 
0008 #include "filteractionpipethrough.h"
0009 
0010 #include <KLocalizedString>
0011 
0012 using namespace MailCommon;
0013 
0014 FilterAction *FilterActionPipeThrough::newAction()
0015 {
0016     return new FilterActionPipeThrough;
0017 }
0018 
0019 FilterActionPipeThrough::FilterActionPipeThrough(QObject *parent)
0020     : FilterActionWithCommand(QStringLiteral("filter app"), i18nc("pipe through with command", "Pipe Through"), parent)
0021 {
0022 }
0023 
0024 FilterAction::ReturnCode FilterActionPipeThrough::process(ItemContext &context, bool) const
0025 {
0026     return FilterActionWithCommand::genericProcess(context, true); // use output
0027 }
0028 
0029 SearchRule::RequiredPart FilterActionPipeThrough::requiredPart() const
0030 {
0031     return SearchRule::CompleteMessage;
0032 }
0033 
0034 QString FilterActionPipeThrough::informationAboutNotValidAction() const
0035 {
0036     return i18n("No action defined.");
0037 }
0038 
0039 #include "moc_filteractionpipethrough.cpp"