Commit 30e622a8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warning

parent c6d4a1d8
Pipeline #73148 passed with stage
in 5 minutes and 24 seconds
......@@ -478,7 +478,7 @@ void HeaderTest::testParametrizedHeader()
QVERIFY(!h->hasParameter(QLatin1String("foo")));
// add a parameter
h->setParameter(QLatin1String("filename"), QLatin1String("bla.jpg"));
h->setParameter(QStringLiteral("filename"), QStringLiteral("bla.jpg"));
QVERIFY(!h->isEmpty());
QVERIFY(h->hasParameter(QLatin1String("filename")));
QVERIFY(h->hasParameter(QLatin1String("FiLeNaMe")));
......
......@@ -511,7 +511,7 @@ void MessageTest::testEncapsulatedMessages()
QCOMPARE(encapsulated->decodedText(false, false),
QLatin1String("This is the encapsulated message body."));
QCOMPARE(encapsulated.data(), messageContent->bodyAsMessage().data());
QCOMPARE(encapsulated.data(), messageContent->contents().first());
QCOMPARE(encapsulated.data(), messageContent->contents().constFirst());
QCOMPARE(encapsulated->parent(), messageContent);
QVERIFY(!encapsulated->isTopLevel());
QCOMPARE(encapsulated->topLevel(), msg.data());
......
......@@ -333,7 +333,7 @@ QByteArray Content::decodedContent()
QScopedPointer<KCodecs::Decoder> decoder(codec->makeDecoder());
QByteArray::const_iterator inputIt = d_ptr->body.constBegin();
QByteArray::iterator resultIt = ret.begin();
decoder->decode(inputIt, d_ptr->body.constEnd(), resultIt, ret.end());
decoder->decode(inputIt, d_ptr->body.constEnd(), resultIt, ret.constEnd());
ret.truncate(resultIt - ret.begin());
break;
}
......@@ -555,7 +555,7 @@ void Content::removeContent(Content *c, bool del)
// If only one content is left, turn this content into a single-part.
if (d->multipartContents.count() == 1) {
Content *main = d->multipartContents.first();
Content *main = d->multipartContents.constFirst();
// Move all headers from the old subcontent to ourselves.
// NOTE: This also sets the new Content-Type.
......@@ -652,7 +652,7 @@ void Content::appendHeader(Headers::Base *h)
bool Content::removeHeader(const char *type)
{
Q_D(Content);
const auto endIt = d->headers.end();
const auto endIt = d->headers.constEnd();
for (auto it = d->headers.begin(); it != endIt; ++it)
if ((*it)->is(type)) {
delete(*it);
......
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