Commit 8989bc85 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Astyle kdelibs

parent 1fbeac63
......@@ -336,9 +336,9 @@ void FilterManager::readConfig()
const QString id = agent.identifier();
auto it = std::max_element(d->mFilters.constBegin(), d->mFilters.constEnd(),
[id](MailCommon::MailFilter *lhs, MailCommon::MailFilter *rhs) {
return lhs->requiredPart(id) < rhs->requiredPart(id);
});
[id](MailCommon::MailFilter * lhs, MailCommon::MailFilter * rhs) {
return lhs->requiredPart(id) < rhs->requiredPart(id);
});
d->mRequiredParts[id] = (*it)->requiredPart(id);
d->mRequiredPartsBasedOnAll = qMax(d->mRequiredPartsBasedOnAll, d->mRequiredParts[id]);
}
......
......@@ -306,7 +306,6 @@ void ConfigurePluginsListWidget::slotConfigureClicked(const QString &configureGr
}
}
void ConfigurePluginsListWidget::defaults()
{
resetToUserSettings(mPluginEditorItems);
......
......@@ -478,10 +478,10 @@ struct SMIMECryptoConfigEntries {
}
QGpgME::CryptoConfigEntry *configEntry(const QString &componentName,
const QString &groupName,
const QString &entryName,
int argType,
bool isList);
const QString &groupName,
const QString &entryName,
int argType,
bool isList);
// Checkboxes
QGpgME::CryptoConfigEntry *mCheckUsingOCSPConfigEntry;
......
......@@ -1962,7 +1962,7 @@ void KMComposerWin::insertUrls(const QMimeData *source, const QList<QUrl> &urlLi
bool KMComposerWin::insertFromMimeData(const QMimeData *source, bool forceAttachment)
{
// If this is a PNG image, either add it as an attachment or as an inline image
if (source->hasHtml() && mComposerBase->editor()->textMode() == MessageComposer::RichTextComposerNg::Rich ) {
if (source->hasHtml() && mComposerBase->editor()->textMode() == MessageComposer::RichTextComposerNg::Rich) {
const QString html = QString::fromUtf8(source->data(QStringLiteral("text/html")));
mComposerBase->editor()->insertHtml(html);
return true;
......@@ -2240,10 +2240,10 @@ void KMComposerWin::setEncryption(bool encrypt, bool setByUser)
Q_FOREACH (auto line, mComposerBase->recipientsEditor()->lines()) {
if (encrypt) {
// Encryption was enabled, update encryption status of all recipients
slotRecipientAdded(qobject_cast<MessageComposer::RecipientLineNG*>(line));
slotRecipientAdded(qobject_cast<MessageComposer::RecipientLineNG *>(line));
} else {
// Encryption was disabled, remove the encryption indicator
auto edit = qobject_cast<MessageComposer::RecipientLineNG*>(line);
auto edit = qobject_cast<MessageComposer::RecipientLineNG *>(line);
edit->setIcon(QIcon());
auto recipient = edit->data().dynamicCast<MessageComposer::Recipient>();
recipient->setEncryptionAction(Kleo::Impossible);
......@@ -3221,24 +3221,24 @@ QList<QAction *> KMComposerWin::pluginToolsActionListForPopupMenu() const
void KMComposerWin::slotRecipientEditorLineAdded(KPIM::MultiplyingLine *line_)
{
auto line = qobject_cast<MessageComposer::RecipientLineNG*>(line_);
auto line = qobject_cast<MessageComposer::RecipientLineNG *>(line_);
Q_ASSERT(line);
connect(line, &MessageComposer::RecipientLineNG::countChanged,
this, [this, line]() {
this->slotRecipientAdded(line);
});
this, [this, line]() {
this->slotRecipientAdded(line);
});
connect(line, &MessageComposer::RecipientLineNG::iconClicked,
this, [this, line]() {
this->slotRecipientLineIconClicked(line);
});
this, [this, line]() {
this->slotRecipientLineIconClicked(line);
});
connect(line, &MessageComposer::RecipientLineNG::destroyed,
this, &KMComposerWin::slotRecipientEditorFocusChanged,
Qt::QueuedConnection);
connect(line, &MessageComposer::RecipientLineNG::activeChanged,
this, [this, line]() {
this->slotRecipientFocusLost(line);
});
this, [this, line]() {
this->slotRecipientFocusLost(line);
});
slotRecipientEditorFocusChanged();
}
......@@ -3256,7 +3256,7 @@ void KMComposerWin::slotRecipientEditorFocusChanged()
// but not by force
bool encrypt = false;
Q_FOREACH (auto line_, mComposerBase->recipientsEditor()->lines()) {
auto line = qobject_cast<MessageComposer::RecipientLineNG*>(line_);
auto line = qobject_cast<MessageComposer::RecipientLineNG *>(line_);
// There's still a lookup job running, so wait, slotKeyForMailBoxResult()
// will call us if the job returns empty key
......@@ -3282,18 +3282,17 @@ void KMComposerWin::slotRecipientEditorFocusChanged()
}
}
void KMComposerWin::slotRecipientLineIconClicked(MessageComposer::RecipientLineNG *line)
{
const auto data = line->data().dynamicCast<MessageComposer::Recipient>();
if (!data->key().isNull()) {
QProcess::startDetached(QStringLiteral("kleopatra"),
{ QStringLiteral("--query"),
QString::fromLatin1(data->key().primaryFingerprint()),
QStringLiteral("--parent-windowid"),
QString::number(winId())
});
QProcess::startDetached(QStringLiteral("kleopatra"), {
QStringLiteral("--query"),
QString::fromLatin1(data->key().primaryFingerprint()),
QStringLiteral("--parent-windowid"),
QString::number(winId())
});
}
}
......
......@@ -1504,10 +1504,10 @@ KMCommand::Result KMMoveCommand::execute()
connect(job, &KIO::Job::result, this, &KMMoveCommand::slotMoveResult);
// group by source folder for undo
std::sort(retrievedList.begin(), retrievedList.end(),
[](const Akonadi::Item &lhs, const Akonadi::Item &rhs) {
return lhs.storageCollectionId() < rhs.storageCollectionId();
});
std::sort(retrievedList.begin(), retrievedList.end(),
[](const Akonadi::Item & lhs, const Akonadi::Item & rhs) {
return lhs.storageCollectionId() < rhs.storageCollectionId();
});
Akonadi::Collection parent;
int undoId = -1;
foreach (const Akonadi::Item &item, retrievedList) {
......
......@@ -1482,9 +1482,9 @@ void KMMainWidget::slotEmptyFolder()
const bool isTrash = CommonKernel->folderIsTrash(mCurrentFolder->collection());
const QString title = (isTrash) ? i18n("Empty Trash") : i18n("Move to Trash");
const QString text = (isTrash) ?
i18n("Are you sure you want to empty the trash folder?") :
i18n("<qt>Are you sure you want to move all messages from "
"folder <b>%1</b> to the trash?</qt>", mCurrentFolder->name().toHtmlEscaped());
i18n("Are you sure you want to empty the trash folder?") :
i18n("<qt>Are you sure you want to move all messages from "
"folder <b>%1</b> to the trash?</qt>", mCurrentFolder->name().toHtmlEscaped());
if (KMessageBox::warningContinueCancel(this, text, title, KGuiItem(title, QStringLiteral("user-trash")))
!= KMessageBox::Continue) {
......
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