[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [mailcommon] /: GIT_SILENT: coding style (silent)
From: Montel Laurent <null () kde ! org>
Date: 2017-10-31 21:33:02
Message-ID: E1e9e9e-000828-33 () code ! kde ! org
[Download RAW message or body]
Git commit b03dc485c875b7943dec8534267a5b7df09e73d4 by Montel Laurent.
Committed on 31/10/2017 at 21:33.
Pushed by mlaurent into branch 'master'.
GIT_SILENT: coding style
M +0 -1 autotests/dummykernel.cpp
M +2 -4 autotests/dummykernel.h
M +12 -4 autotests/foldertreewidgettest.cpp
M +0 -4 src/filter/autotests/filterimporterpathcachetest.cpp
M +6 -2 src/filter/filteractions/filteractionwidget.cpp
M +0 -2 src/filter/filterimporterpathcache.cpp
M +2 -3 src/filter/filterimporterpathcache.h
M +3 -2 src/filter/mailfilter.cpp
M +2 -2 src/search/searchpatternedit.cpp
M +3 -1 src/snippets/snippetsmanager.cpp
https://commits.kde.org/mailcommon/b03dc485c875b7943dec8534267a5b7df09e73d4
diff --git a/autotests/dummykernel.cpp b/autotests/dummykernel.cpp
index 9652368..6393e2f 100644
--- a/autotests/dummykernel.cpp
+++ b/autotests/dummykernel.cpp
@@ -109,4 +109,3 @@ void DummyKernel::setLastSelectedFolder(Akonadi::Collection::Id \
col) {
Q_UNUSED(col);
}
-
diff --git a/autotests/dummykernel.h b/autotests/dummykernel.h
index 0b9600d..9e78d4e 100644
--- a/autotests/dummykernel.h
+++ b/autotests/dummykernel.h
@@ -3,14 +3,12 @@
#include <MailCommon/MailInterfaces>
-namespace Akonadi
-{
+namespace Akonadi {
class EntityTreeModel;
class EntityMimeTypeFilterModel;
}
-namespace MailCommon
-{
+namespace MailCommon {
class FolderCollectionMonitor;
}
diff --git a/autotests/foldertreewidgettest.cpp b/autotests/foldertreewidgettest.cpp
index 4bc1a53..357cdf5 100644
--- a/autotests/foldertreewidgettest.cpp
+++ b/autotests/foldertreewidgettest.cpp
@@ -68,7 +68,9 @@ private Q_SLOTS:
CommonKernel->registerSettingsIf(kernel);
mFolderTreeWidget = new MailCommon::FolderTreeWidget(nullptr);
- const QStringList resourceOrder{"akonadi_knut_resource_2", \
"akonadi_knut_resource_0"}; // _1 isn't specified so it goes at the end + \
const QStringList resourceOrder{ + "akonadi_knut_resource_2", \
"akonadi_knut_resource_0" + }; \
// _1 isn't specified so it goes at the end
mFolderTreeWidget->entityOrderProxy()->setTopLevelOrder(resourceOrder);
mCollectionModel = KernelIf->collectionModel();
@@ -77,7 +79,9 @@ private Q_SLOTS:
// One knut resource is already defined in the unittestenv, so that it's \
below "Search" in the ETM. QTRY_COMPARE(mCollectionModel->rowCount(), 2);
QCOMPARE(mTopModel->rowCount(), 1); // Search doesn't appear yet
- mFolderNames = QStringList{"res1"};
+ mFolderNames = QStringList{
+ "res1"
+ };
QCOMPARE(collectNames(mTopModel), mFolderNames);
}
@@ -139,11 +143,15 @@ private Q_SLOTS:
{
// Test creating more knut resources.
// This tests that ETM and proxies on top update correctly, and it tests \
toplevel collection order.
- const QVector<int> numFolders{ 1, 5, 2 };
+ const QVector<int> numFolders{
+ 1, 5, 2
+ };
QVector<Collection> topLevelCollections;
const AgentType agentType = \
AgentManager::self()->type(QStringLiteral("akonadi_knut_resource")); \
QVERIFY(agentType.isValid());
- mFolderNames = QStringList{"res3", "res1", "res2"}; // according to \
resourceOrder above (the folder names are defined in testdata-res*.xml) + \
mFolderNames = QStringList{ + "res3", "res1", "res2"
+ }; // according to \
resourceOrder above (the folder names are defined in testdata-res*.xml)
// Create resources
const int numResources = numFolders.count();
diff --git a/src/filter/autotests/filterimporterpathcachetest.cpp \
b/src/filter/autotests/filterimporterpathcachetest.cpp index 7a451b4..4e40ae9 100644
--- a/src/filter/autotests/filterimporterpathcachetest.cpp
+++ b/src/filter/autotests/filterimporterpathcachetest.cpp
@@ -25,12 +25,10 @@ QTEST_MAIN(FilterImporterPathCacheTest)
FilterImporterPathCacheTest::FilterImporterPathCacheTest(QObject *parent)
: QObject(parent)
{
-
}
FilterImporterPathCacheTest::~FilterImporterPathCacheTest()
{
-
}
void FilterImporterPathCacheTest::shouldReturnEmptyStringWhenListIsEmpty()
@@ -66,7 +64,6 @@ void FilterImporterPathCacheTest::shouldNotDuplicateEntries()
cache.insert(QStringLiteral("foo1"), Akonadi::Collection(3));
QCOMPARE(cache.count(), 1);
-
cache.insert(QStringLiteral("foo1"), Akonadi::Collection(4));
QCOMPARE(cache.count(), 1);
@@ -76,7 +73,6 @@ void FilterImporterPathCacheTest::shouldNotDuplicateEntries()
//Add new one
cache.insert(QStringLiteral("foo2"), Akonadi::Collection(4));
QCOMPARE(cache.count(), 2);
-
}
void FilterImporterPathCacheTest::shouldReturnValues()
diff --git a/src/filter/filteractions/filteractionwidget.cpp \
b/src/filter/filteractions/filteractionwidget.cpp index 08b53ab..08c2f71 100644
--- a/src/filter/filteractions/filteractionwidget.cpp
+++ b/src/filter/filteractions/filteractionwidget.cpp
@@ -177,9 +177,13 @@ FilterActionWidget::FilterActionWidget(QWidget *parent)
connect(d->mComboBox, QOverload<int>::of(&KComboBox::activated), this, \
&FilterActionWidget::filterModified);
connect(d->mAdd, &QPushButton::clicked,
- this, [this]() { d->slotAddWidget(); });
+ this, [this]() {
+ d->slotAddWidget();
+ });
connect(d->mRemove, &QPushButton::clicked,
- this, [this]() { d->slotRemoveWidget(); });
+ this, [this]() {
+ d->slotRemoveWidget();
+ });
d->setFilterAction();
d->mLayout->addWidget(d->mAdd, 1, 3);
diff --git a/src/filter/filterimporterpathcache.cpp \
b/src/filter/filterimporterpathcache.cpp index 960a132..2c08f40 100644
--- a/src/filter/filterimporterpathcache.cpp
+++ b/src/filter/filterimporterpathcache.cpp
@@ -21,12 +21,10 @@ using namespace MailCommon;
FilterImporterPathCache::FilterImporterPathCache(QObject *parent)
: QObject(parent)
{
-
}
FilterImporterPathCache::~FilterImporterPathCache()
{
-
}
FilterImporterPathCache *FilterImporterPathCache::self()
diff --git a/src/filter/filterimporterpathcache.h \
b/src/filter/filterimporterpathcache.h index c90b702..0eb0f59 100644
--- a/src/filter/filterimporterpathcache.h
+++ b/src/filter/filterimporterpathcache.h
@@ -22,12 +22,11 @@
#include <QHash>
#include <AkonadiCore/Collection>
#include "mailcommon_export.h"
-namespace MailCommon
-{
+namespace MailCommon {
class MAILCOMMON_EXPORT FilterImporterPathCache : public QObject
{
Q_OBJECT
-public:
+public:
static FilterImporterPathCache *self();
explicit FilterImporterPathCache(QObject *parent = nullptr);
diff --git a/src/filter/mailfilter.cpp b/src/filter/mailfilter.cpp
index a8a055c..afc4e18 100644
--- a/src/filter/mailfilter.cpp
+++ b/src/filter/mailfilter.cpp
@@ -507,7 +507,9 @@ void MailFilter::generateSieveScript(QStringList &requires, \
QString &code) QList<FilterAction *>::const_iterator it;
QList<FilterAction *>::const_iterator end(mActions.constEnd());
- const QString indentationStr{QStringLiteral(" ")};
+ const QString indentationStr{
+ QStringLiteral(" ")
+ };
code += QLatin1String(")\n{\n");
bool firstAction = true;
for (it = mActions.constBegin(); it != end; ++it) {
@@ -680,7 +682,6 @@ const QString MailFilter::asString() const
} else if (bApplyOnInbound && mApplicability == ButImap) {
result += QStringLiteral("This filter applies to all but IMAP accounts.\n");
} else if (bApplyOnInbound) {
-
result += QStringLiteral("This filter applies to the following accounts:");
if (mAccounts.isEmpty()) {
result += QStringLiteral(" None");
diff --git a/src/search/searchpatternedit.cpp b/src/search/searchpatternedit.cpp
index de84fd7..a753c5f 100644
--- a/src/search/searchpatternedit.cpp
+++ b/src/search/searchpatternedit.cpp
@@ -642,7 +642,7 @@ void SearchPatternEdit::initLayout(SearchPatternEditOptions \
options, SearchModeT }
//------------connect a few signals
- connect(bg, QOverload<QAbstractButton*>::of(&QButtonGroup::buttonClicked),
+ connect(bg, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
this, &SearchPatternEdit::slotRadioClicked);
//------------the list of SearchRuleWidget's
@@ -667,7 +667,7 @@ void SearchPatternEdit::initLayout(SearchPatternEditOptions \
options, SearchModeT
qCDebug(MAILCOMMON_LOG) << "No first SearchRuleWidget, though slotClear() \
has been called!"; }
- connect(mRuleLister, \
QOverload<QWidget*>::of(&SearchRuleWidgetLister::widgetAdded), + \
connect(mRuleLister, QOverload<QWidget *>::of(&SearchRuleWidgetLister::widgetAdded), \
this, &SearchPatternEdit::slotRuleAdded);
connect(mRuleLister, QOverload<>::of(&SearchRuleWidgetLister::widgetRemoved), \
this, &SearchPatternEdit::patternChanged);
connect(mRuleLister, &KPIM::KWidgetLister::clearWidgets, this, \
&SearchPatternEdit::patternChanged);
diff --git a/src/snippets/snippetsmanager.cpp b/src/snippets/snippetsmanager.cpp
index fbf95f2..76a8b78 100644
--- a/src/snippets/snippetsmanager.cpp
+++ b/src/snippets/snippetsmanager.cpp
@@ -399,7 +399,9 @@ void SnippetsManager::Private::updateActionCollection(const \
QString &oldName, co
QAction *action
= mActionCollection->addAction(normalizedName, q);
- connect(action, &QAction::triggered, q, [this]() {insertActionSnippet();});
+ connect(action, &QAction::triggered, q, [this]() {
+ insertActionSnippet();
+ });
action->setProperty("snippetText", text);
action->setText(actionName);
mActionCollection->setDefaultShortcut(action, keySequence);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic