GIT_SILENT: coding style

wilder
Montel Laurent 8 years ago
parent 829a25282c
commit b03dc485c8
  1. 1
      autotests/dummykernel.cpp
  2. 6
      autotests/dummykernel.h
  3. 16
      autotests/foldertreewidgettest.cpp
  4. 4
      src/filter/autotests/filterimporterpathcachetest.cpp
  5. 8
      src/filter/filteractions/filteractionwidget.cpp
  6. 2
      src/filter/filterimporterpathcache.cpp
  7. 5
      src/filter/filterimporterpathcache.h
  8. 5
      src/filter/mailfilter.cpp
  9. 4
      src/search/searchpatternedit.cpp
  10. 4
      src/snippets/snippetsmanager.cpp

@ -109,4 +109,3 @@ void DummyKernel::setLastSelectedFolder(Akonadi::Collection::Id col)
{
Q_UNUSED(col);
}

@ -3,14 +3,12 @@
#include <MailCommon/MailInterfaces>
namespace Akonadi
{
namespace Akonadi {
class EntityTreeModel;
class EntityMimeTypeFilterModel;
}
namespace MailCommon
{
namespace MailCommon {
class FolderCollectionMonitor;
}

@ -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();

@ -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()

@ -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);

@ -21,12 +21,10 @@ using namespace MailCommon;
FilterImporterPathCache::FilterImporterPathCache(QObject *parent)
: QObject(parent)
{
}
FilterImporterPathCache::~FilterImporterPathCache()
{
}
FilterImporterPathCache *FilterImporterPathCache::self()

@ -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);

@ -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");

@ -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);

@ -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);

Loading…
Cancel
Save