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

Fix some clazy warning

parent 39dfe517
Pipeline #61640 passed with stage
in 11 minutes and 2 seconds
...@@ -67,7 +67,8 @@ template<class T> static void compareLists(const QVector<T> &l1, const QVector<T ...@@ -67,7 +67,8 @@ template<class T> static void compareLists(const QVector<T> &l1, const QVector<T
} }
} }
template<typename T> static T *extractAttribute(QList<Attribute *> attrs) template<typename T>
static T *extractAttribute(const QList<Attribute *> &attrs)
{ {
T dummy; T dummy;
for (Attribute *attr : attrs) { for (Attribute *attr : attrs) {
......
...@@ -29,7 +29,7 @@ private Q_SLOTS: ...@@ -29,7 +29,7 @@ private Q_SLOTS:
Collection col; Collection col;
col.setName(QLatin1String("test_collection")); col.setName(QLatin1String("test_collection"));
col.setContentMimeTypes({Collection::mimeType()}); col.setContentMimeTypes({Collection::mimeType()});
col.setParentCollection(Collection(AkonadiTest::collectionIdFromPath(QLatin1String("res1")))); col.setParentCollection(Collection(AkonadiTest::collectionIdFromPath(QStringLiteral("res1"))));
col.setRights(Collection::AllRights); col.setRights(Collection::AllRights);
auto cj = new CollectionCreateJob(col, this); auto cj = new CollectionCreateJob(col, this);
...@@ -39,7 +39,7 @@ private Q_SLOTS: ...@@ -39,7 +39,7 @@ private Q_SLOTS:
auto attr = col.attribute<EntityDisplayAttribute>(Collection::AddIfMissing); auto attr = col.attribute<EntityDisplayAttribute>(Collection::AddIfMissing);
attr->setDisplayName(QStringLiteral("Test Collection")); attr->setDisplayName(QStringLiteral("Test Collection"));
col.setContentMimeTypes({Collection::mimeType(), QLatin1String("application/octet-stream")}); col.setContentMimeTypes({Collection::mimeType(), QStringLiteral("application/octet-stream")});
auto mj = new CollectionModifyJob(col, this); auto mj = new CollectionModifyJob(col, this);
AKVERIFYEXEC(mj); AKVERIFYEXEC(mj);
......
...@@ -37,7 +37,7 @@ bool SetupTest::startAkonadiDaemon() ...@@ -37,7 +37,7 @@ bool SetupTest::startAkonadiDaemon()
mAkonadiDaemonProcess->setProgram(Akonadi::StandardDirs::findExecutable(QStringLiteral("akonadi_control")), {QStringLiteral("--instance"), instanceId()}); mAkonadiDaemonProcess->setProgram(Akonadi::StandardDirs::findExecutable(QStringLiteral("akonadi_control")), {QStringLiteral("--instance"), instanceId()});
mAkonadiDaemonProcess->start(); mAkonadiDaemonProcess->start();
const bool started = mAkonadiDaemonProcess->waitForStarted(5000); const bool started = mAkonadiDaemonProcess->waitForStarted(5000);
qCInfo(AKONADITEST_LOG) << "Started akonadi daemon with pid:" << mAkonadiDaemonProcess->pid(); qCInfo(AKONADITEST_LOG) << "Started akonadi daemon with pid:" << mAkonadiDaemonProcess->processId();
return started; return started;
} }
......
...@@ -288,6 +288,7 @@ Protocol::ChangeNotificationPtr ChangeRecorderJournalReader::loadItemNotificatio ...@@ -288,6 +288,7 @@ Protocol::ChangeNotificationPtr ChangeRecorderJournalReader::loadItemNotificatio
item.setFlags(bav); item.setFlags(bav);
stream >> cnt; stream >> cnt;
QVector<Protocol::FetchTagsResponse> tags; QVector<Protocol::FetchTagsResponse> tags;
tags.reserve(cnt);
for (int k = 0; k < cnt; ++k) { for (int k = 0; k < cnt; ++k) {
Protocol::FetchTagsResponse tag; Protocol::FetchTagsResponse tag;
stream >> i64; stream >> i64;
......
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