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

Fix clazy warning

parent 04051f6a
...@@ -435,7 +435,7 @@ public: ...@@ -435,7 +435,7 @@ public:
unresolvedSig << mSender; unresolvedSig << mSender;
} else { } else {
std::vector<GpgME::Key> resolvedSigKeys; std::vector<GpgME::Key> resolvedSigKeys;
for (const auto &keys: mSigKeys) { for (const auto &keys: qAsConst(mSigKeys)) {
for (const auto &key: keys) { for (const auto &key: keys) {
resolvedSigKeys.push_back(key); resolvedSigKeys.push_back(key);
} }
...@@ -454,7 +454,7 @@ public: ...@@ -454,7 +454,7 @@ public:
if (mFormat & AutoFormat) { if (mFormat & AutoFormat) {
// In Auto Format we can now remove recipients that could // In Auto Format we can now remove recipients that could
// be resolved either through CMS or PGP // be resolved either through CMS or PGP
for (const auto &addr: mUnresolvedPGP) { for (const auto &addr: qAsConst(mUnresolvedPGP)) {
if (mUnresolvedCMS.contains(addr)) { if (mUnresolvedCMS.contains(addr)) {
unresolvedRecp << addr; unresolvedRecp << addr;
} }
......
...@@ -136,7 +136,7 @@ public: ...@@ -136,7 +136,7 @@ public:
{ {
auto hLay = new QHBoxLayout(this); auto hLay = new QHBoxLayout(this);
auto infoBtn = new QPushButton; auto infoBtn = new QPushButton;
infoBtn->setIcon(QIcon::fromTheme("help-contextual")); infoBtn->setIcon(QIcon::fromTheme(QStringLiteral("help-contextual")));
infoBtn->setIconSize(QSize(22,22)); infoBtn->setIconSize(QSize(22,22));
infoBtn->setFlat(true); infoBtn->setFlat(true);
hLay->addWidget(infoBtn); hLay->addWidget(infoBtn);
...@@ -373,7 +373,7 @@ public: ...@@ -373,7 +373,7 @@ public:
mAcceptedEnc.clear(); mAcceptedEnc.clear();
mAcceptedSig.clear(); mAcceptedSig.clear();
for (const auto combo: mEncCombos) { for (const auto combo: qAsConst(mEncCombos)) {
const auto &addr = combo->property("address").toString(); const auto &addr = combo->property("address").toString();
const auto &key = combo->currentKey(); const auto &key = combo->currentKey();
if (!combo->isVisible()) { if (!combo->isVisible()) {
...@@ -393,7 +393,7 @@ public: ...@@ -393,7 +393,7 @@ public:
mAcceptedEnc.insert(addr, vec); mAcceptedEnc.insert(addr, vec);
} }
} }
for (const auto combo: mSigningCombos) { for (const auto combo: qAsConst(mSigningCombos)) {
const auto key = combo->currentKey(); const auto key = combo->currentKey();
if (!combo->isVisible()) { if (!combo->isVisible()) {
continue; continue;
...@@ -415,7 +415,7 @@ public: ...@@ -415,7 +415,7 @@ public:
// We can assume everything was validly resolved, otherwise // We can assume everything was validly resolved, otherwise
// the OK button would have been disabled. // the OK button would have been disabled.
// Handle custom items now. // Handle custom items now.
for (auto combo: mAllCombos) { for (auto combo: qAsConst(mAllCombos)) {
auto act = combo->currentData(Qt::UserRole).toInt(); auto act = combo->currentData(Qt::UserRole).toInt();
if (act == GenerateKey) { if (act == GenerateKey) {
generateKey(combo); generateKey(combo);
...@@ -441,7 +441,7 @@ public: ...@@ -441,7 +441,7 @@ public:
mCurEncFilter = s_defaultFilter; mCurEncFilter = s_defaultFilter;
mCurSigFilter = s_signFilter; mCurSigFilter = s_signFilter;
} }
for (auto combo: mSigningCombos) { for (auto combo: qAsConst(mSigningCombos)) {
combo->setKeyFilter(mCurSigFilter); combo->setKeyFilter(mCurSigFilter);
auto widget = qobject_cast <ComboWidget *>(combo->parentWidget()); auto widget = qobject_cast <ComboWidget *>(combo->parentWidget());
if (!widget) { if (!widget) {
...@@ -452,7 +452,7 @@ public: ...@@ -452,7 +452,7 @@ public:
((isSMIME && widget->fromOverride() == GpgME::CMS) || ((isSMIME && widget->fromOverride() == GpgME::CMS) ||
(isPGP && widget->fromOverride() == GpgME::OpenPGP))); (isPGP && widget->fromOverride() == GpgME::OpenPGP)));
} }
for (auto combo: mEncCombos) { for (auto combo: qAsConst(mEncCombos)) {
combo->setKeyFilter(mCurEncFilter); combo->setKeyFilter(mCurEncFilter);
auto widget = qobject_cast <ComboWidget *>(combo->parentWidget()); auto widget = qobject_cast <ComboWidget *>(combo->parentWidget());
...@@ -527,7 +527,7 @@ public: ...@@ -527,7 +527,7 @@ public:
sigLayout->addWidget(comboWidget); sigLayout->addWidget(comboWidget);
} }
} }
for (const QString &addr: unresolved) { for (const QString &addr: qAsConst(unresolved)) {
auto group = new QGroupBox(i18nc("Caption for signing key selection, no key found", auto group = new QGroupBox(i18nc("Caption for signing key selection, no key found",
"No key found for the address '%1':", addr)); "No key found for the address '%1':", addr));
group->setAlignment(Qt::AlignLeft); group->setAlignment(Qt::AlignLeft);
......
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