File indexing completed on 2024-11-10 04:50:05
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 "filteractionwithuoid.h" 0009 0010 using namespace MailCommon; 0011 0012 FilterActionWithUOID::FilterActionWithUOID(const QString &name, const QString &label, QObject *parent) 0013 : FilterAction(name, label, parent) 0014 , mParameter(0) 0015 { 0016 } 0017 0018 bool FilterActionWithUOID::isEmpty() const 0019 { 0020 return mParameter == 0; 0021 } 0022 0023 void FilterActionWithUOID::argsFromString(const QString &argsStr) 0024 { 0025 bool valid; 0026 const uint val = argsStr.trimmed().toUInt(&valid); 0027 0028 mParameter = valid ? val : 0; 0029 } 0030 0031 QString FilterActionWithUOID::argsAsString() const 0032 { 0033 return QString::number(mParameter); 0034 } 0035 0036 QString FilterActionWithUOID::displayString() const 0037 { 0038 return label() + QLatin1StringView(" \"") + argsAsString().toHtmlEscaped() + QLatin1StringView("\""); 0039 } 0040 0041 #include "moc_filteractionwithuoid.cpp"