Commit 640dd469 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: coding style

parent db49d8ed
......@@ -138,14 +138,14 @@ void CollectionExpiryPage::load(const Akonadi::Collection &collection)
int daysToExpireRead, daysToExpireUnread;
attr->daysToExpire(daysToExpireUnread, daysToExpireRead);
if (expiryGloballyOn
&& attr->readExpireUnits() != ExpireCollectionAttribute::ExpireNever
&& daysToExpireRead >= 0) {
&& attr->readExpireUnits() != ExpireCollectionAttribute::ExpireNever
&& daysToExpireRead >= 0) {
expireReadMailCB->setChecked(true);
expireReadMailSB->setValue(daysToExpireRead);
}
if (expiryGloballyOn
&& attr->unreadExpireUnits() != ExpireCollectionAttribute::ExpireNever
&& daysToExpireUnread >= 0) {
&& attr->unreadExpireUnits() != ExpireCollectionAttribute::ExpireNever
&& daysToExpireUnread >= 0) {
expireUnreadMailCB->setChecked(true);
expireUnreadMailSB->setValue(daysToExpireUnread);
}
......
......@@ -60,20 +60,20 @@ QWidget *FilterActionAddTag::createParamWidget(QWidget *parent) const
void FilterActionAddTag::applyParamWidgetValue(QWidget *paramWidget)
{
auto combo = static_cast<QComboBox*>(paramWidget);
auto combo = static_cast<QComboBox *>(paramWidget);
mParameter = combo->itemData(combo->currentIndex()).toString();
}
void FilterActionAddTag::setParamWidgetValue(QWidget *paramWidget) const
{
const int index = static_cast<QComboBox*>(paramWidget)->findData(mParameter);
const int index = static_cast<QComboBox *>(paramWidget)->findData(mParameter);
static_cast<QComboBox*>(paramWidget)->setCurrentIndex(index < 0 ? 0 : index);
static_cast<QComboBox *>(paramWidget)->setCurrentIndex(index < 0 ? 0 : index);
}
void FilterActionAddTag::clearParamWidget(QWidget *paramWidget) const
{
static_cast<QComboBox*>(paramWidget)->setCurrentIndex(0);
static_cast<QComboBox *>(paramWidget)->setCurrentIndex(0);
}
bool FilterActionAddTag::isEmpty() const
......
......@@ -99,7 +99,6 @@ void FolderCollectionMonitor::expireAllCollection(const QAbstractItemModel *mode
const MailCommon::ExpireCollectionAttribute *attr = collection.attribute<MailCommon::ExpireCollectionAttribute>();
if (attr) {
if (attr->isAutoExpire()) {
MailCommon::Util::expireOldMessages(collection, immediate);
}
......
......@@ -65,8 +65,7 @@ public:
explicit FolderTreeWidget(
QWidget *parent = nullptr, KXMLGUIClient *xmlGuiClient = nullptr, TreeViewOptions options = (TreeViewOptions)(ShowUnreadCount
|ShowCollectionStatisticAnimation),
FolderTreeWidgetProxyModel::FolderTreeWidgetProxyModelOptions optReadableProxy = FolderTreeWidgetProxyModel::None);
|ShowCollectionStatisticAnimation), FolderTreeWidgetProxyModel::FolderTreeWidgetProxyModelOptions optReadableProxy = FolderTreeWidgetProxyModel::None);
~FolderTreeWidget();
/**
......
......@@ -87,7 +87,6 @@ void ExpireJob::execute()
const MailCommon::ExpireCollectionAttribute *expirationAttribute = mSrcFolder.attribute<MailCommon::ExpireCollectionAttribute>();
if (expirationAttribute) {
expirationAttribute->daysToExpire(unreadDays, readDays);
if (unreadDays > 0) {
......
......@@ -174,8 +174,7 @@ public:
* which will be used to initialize the widget.
*/
explicit SearchRuleWidget(QWidget *parent = nullptr,
MailCommon::SearchRule::Ptr aRule = MailCommon::SearchRule::Ptr(),
SearchPatternEdit::SearchPatternEditOptions options = (SearchPatternEdit::SearchPatternEditOptions)(SearchPatternEdit::None),
MailCommon::SearchRule::Ptr aRule = MailCommon::SearchRule::Ptr(), SearchPatternEdit::SearchPatternEditOptions options = (SearchPatternEdit::SearchPatternEditOptions)(SearchPatternEdit::None),
SearchPatternEdit::SearchModeType modeType = SearchPatternEdit::StandardMode);
enum {
......@@ -282,8 +281,7 @@ class SearchRuleWidgetLister : public KPIM::KWidgetLister
friend class SearchPatternEdit;
public:
explicit SearchRuleWidgetLister(QWidget *parent = nullptr, SearchPatternEdit::SearchPatternEditOptions opt = (SearchPatternEdit::SearchPatternEditOptions)(SearchPatternEdit::None),
SearchPatternEdit::SearchModeType modeType = SearchPatternEdit::StandardMode);
explicit SearchRuleWidgetLister(QWidget *parent = nullptr, SearchPatternEdit::SearchPatternEditOptions opt = (SearchPatternEdit::SearchPatternEditOptions)(SearchPatternEdit::None), SearchPatternEdit::SearchModeType modeType = SearchPatternEdit::StandardMode);
~SearchRuleWidgetLister() override;
......
......@@ -232,7 +232,7 @@ void SearchRuleString::addQueryTerms(Akonadi::SearchTerm &groupTerm, bool &empty
termGroup.addSubTerm(EmailSearchTerm(EmailSearchTerm::HeaderOrganization, contents(), akonadiComparator()));
} else if (qstricmp(field().constData(), "<tag>") == 0) {
termGroup.addSubTerm(EmailSearchTerm(EmailSearchTerm::MessageTag, contents(), akonadiComparator()));
} else if (!field().isEmpty()){
} else if (!field().isEmpty()) {
termGroup.addSubTerm(EmailSearchTerm(EmailSearchTerm::Headers, contents(), akonadiComparator()));
}
......
......@@ -112,7 +112,7 @@ SearchRule::Function StatusRuleWidgetHandler::function(const QByteArray &field,
int StatusRuleWidgetHandler::currentStatusValue(const QStackedWidget *valueStack) const
{
const auto statusCombo = valueStack->findChild<QComboBox*>(QStringLiteral("statusRuleValueCombo"));
const auto statusCombo = valueStack->findChild<QComboBox *>(QStringLiteral("statusRuleValueCombo"));
if (statusCombo) {
return statusCombo->currentIndex();
......
......@@ -46,7 +46,6 @@ SnippetDialog::SnippetDialog(KActionCollection *actionCollection, bool inGroupMo
connect(buttonBox, &QDialogButtonBox::rejected, this, &SnippetDialog::reject);
mainLayout->addWidget(buttonBox);
mSnippetWidget->setCheckActionCollections(QList<KActionCollection *>() << actionCollection);
mOkButton->setEnabled(false);
......@@ -124,7 +123,7 @@ QString SnippetDialog::keyword() const
void SnippetDialog::setGroupModel(QAbstractItemModel *model)
{
mSnippetWidget->setGroupModel(model);
mSnippetWidget->setGroupModel(model);
}
void SnippetDialog::setGroupIndex(const QModelIndex &index)
......
......@@ -526,7 +526,9 @@ SnippetsManager::SnippetsManager(KActionCollection *actionCollection, QObject *p
d->initializeActionCollection();
d->selectionChanged();
connect(this, &SnippetsManager::insertSnippet, this, [this]() {d->insertSelectedSnippet();});
connect(this, &SnippetsManager::insertSnippet, this, [this]() {
d->insertSelectedSnippet();
});
}
SnippetsManager::~SnippetsManager()
......
......@@ -39,10 +39,9 @@ public:
bool wasChanged = false;
};
SnippetWidget::SnippetWidget(QWidget *parent)
: QWidget(parent),
d(new SnippetWidgetPrivate)
: QWidget(parent)
, d(new SnippetWidgetPrivate)
{
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setObjectName(QStringLiteral("mainlayout"));
......@@ -57,7 +56,6 @@ SnippetWidget::SnippetWidget(QWidget *parent)
d->mUi.snippetText->editor()->insertPlainText(MessageComposer::ConvertSnippetVariablesUtil::snippetVariableFromEnum(type));
});
d->mUi.nameEdit->setFocus();
d->mUi.snippetText->setMinimumSize(500, 300);
......
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