Libksieve

sieveactionreturn.cpp
1 /*
2  SPDX-FileCopyrightText: 2013-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 #include "sieveactionreturn.h"
7 #include "editor/sieveeditorutil.h"
8 
9 #include <KLocalizedString>
10 
11 using namespace KSieveUi;
12 SieveActionReturn::SieveActionReturn(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget, QObject *parent)
13  : SieveAction(sieveGraphicalModeWidget, QStringLiteral("return"), i18n("Return"), parent)
14 {
15 }
16 
17 QString SieveActionReturn::code(QWidget *) const
18 {
19  return QStringLiteral("return;");
20 }
21 
22 QUrl SieveActionReturn::href() const
23 {
24  return SieveEditorUtil::helpUrl(SieveEditorUtil::strToVariableName(name()));
25 }
26 
27 QString SieveActionReturn::help() const
28 {
29  return i18n(
30  "The \"return\" command stops processing of the immediately included script only and returns processing control to the script that includes it.");
31 }
32 
33 QStringList SieveActionReturn::needRequires(QWidget * /*parent*/) const
34 {
35  return QStringList() << QStringLiteral("include");
36 }
37 
38 bool SieveActionReturn::needCheckIfServerHasCapability() const
39 {
40  return true;
41 }
42 
43 QString SieveActionReturn::serverNeedsCapability() const
44 {
45  return QStringLiteral("include");
46 }
QString name(const QVariant &location)
QString i18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Apr 11 2021 23:09:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.