Commit a040c292 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: coding style

parent bcb9234e
......@@ -31,7 +31,6 @@
K_PLUGIN_CLASS_WITH_JSON(KCMLdap, "kcmldap.json")
KCMLdap::KCMLdap(QWidget *parent, const QVariantList &)
: KCModule(parent)
{
......
......@@ -25,7 +25,6 @@
#include <KCModule>
namespace KLDAP {
class LdapConfigureWidget;
}
......
......@@ -139,7 +139,9 @@ void LdapClient::startQuery(const QString &filter)
d->mActive = true;
KIO::TransferJob *transfertJob = KIO::get(url, KIO::NoReload, KIO::HideProgressInfo);
d->mJob = transfertJob;
connect(transfertJob, &KIO::TransferJob::data, this, [this](KIO::Job *job, const QByteArray &data) { d->slotData(job, data);});
connect(transfertJob, &KIO::TransferJob::data, this, [this](KIO::Job *job, const QByteArray &data) {
d->slotData(job, data);
});
connect(d->mJob.data(), &KIO::TransferJob::infoMessage, this,
[this](KJob *job, const QString &str, const QString &val) {
d->slotInfoMessage(job, str, val);
......
......@@ -27,7 +27,6 @@
#include <QObject>
#include <QStringList>
namespace KLDAP {
class LdapObject;
class LdapServer;
......
......@@ -190,7 +190,9 @@ void LdapClientSearch::Private::readConfig()
ldapClient->setAttributes(mAttributes);
q->connect(ldapClient, &LdapClient::result,
q, [this](const LdapClient &client, const KLDAP::LdapObject &obj) { slotLDAPResult(client, obj); });
q, [this](const LdapClient &client, const KLDAP::LdapObject &obj) {
slotLDAPResult(client, obj);
});
q->connect(ldapClient, &LdapClient::done,
q, [this]() {
slotLDAPDone();
......
......@@ -91,7 +91,6 @@ LdapConfigureWidget::LdapConfigureWidget(QWidget *parent)
connect(mUpButton, &QToolButton::clicked, this, &LdapConfigureWidget::slotMoveUp);
connect(mDownButton, &QToolButton::clicked, this, &LdapConfigureWidget::slotMoveDown);
}
LdapConfigureWidget::~LdapConfigureWidget()
......@@ -334,7 +333,6 @@ void LdapConfigureWidget::initGUI()
upDownBoxVBoxLayout->addWidget(spacer);
upDownBoxVBoxLayout->setStretchFactor(spacer, 100);
QDialogButtonBox *buttons = new QDialogButtonBox(this);
QPushButton *add = buttons->addButton(i18n("&Add Host..."),
QDialogButtonBox::ActionRole);
......
......@@ -17,7 +17,6 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef LDAPCONFIGUREWIDGET_H
#define LDAPCONFIGUREWIDGET_H
......@@ -29,7 +28,6 @@ class QPushButton;
class QToolButton;
class QListWidgetItem;
namespace KLDAP {
class LdapClientSearchConfig;
/**
......
......@@ -613,7 +613,9 @@ LdapSearchDialog::LdapSearchDialog(QWidget *parent)
user2Button->setText(i18n("Configure LDAP Servers..."));
connect(d->mRecursiveCheckbox, &QCheckBox::toggled,
this, [this](bool state) { d->slotSetScope(state); });
this, [this](bool state) {
d->slotSetScope(state);
});
connect(d->mSearchButton, SIGNAL(clicked()),
this, SLOT(slotStartSearch()));
......@@ -699,7 +701,9 @@ void LdapSearchDialog::Private::restoreSettings()
q->connect(ldapClient, SIGNAL(result(KLDAP::LdapClient,KLDAP::LdapObject)), q, SLOT(slotAddResult(KLDAP::LdapClient,KLDAP::LdapObject)));
q->connect(ldapClient, SIGNAL(done()), q, SLOT(slotSearchDone()));
q->connect(ldapClient, &LdapClient::error, q, [this](const QString &err) {slotError(err);});
q->connect(ldapClient, &LdapClient::error, q, [this](const QString &err) {
slotError(err);
});
mLdapClientList.append(ldapClient);
}
......
......@@ -278,8 +278,7 @@ ProgressItem *ProgressManager::createProgressItem(unsigned int progressType, con
QString(), true, KPIM::ProgressItem::Unencrypted, progressType);
}
ProgressItem *ProgressManager::createProgressItemImpl(ProgressItem *parent, const QString &id, const QString &label, const QString &status, bool cancellable, ProgressItem::CryptoStatus cryptoStatus,
unsigned int progressType)
ProgressItem *ProgressManager::createProgressItemImpl(ProgressItem *parent, const QString &id, const QString &label, const QString &status, bool cancellable, ProgressItem::CryptoStatus cryptoStatus, unsigned int progressType)
{
ProgressItem *t = nullptr;
if (!mTransactions.value(id)) {
......@@ -318,8 +317,7 @@ ProgressItem *ProgressManager::createProgressItemImpl(ProgressItem *parent, cons
return t;
}
ProgressItem *ProgressManager::createProgressItemImpl(const QString &parent, const QString &id, const QString &label, const QString &status, bool canBeCanceled,
ProgressItem::CryptoStatus cryptoStatus, unsigned int progressType)
ProgressItem *ProgressManager::createProgressItemImpl(const QString &parent, const QString &id, const QString &label, const QString &status, bool canBeCanceled, ProgressItem::CryptoStatus cryptoStatus, unsigned int progressType)
{
ProgressItem *p = mTransactions.value(parent);
return createProgressItemImpl(p, id, label, status, canBeCanceled, cryptoStatus, progressType);
......
......@@ -328,21 +328,18 @@ public:
* canceled) and ongoing children prevent parents from finishing.
* @return The ProgressItem representing the operation.
*/
static ProgressItem *createProgressItem(ProgressItem *parent, const QString &id, const QString &label,
const QString &status = QString(), bool canBeCanceled = true, KPIM::ProgressItem::CryptoStatus cryptoStatus = KPIM::ProgressItem::Unencrypted);
static ProgressItem *createProgressItem(ProgressItem *parent, const QString &id, const QString &label, const QString &status = QString(), bool canBeCanceled = true, KPIM::ProgressItem::CryptoStatus cryptoStatus = KPIM::ProgressItem::Unencrypted);
/**
* Use this version if you have the id string of the parent and want to
* add a subjob to it.
*/
static ProgressItem *createProgressItem(const QString &parent, const QString &id, const QString &label,
const QString &status = QString(), bool canBeCanceled = true, KPIM::ProgressItem::CryptoStatus cryptoStatus = KPIM::ProgressItem::Unencrypted);
static ProgressItem *createProgressItem(const QString &parent, const QString &id, const QString &label, const QString &status = QString(), bool canBeCanceled = true, KPIM::ProgressItem::CryptoStatus cryptoStatus = KPIM::ProgressItem::Unencrypted);
/**
* Version without a parent.
*/
static ProgressItem *createProgressItem(const QString &id, const QString &label,
const QString &status = QString(), bool canBeCanceled = true, KPIM::ProgressItem::CryptoStatus cryptoStatus = KPIM::ProgressItem::Unencrypted);
static ProgressItem *createProgressItem(const QString &id, const QString &label, const QString &status = QString(), bool canBeCanceled = true, KPIM::ProgressItem::CryptoStatus cryptoStatus = KPIM::ProgressItem::Unencrypted);
/**
* @return true when there are no more progress items.
......@@ -412,11 +409,9 @@ private:
// prevent unsolicited copies
ProgressManager(const ProgressManager &);
ProgressItem *createProgressItemImpl(ProgressItem *parent, const QString &id, const QString &label, const QString &status, bool cancellable, ProgressItem::CryptoStatus cryptoStatus,
unsigned int progressType = 0);
ProgressItem *createProgressItemImpl(ProgressItem *parent, const QString &id, const QString &label, const QString &status, bool cancellable, ProgressItem::CryptoStatus cryptoStatus, unsigned int progressType = 0);
ProgressItem *createProgressItemImpl(const QString &parent, const QString &id, const QString &label, const QString &status, bool cancellable, ProgressItem::CryptoStatus cryptoStatus,
unsigned int progressType = 0);
ProgressItem *createProgressItemImpl(const QString &parent, const QString &id, const QString &label, const QString &status, bool cancellable, ProgressItem::CryptoStatus cryptoStatus, unsigned int progressType = 0);
void emitShowProgressDialogImpl();
QHash< QString, ProgressItem * > mTransactions;
......
......@@ -242,8 +242,9 @@ void StatusbarProgressWidget::slotProgressItemProgress(ProgressItem *item, unsig
void StatusbarProgressWidget::setMode(Mode mode)
{
if (mMode == mode)
if (mMode == mode) {
return;
}
mMode = mode;
switch (mMode) {
case Clean:
......
......@@ -149,7 +149,6 @@ KCheckComboBox::KCheckComboBox(QWidget *parent)
d->updateCheckedItems(topLeft, bottomRight);
});
// read-only contents
setEditable(true);
......
......@@ -29,8 +29,7 @@
using namespace KPIM;
QDialogButtonBox::StandardButton PIMMessageBox::fourBtnMsgBox(QWidget *parent, QMessageBox::Icon type, const QString &text, const QString &caption, const QString &button1Text,
const QString &button2Text, const QString &button3Text, KMessageBox::Options options)
QDialogButtonBox::StandardButton PIMMessageBox::fourBtnMsgBox(QWidget *parent, QMessageBox::Icon type, const QString &text, const QString &caption, const QString &button1Text, const QString &button2Text, const QString &button3Text, KMessageBox::Options options)
{
QDialog *dialog = new QDialog(parent);
dialog->setWindowTitle(caption);
......
......@@ -34,8 +34,7 @@ namespace KPIM {
class KDEPIM_EXPORT PIMMessageBox
{
public:
static QDialogButtonBox::StandardButton fourBtnMsgBox(QWidget *parent, QMessageBox::Icon type, const QString &text, const QString &caption = QString(),
const QString &button1Text = QString(), const QString &button2Text = QString(),
static QDialogButtonBox::StandardButton fourBtnMsgBox(QWidget *parent, QMessageBox::Icon type, const QString &text, const QString &caption = QString(), const QString &button1Text = QString(), const QString &button2Text = QString(),
const QString &button3Text = QString(), KMessageBox::Options options = KMessageBox::Notify);
};
}
......
......@@ -40,7 +40,7 @@ void BlackListBalooEmailListTest::shouldHaveDefaultValue()
void BlackListBalooEmailListTest::shouldFillListEmail()
{
KPIM::BlackListBalooEmailList blackList;
QCOMPARE(blackList.setEmailFound(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org") << QStringLiteral("bli@kde.org")),3);
QCOMPARE(blackList.setEmailFound(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org") << QStringLiteral("bli@kde.org")), 3);
QCOMPARE(blackList.count(), 3);
for (int i = 0; i < blackList.count(); ++i) {
QListWidgetItem *item = blackList.item(i);
......
......@@ -79,7 +79,6 @@ BlackListBalooEmailCompletionWidget::BlackListBalooEmailCompletionWidget(QWidget
connect(mBlackListWarning, &BlackListBalooEmailWarning::saveChanges, this, &BlackListBalooEmailCompletionWidget::slotSaveChanges);
mainLayout->addWidget(mBlackListWarning);
QHBoxLayout *searchLineLayout = new QHBoxLayout;
mainLayout->addLayout(searchLineLayout);
......@@ -134,7 +133,6 @@ BlackListBalooEmailCompletionWidget::BlackListBalooEmailCompletionWidget(QWidget
mExcludeDomainLineEdit->setTrapReturnKey(true);
mExcludeDomainLineEdit->setPlaceholderText(i18n("Separate domain with \'%1\'", QLatin1Char(',')));
connect(mEmailList, &QListWidget::itemSelectionChanged, this, &BlackListBalooEmailCompletionWidget::slotSelectionChanged);
slotSelectionChanged();
}
......
......@@ -24,8 +24,7 @@
#include "progressmanagerakonadi.h"
#include "agentprogressmonitor.h"
KPIM::ProgressItem *KPIM::ProgressManagerAkonadi::createProgressItem(ProgressItem *parent, const Akonadi::AgentInstance &agent, const QString &id, const QString &label, const QString &status,
bool canBeCanceled, ProgressItem::CryptoStatus cryptoStatus)
KPIM::ProgressItem *KPIM::ProgressManagerAkonadi::createProgressItem(ProgressItem *parent, const Akonadi::AgentInstance &agent, const QString &id, const QString &label, const QString &status, bool canBeCanceled, ProgressItem::CryptoStatus cryptoStatus)
{
const bool itemAlreadyExists = (KPIM::ProgressManager::instance()->progressItem(id) != nullptr);
KPIM::ProgressItem *t = KPIM::ProgressManager::instance()->createProgressItem(parent, id, label,
......
......@@ -30,8 +30,7 @@
namespace KPIM {
namespace ProgressManagerAkonadi {
KDEPIMAKONADI_EXPORT ProgressItem *createProgressItem(ProgressItem *parent, const Akonadi::AgentInstance &agent, const QString &id, const QString &label, const QString &status, bool canBeCanceled,
ProgressItem::CryptoStatus cryptoStatus);
KDEPIMAKONADI_EXPORT ProgressItem *createProgressItem(ProgressItem *parent, const Akonadi::AgentInstance &agent, const QString &id, const QString &label, const QString &status, bool canBeCanceled, ProgressItem::CryptoStatus cryptoStatus);
}
}
#endif // PROGRESSMANAGERAKONADI_H
......@@ -59,7 +59,7 @@ TagSelectionCombo::TagSelectionCombo(QWidget *parent)
setModel(checkableProxy);
//We need to reconnect from the constructor of KCheckComboBox to the new model
connect(checkableProxy, &QAbstractItemModel::dataChanged, this, [this] (const QModelIndex &topLeft, const QModelIndex &bottomRight) {
connect(checkableProxy, &QAbstractItemModel::dataChanged, this, [this](const QModelIndex &topLeft, const QModelIndex &bottomRight) {
updateCheckedItems(topLeft, bottomRight);
});
}
......
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