Commit 54676b38 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix error found by cppcheck

parent 2bdcbba3
......@@ -431,14 +431,14 @@ bool FilterManager::process(const Akonadi::Item &item, bool needsFullPayload, co
return false;
}
bool stopIt = false;
bool applyOnOutbound = false;
if (d->isMatching(item, filter)) {
// do the actual filtering stuff
d->beginFiltering(item);
ItemContext context(item, needsFullPayload);
bool stopIt = false;
bool applyOnOutbound = false;
if (filter->execActions(context, stopIt, applyOnOutbound) == MailCommon::MailFilter::CriticalError) {
return false;
}
......@@ -525,7 +525,7 @@ bool FilterManager::process(const QList< MailFilter * > &mailFilters, const Akon
const bool beforeOutboundOk = ((set & BeforeOutbound) && (*it)->applyBeforeOutbound());
const bool explicitOk = ((set & Explicit) && (*it)->applyOnExplicit());
const bool allFoldersOk = ((set & AllFolders) && (*it)->applyOnAllFoldersInbound());
const bool accountOk = (!account || (account && (*it)->applyOnAccount(accountId)));
const bool accountOk = (!account || (*it)->applyOnAccount(accountId));
if ((inboundOk && accountOk) || (allFoldersOk && accountOk) || outboundOk || beforeOutboundOk || explicitOk) {
// filter is applicable
......
......@@ -90,7 +90,7 @@ QTextDocument *ConfigAgentDelegate::document(const QStyleOptionViewItem &option,
document->addResource(QTextDocument::ImageResource, QUrl(QStringLiteral("status_icon")), s_icons->errorPixmap);
}
QPalette::ColorGroup cg = option.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled;
QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active)) {
cg = QPalette::Inactive;
}
......@@ -139,7 +139,7 @@ void ConfigAgentDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
QPen pen = painter->pen();
QPalette::ColorGroup cg = option.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled;
QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active)) {
cg = QPalette::Inactive;
}
......
......@@ -307,9 +307,9 @@ ComposerPageGeneralTab::ComposerPageGeneralTab(QWidget *parent)
groupGridLayout->addWidget(label, row, 0);
groupGridLayout->addWidget(mAutoSave, row, 1);
++row;
#ifdef KDEPIM_ENTERPRISE_BUILD
++row;
// "Default forwarding type" combobox
mForwardTypeCombo = new KComboBox(false, this);
mForwardTypeCombo->addItems(QStringList() << i18nc("@item:inlistbox Inline mail forwarding",
......@@ -327,7 +327,6 @@ ComposerPageGeneralTab::ComposerPageGeneralTab(QWidget *parent)
groupGridLayout->addWidget(label, row, 0);
groupGridLayout->addWidget(mForwardTypeCombo, row, 1);
++row;
#endif
groupBox->setLayout(groupGridLayout);
......@@ -463,7 +462,6 @@ ComposerPageGeneralTab::ComposerPageGeneralTab(QWidget *parent)
QPushButton *configureCompletionButton = new QPushButton(i18n("Configure Completion..."), this);
connect(configureCompletionButton, &QAbstractButton::clicked, this, &ComposerPageGeneralTab::slotConfigureAddressCompletion);
groupGridLayout->addWidget(configureCompletionButton, row, 1, 1, 2);
++row;
groupBox->setLayout(groupGridLayout);
vb2->addWidget(groupBox);
......
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