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

Fix some clazy warnings

parent e271e010
Pipeline #150133 passed with stage
in 4 minutes and 37 seconds
......@@ -22,9 +22,7 @@ ResultIterator::ResultIterator()
{
}
ResultIterator::ResultIterator(const ResultIterator &rhs)
= default;
ResultIterator::ResultIterator(const ResultIterator &rhs) = default;
ResultIterator::~ResultIterator() = default;
......
......@@ -59,7 +59,7 @@ int main(int argc, char **argv)
db.commit();
int dbSize = 0;
QDir dbDir(tempDir.path());
const QDir dbDir(tempDir.path());
const auto entryInfoList = dbDir.entryInfoList(QDir::Files);
for (const QFileInfo &file : entryInfoList) {
qDebug() << file.fileName() << file.size() / 1024 << "kb";
......
......@@ -20,7 +20,6 @@ using namespace Akonadi::Search;
XapianSearchStore::XapianSearchStore(QObject *parent)
: SearchStore(parent)
, m_mutex()
, m_nextId(1)
{
}
......@@ -60,7 +59,7 @@ Xapian::Query XapianSearchStore::toXapianQuery(Xapian::Query::op op, const QList
queries.reserve(terms.size());
for (const Term &term : terms) {
Xapian::Query q = toXapianQuery(term);
const Xapian::Query q = toXapianQuery(term);
queries << q;
}
......
......@@ -107,7 +107,7 @@ private:
};
QHash<int, Result> m_queryMap;
int m_nextId;
int m_nextId = 1;
QString m_dbPath;
......
......@@ -55,7 +55,7 @@ QStringList XapianTermGenerator::termList(const QString &text)
QString cleanString;
cleanString.reserve(denormalized.size());
for (const QChar &ch : denormalized) {
auto cat = ch.category();
const auto cat = ch.category();
if (cat != QChar::Mark_NonSpacing && cat != QChar::Mark_SpacingCombining && cat != QChar::Mark_Enclosing) {
cleanString.append(ch);
}
......
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