Commit 3d81f546 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix clazy warning/cppcheck warning

parent 8f1b588a
......@@ -59,7 +59,7 @@ public Q_SLOTS:
}
void onMessagesReceived(const QString &/*mailbox*/,
const QMap<qint64, qint64> uids,
const QMap<qint64, qint64> &uids,
const QMap<qint64, KIMAP::MessageAttribute> &attrs,
const QMap<qint64, KIMAP::MessagePtr> &messages)
{
......
......@@ -138,12 +138,12 @@ private Q_SLOTS:
fakeServer.setScenario(scenario);
fakeServer.startAndWait();
KIMAP::Session session(QLatin1String("127.0.0.1"), 5989);
KIMAP::Session session(QStringLiteral("127.0.0.1"), 5989);
//C: A000001 GETMETADATA "Folder1" (/shared)
KIMAP::GetMetaDataJob *getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Metadata);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
getMetadataJob->addRequestedEntry("/shared");
getMetadataJob->setDepth(KIMAP::GetMetaDataJob::NoDepth);
QVERIFY(getMetadataJob->exec());
......@@ -153,7 +153,7 @@ private Q_SLOTS:
//C: A000002 GETMETADATA "Folder1" (DEPTH 1) (/shared)
getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Metadata);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
getMetadataJob->addRequestedEntry("/shared");
getMetadataJob->setDepth(KIMAP::GetMetaDataJob::OneLevel);
QVERIFY(getMetadataJob->exec());
......@@ -161,7 +161,7 @@ private Q_SLOTS:
//C: A000003 GETMETADATA "Folder1" (MAXSIZE 1234) (/shared)
getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Metadata);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
getMetadataJob->addRequestedEntry("/shared");
getMetadataJob->setDepth(KIMAP::GetMetaDataJob::NoDepth);
getMetadataJob->setMaximumSize(1234);
......@@ -170,7 +170,7 @@ private Q_SLOTS:
//C: A000004 GETMETADATA "Folder1" (DEPTH 1) (MAXSIZE 1234) (/shared)
getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Metadata);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
getMetadataJob->addRequestedEntry("/shared");
getMetadataJob->setDepth(KIMAP::GetMetaDataJob::OneLevel);
getMetadataJob->setMaximumSize(1234);
......@@ -179,7 +179,7 @@ private Q_SLOTS:
//C: A000005 GETMETADATA "Folder1" (DEPTH 1) (MAXSIZE 1234) (/shared /shared2)
getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Metadata);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
getMetadataJob->addRequestedEntry("/shared");
getMetadataJob->addRequestedEntry("/shared2");
getMetadataJob->setDepth(KIMAP::GetMetaDataJob::OneLevel);
......@@ -189,7 +189,7 @@ private Q_SLOTS:
//C: A000006 GETMETADATA "Folder1" (DEPTH 1) (MAXSIZE 1234)
getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Metadata);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
getMetadataJob->setDepth(KIMAP::GetMetaDataJob::OneLevel);
getMetadataJob->setMaximumSize(1234);
QVERIFY(getMetadataJob->exec());
......@@ -197,14 +197,14 @@ private Q_SLOTS:
//C: A000007 GETMETADATA "Folder1" (DEPTH 1)
getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Metadata);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
getMetadataJob->setDepth(KIMAP::GetMetaDataJob::OneLevel);
QVERIFY(getMetadataJob->exec());
//C: A000008 GETMETADATA "Folder1" (MAXSIZE 1234)
getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Metadata);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
getMetadataJob->setDepth(KIMAP::GetMetaDataJob::NoDepth);
getMetadataJob->setMaximumSize(1234);
QVERIFY(getMetadataJob->exec());
......@@ -212,7 +212,7 @@ private Q_SLOTS:
//C: A000009 GETMETADATA "Folder1"
getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Metadata);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
getMetadataJob->setDepth(KIMAP::GetMetaDataJob::NoDepth);
QVERIFY(getMetadataJob->exec());
......@@ -307,12 +307,12 @@ private Q_SLOTS:
fakeServer.setScenario(scenario);
fakeServer.startAndWait();
KIMAP::Session session(QLatin1String("127.0.0.1"), 5989);
KIMAP::Session session(QStringLiteral("127.0.0.1"), 5989);
//C: A000001 GETANNOTATION "Folder1"
KIMAP::GetMetaDataJob *getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Annotatemore);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
QVERIFY(getMetadataJob->exec());
QCOMPARE(getMetadataJob->allMetaData(QLatin1String("Folder1")).size(), 0);
......@@ -320,7 +320,7 @@ private Q_SLOTS:
//C: A000002 GETANNOTATION "Folder1" ("/comment" "/motd") ("value.shared" "value.priv")
getMetadataJob = new KIMAP::GetMetaDataJob(&session);
getMetadataJob->setServerCapability(KIMAP::MetaDataJobBase::Annotatemore);
getMetadataJob->setMailBox(QLatin1String("Folder1"));
getMetadataJob->setMailBox(QStringLiteral("Folder1"));
getMetadataJob->addRequestedEntry("/shared/comment");
getMetadataJob->addRequestedEntry("/private/motd");
QVERIFY(getMetadataJob->exec());
......
......@@ -29,11 +29,11 @@
using namespace KIMAP;
ImapStreamParser::ImapStreamParser(QIODevice *socket, bool serverModeEnabled)
: m_position(0)
, m_literalSize(0)
{
m_socket = socket;
m_isServerModeEnabled = serverModeEnabled;
m_position = 0;
m_literalSize = 0;
}
QString ImapStreamParser::readUtf8String()
......
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