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

Fix clazy warning

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