Commit 0a7c142d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy wazrning

parent 898e1123
......@@ -33,7 +33,7 @@ using namespace MailCommon;
FilterActionAddHeader::FilterActionAddHeader(QObject *parent)
: FilterActionWithStringList(QStringLiteral("add header"), i18n("Add Header"), parent)
{
mParameterList << QStringLiteral("")
mParameterList << QString()
<< QStringLiteral("Reply-To")
<< QStringLiteral("Delivered-To")
<< QStringLiteral("X-KDE-PR-Message")
......
......@@ -34,7 +34,7 @@ FilterAction *FilterActionRemoveHeader::newAction()
FilterActionRemoveHeader::FilterActionRemoveHeader(QObject *parent)
: FilterActionWithStringList(QStringLiteral("remove header"), i18n("Remove Header"), parent)
{
mParameterList << QStringLiteral("")
mParameterList << QString()
<< QStringLiteral("Reply-To")
<< QStringLiteral("Delivered-To")
<< QStringLiteral("X-KDE-PR-Message")
......
......@@ -37,7 +37,7 @@ FilterAction *FilterActionRewriteHeader::newAction()
FilterActionRewriteHeader::FilterActionRewriteHeader(QObject *parent)
: FilterActionWithStringList(QStringLiteral("rewrite header"), i18n("Rewrite Header"), parent)
{
mParameterList << QStringLiteral("")
mParameterList << QString()
<< QStringLiteral("Subject")
<< QStringLiteral("Reply-To")
<< QStringLiteral("Delivered-To")
......
......@@ -30,6 +30,7 @@ class FolderCollectionMonitor;
class FilterTestKernel : public QObject, public MailCommon::IKernel, public MailCommon::ISettings
{
Q_OBJECT
public:
explicit FilterTestKernel(QObject *parent = nullptr);
......
......@@ -68,7 +68,7 @@ void FilterImporterBalsa::parseFilter(const KConfigGroup &grp)
filter->setToolbarName(name);
//TODO not implemented in kmail.
const QString popupText = grp.readEntry(QStringLiteral("Popup-text"));
//const QString popupText = grp.readEntry(QStringLiteral("Popup-text"));
const QString sound = grp.readEntry(QStringLiteral("Sound"));
if (!sound.isEmpty()) {
......
......@@ -381,7 +381,7 @@ void KMFilterListBox::applyFilterChanged(bool closeAfterSaving)
QList<MailFilter *> KMFilterListBox::filtersForSaving(bool closeAfterSaving, bool &wasCanceled) const
{
const_cast<KMFilterListBox *>(this)->applyWidgets(); // signals aren't const
Q_EMIT const_cast<KMFilterListBox *>(this)->applyWidgets(); // signals aren't const
QList<MailFilter *> filters;
QStringList emptyFilters;
QVector<MailCommon::InvalidFilterInfo> listInvalidFilters;
......
......@@ -541,19 +541,19 @@ void MailFilter::writeConfig(KConfigGroup &config, bool exportFilter) const
QStringList sets;
if (bApplyOnInbound) {
sets.append(QLatin1String("check-mail"));
sets.append(QStringLiteral("check-mail"));
}
if (bApplyBeforeOutbound) {
sets.append(QLatin1String("before-send-mail"));
sets.append(QStringLiteral("before-send-mail"));
}
if (bApplyOnOutbound) {
sets.append(QLatin1String("send-mail"));
sets.append(QStringLiteral("send-mail"));
}
if (bApplyOnExplicit) {
sets.append(QLatin1String("manual-filtering"));
sets.append(QStringLiteral("manual-filtering"));
}
if (bApplyOnAllFolders) {
sets.append(QLatin1String("all-folders"));
sets.append(QStringLiteral("all-folders"));
}
config.writeEntry("apply-on", sets);
......
......@@ -35,8 +35,9 @@
using namespace MailCommon;
//----------------------------------------------------------------------------
FolderJob::FolderJob()
: mErrorCode(0)
FolderJob::FolderJob(QObject *parent)
: QObject(parent)
, mErrorCode(0)
, mStarted(false)
, mCancellable(false)
{
......
......@@ -40,7 +40,7 @@ class MAILCOMMON_EXPORT FolderJob : public QObject
Q_OBJECT
public:
FolderJob();
explicit FolderJob(QObject *parent = nullptr);
virtual ~FolderJob();
......
......@@ -396,12 +396,12 @@ void SearchRuleWidget::initFieldList(SearchPatternEdit::SearchPatternEditOptions
// these others only represent message headers and you can add to
// them as you like
mFilterFieldList.append(QLatin1String("List-Id"));
mFilterFieldList.append(QLatin1String("Resent-From"));
mFilterFieldList.append(QLatin1String("X-Loop"));
mFilterFieldList.append(QLatin1String("X-Mailing-List"));
mFilterFieldList.append(QLatin1String("X-Spam-Flag"));
mFilterFieldList.append(QLatin1String("X-Spam-Status"));
mFilterFieldList.append(QStringLiteral("List-Id"));
mFilterFieldList.append(QStringLiteral("Resent-From"));
mFilterFieldList.append(QStringLiteral("X-Loop"));
mFilterFieldList.append(QStringLiteral("X-Mailing-List"));
mFilterFieldList.append(QStringLiteral("X-Spam-Flag"));
mFilterFieldList.append(QStringLiteral("X-Spam-Status"));
}
void SearchRuleWidget::slotRuleFieldChanged(const QString &field)
......
......@@ -403,7 +403,7 @@ void SearchRule::generateSieveScript(QStringList &requireModules, QString &code)
code += QLatin1Char('"') + i18n("\"%1\" is not supported with condition \"%2\"", QLatin1String(mField), conditionToString(mFunction)) + QLatin1Char('"');
return;
}
code += (negative ? QStringLiteral("not ") : QString()) + QStringLiteral("body :text %1 \"%2\"").arg(comparaison).arg(contentStr);
code += (negative ? QStringLiteral("not ") : QString()) + QStringLiteral("body :text %1 \"%2\"").arg(comparaison, contentStr);
} else {
QString comparaison;
bool negative = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment