File indexing completed on 2024-05-12 05:11:14
0001 /* 0002 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 * 0006 */ 0007 0008 #include "abstractindexer.h" 0009 #include <TextUtils/ConvertText> 0010 0011 AbstractIndexer::AbstractIndexer() = default; 0012 0013 AbstractIndexer::~AbstractIndexer() = default; 0014 0015 void AbstractIndexer::move(Akonadi::Item::Id item, Akonadi::Collection::Id from, Akonadi::Collection::Id to) 0016 { 0017 Q_UNUSED(item) 0018 Q_UNUSED(from) 0019 Q_UNUSED(to) 0020 } 0021 0022 void AbstractIndexer::updateFlags(const Akonadi::Item &item, const QSet<QByteArray> &addedFlags, const QSet<QByteArray> &removed) 0023 { 0024 Q_UNUSED(item) 0025 Q_UNUSED(addedFlags) 0026 Q_UNUSED(removed) 0027 } 0028 0029 bool AbstractIndexer::respectDiacriticAndAccents() const 0030 { 0031 return mRespectDiacriticAndAccents; 0032 } 0033 0034 void AbstractIndexer::setRespectDiacriticAndAccents(bool newRespectDiacriticAndAccents) 0035 { 0036 mRespectDiacriticAndAccents = newRespectDiacriticAndAccents; 0037 } 0038 0039 QString AbstractIndexer::normalizeString(const QString &str) 0040 { 0041 if (mRespectDiacriticAndAccents) { 0042 return str; 0043 } else { 0044 return TextUtils::ConvertText::normalize(str); 0045 } 0046 }