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

Fix clazy warning

parent e072f35a
......@@ -46,7 +46,8 @@ void CreateNoteJob::start()
mNote.setLastModifiedDate(QDateTime::currentDateTimeUtc());
if (!mItem.relations().isEmpty()) {
Akonadi::Relation relation;
for (const Akonadi::Relation &r : mItem.relations()) {
const auto relations = mItem.relations();
for (const Akonadi::Relation &r : relations) {
// assuming that GENERIC relations to emails are notes is a pretty horrific hack imo - aseigo
if (r.type() == Akonadi::Relation::GENERIC && r.right().mimeType() == Akonadi::NoteUtils::noteMimeType()) {
relation = r;
......
......@@ -81,7 +81,8 @@ void AdblockManager::loadSubscriptions()
QDir(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)).mkdir(QStringLiteral("adblock"));
}
for (const QString &fileName : adblockDir.entryList(QStringList() << QStringLiteral("*.txt"), QDir::Files)) {
const QStringList files = adblockDir.entryList(QStringList() << QStringLiteral("*.txt"), QDir::Files);
for (const QString &fileName : files) {
if (fileName == QLatin1String("customlist.txt")) {
continue;
}
......
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