Akonadi
searchmanager.cpp
   39SearchManager::SearchManager(const QStringList &searchEngines, SearchTaskManager &agentSearchManager)
  141        qCDebug(AKONADISERVER_SEARCH_LOG) << "SEARCH MANAGER: searching in " << path << ":" << fileNames;
  145            const QVariantMap metadata = loader->metaData().value(QStringLiteral("MetaData")).toVariant().toMap();
  146            if (metadata.value(QStringLiteral("X-Akonadi-PluginType")).toString() != QLatin1StringView("SearchPlugin")) {
  152                qCDebug(AKONADISERVER_SEARCH_LOG) << "Already loaded one version of this plugin, skipping: " << libraryName;
  159                    qCDebug(AKONADISERVER_SEARCH_LOG) << libraryName << "skipped because of AKONADI_OVERRIDE_SEARCHPLUGIN";
  169                qCCritical(AKONADISERVER_SEARCH_LOG) << "Failed to load search plugin" << libraryName << ":" << loader->errorString();
  183            qCCritical(AKONADISERVER_SEARCH_LOG) << "Failed to load search plugin" << loader->fileName() << ":" << loader->errorString();
  189            qCCritical(AKONADISERVER_SEARCH_LOG) << loader->fileName() << "is not a valid Akonadi search plugin";
  193        qCDebug(AKONADISERVER_SEARCH_LOG) << "SearchManager: loaded search plugin" << loader->fileName();
  203    QMetaObject::invokeMethod(mSearchUpdateTimer, qOverload<>(&QTimer::start), Qt::QueuedConnection);
  209    const Collection::List collections = Collection::retrieveFiltered(Collection::parentIdFullColumnName(), 1);
  250        qCWarning(AKONADISERVER_SEARCH_LOG) << "The query is at least 32768 chars long, which is the maximum size supported by the akonadi db schema. The "
  287        queryCollections += SearchHelper::matchSubcollectionsByMimeType(queryAncestors, queryMimeTypes);
  290    // This happens if we try to search a virtual collection in recursive mode (because virtual collections are excluded from listCollectionsRecursive)
  292        qCDebug(AKONADISERVER_SEARCH_LOG) << "No collections to search, you're probably trying to search a virtual collection.";
  297    const QByteArray id = "searchUpdate-" + QByteArray::number(QDateTime::currentDateTimeUtc().toSecsSinceEpoch());
  305    connect(&request, &SearchRequest::resultsAvailable, this, &SearchManager::searchUpdateResultsAvailable);
  345    qCInfo(AKONADISERVER_SEARCH_LOG) << "Search update for collection" << collection.name() << "(" << collection.id() << ") finished:"
  352    qCDebug(AKONADISERVER_SEARCH_LOG) << "searchUpdateResultsAvailable" << collection.id() << results.count() << "results";
  372    qCDebug(AKONADISERVER_SEARCH_LOG) << "Got" << newMatches.count() << "results, out of which" << existingMatches.count() << "are already in the collection";
  380    Transaction transaction(DataStore::self(), QStringLiteral("PUSH SEARCH RESULTS"), !DataStore::self()->inTransaction());
  415        qCDebug(AKONADISERVER_SEARCH_LOG) << "Search backend returned" << (newMatches.count() - items.count()) << "results that no longer exist in Akonadi.";
Search engine for distributing searches to agents.
Definition agentsearchengine.h:17
NotificationCollector * notificationCollector()
Returns the notification collector of this DataStore object.
Definition datastore.cpp:242
Part of the DataStore, collects change notifications and emits them after the current transaction has...
Definition notificationcollector.h:31
void itemsUnlinked(const PimItem::List &items, const Collection &collection)
Notify about unlinked items.
Definition notificationcollector.cpp:112
bool dispatchNotifications()
Trigger sending of collected notifications.
Definition notificationcollector.cpp:592
void itemsLinked(const PimItem::List &items, const Collection &collection)
Notify about linked items.
Definition notificationcollector.cpp:107
void addValueCondition(const QString &column, Query::CompareOperator op, const QVariant &value, ConditionType type=WhereCondition)
Add a WHERE or HAVING condition which compares a column with a given value.
Definition querybuilder.cpp:258
void addColumn(const QString &col)
Adds the given column to a select query.
Definition querybuilder.cpp:624
virtual void registerInstance(const QString &id)
This is called via D-Bus from AgentManager to register an agent with search interface.
Definition searchmanager.cpp:113
SearchManager(const QStringList &searchEngines, SearchTaskManager &agentSearchManager)
Create a new search manager with the given searchEngines.
Definition searchmanager.cpp:39
virtual QList< AbstractSearchPlugin * > searchPlugins() const
Returns currently available search plugins.
Definition searchmanager.cpp:123
virtual void updateSearch(const Collection &collection)
Updates the search query synchronously.
Definition searchmanager.cpp:225
virtual void unregisterInstance(const QString &id)
This is called via D-Bus from AgentManager to unregister an agent with search interface.
Definition searchmanager.cpp:118
virtual void updateSearchAsync(const Collection &collection)
Updates the search query asynchronously.
Definition searchmanager.cpp:215
Helper integration between Akonadi and Qt.
QByteArray number(double n, char format, int precision)
QStringList libraryPaths()
QDateTime currentDateTimeUtc()
ExportAllSlots
UnregisterTree
void disconnectFromBus(const QString &name)
QString name() const const
bool registerObject(const QString &path, QObject *object, RegisterOptions options)
QDBusConnection sessionBus()
void unregisterObject(const QString &path, UnregisterMode mode)
Files
qsizetype count() const const
bool isEmpty() const const
void reserve(qsizetype size)
qsizetype size() const const
T value(const Key &key, const T &defaultValue) const const
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
const QObjectList & children() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QVariant property(const char *name) const const
T qobject_cast(QObject *object)
QObject * sender() const const
bool contains(const QSet< T > &other) const const
qsizetype count() const const
bool isEmpty() const const
bool next()
QVariant value(const QString &name) const const
QString fromLatin1(QByteArrayView str)
bool isEmpty() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
QueuedConnection
void start()
void timeout()
QVariant fromValue(T &&value)
qlonglong toLongLong(bool *ok) const const
T value() const const
  This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:53:09 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
          Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:53:09 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.