Commit 0f765330 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warning

parent 9f95a75e
......@@ -96,7 +96,7 @@ private Q_SLOTS:
Index index;
QSharedPointer<DummyJobFactory> factory(new DummyJobFactory());
Scheduler scheduler(index, config, factory);
QSignalSpy statusSpy(&scheduler, SIGNAL(status(int,QString)));
QSignalSpy statusSpy(&scheduler, &Scheduler::status);
scheduler.setBusyTimeout(0);
//Wait for ready signal (indicates that indexing is complete)
QTRY_COMPARE(statusSpy.count(), 1);
......@@ -114,7 +114,7 @@ private Q_SLOTS:
Index index;
QSharedPointer<DummyJobFactory> factory(new DummyJobFactory());
Scheduler scheduler(index, config, factory);
QSignalSpy statusSpy(&scheduler, SIGNAL(status(int,QString)));
QSignalSpy statusSpy(&scheduler, &Scheduler::status);
QSignalSpy finishedIndexing(&scheduler, &Scheduler::collectionIndexingFinished);
scheduler.setBusyTimeout(0);
......@@ -143,7 +143,7 @@ private Q_SLOTS:
Index index;
QSharedPointer<DummyJobFactory> factory(new DummyJobFactory());
Scheduler scheduler(index, config, factory);
QSignalSpy statusSpy(&scheduler, SIGNAL(status(int,QString)));
QSignalSpy statusSpy(&scheduler, &Scheduler::status);
scheduler.setBusyTimeout(0);
Akonadi::Collection parent1(3);
......
......@@ -279,7 +279,7 @@ void EmailIndexer::processPart(KMime::Content *content, KMime::Content *mainCont
// FIXME: Handle attachments?
}
void EmailIndexer::processMessageStatus(const Akonadi::MessageStatus &status)
void EmailIndexer::processMessageStatus(Akonadi::MessageStatus status)
{
insertBool('R', status.isRead());
insertBool('A', status.hasAttachment());
......
......@@ -61,7 +61,7 @@ private:
void process(const KMime::Message::Ptr &msg);
void processPart(KMime::Content *content, KMime::Content *mainContent);
void processMessageStatus(const Akonadi::MessageStatus &status);
void processMessageStatus(Akonadi::MessageStatus status);
void insert(const QByteArray &key, KMime::Headers::Base *base);
void insert(const QByteArray &key, KMime::Headers::Generics::MailboxList *mlist);
......
......@@ -168,7 +168,7 @@ void Term::setSubTerms(const QList<Term> &terms)
Term Term::subTerm() const
{
if (d->m_subTerms.size()) {
if (!d->m_subTerms.isEmpty()) {
return d->m_subTerms.first();
}
......
......@@ -89,7 +89,7 @@ void XapianTermGenerator::indexText(const QString &text, const QString &prefix,
//const QByteArray ta = text.toUtf8();
//m_termGen.index_text(ta.constData(), wdfInc, par.constData());
QStringList terms = termList(text);
const QStringList terms = termList(text);
for (const QString &term : terms) {
QByteArray arr = term.toUtf8();
......
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