Akonadi
collectionmaintenancepage.cpp
42 const auto service = ServerManager::agentServiceName(ServerManager::Agent, QStringLiteral("akonadi_indexing_agent"));
43 QDBusInterface indexingAgentIface(service, QStringLiteral("/"), QStringLiteral("org.freedesktop.Akonadi.Indexer"));
45 indexingAgentIface.call(QStringLiteral("reindexCollection"), static_cast<qlonglong>(currentCollection.id()));
85 connect(d->monitor, &Monitor::collectionStatisticsChanged, this, [this](Collection::Id /*unused*/, const CollectionStatistics &stats) {
105 && resource.customProperties().value(QStringLiteral("HasLocalStorage"), QString()) != QLatin1String("true")) {
117 d->updateLabel(col.statistics().count(), col.statistics().unreadCount(), col.statistics().size());
122 const auto service = ServerManager::agentServiceName(ServerManager::Agent, QStringLiteral("akonadi_indexing_agent"));
123 QDBusInterface indexingAgentIface(service, QStringLiteral("/"), QStringLiteral("org.freedesktop.Akonadi.Indexer"));
125 auto reply = indexingAgentIface.asyncCall(QStringLiteral("indexedItems"), static_cast<qint64>(col.id()));
131 qCWarning(AKONADIWIDGETS_LOG) << "Failed to retrieve indexed items count:" << reply.error().message();
133 d->ui.indexedCountLbl->setText(i18np("Indexed %1 item in this folder", "Indexed %1 items in this folder", reply.argumentAt<0>()));
150 if (!collection.hasAttribute<Akonadi::IndexPolicyAttribute>() && d->ui.enableIndexingChkBox->isChecked()) {
154 auto attr = collection.attribute<Akonadi::IndexPolicyAttribute>(Akonadi::Collection::AddIfMissing);
Provides statistics information of a Collection.
Definition: core/collectionstatistics.h:58
void finished(QDBusPendingCallWatcher *self)
KIOCORE_EXPORT QString convertSize(KIO::filesize_t size)
QString number(int n, int base)
QCA_EXPORT void init()
bool contains(const QString &str, Qt::CaseSensitivity cs) const const
void clicked(bool checked)
bool isError() const const
qint64 size() const
Returns the total size of the items in this collection or -1 if this information is not available.
Definition: core/collectionstatistics.cpp:57
An attribute to specify how a collection should be indexed for searching.
Definition: indexpolicyattribute.h:26
static QString agentServiceName(ServiceAgentType agentType, const QString &identifier)
Returns the namespaced D-Bus service name for an agent of type agentType with agent identifier identi...
Definition: servermanager.cpp:351
qint64 count() const
Returns the number of items in this collection or -1 if this information is not available.
Definition: core/collectionstatistics.cpp:37
Attribute * attribute(const QByteArray &name)
Returns the attribute of the given type name if available, 0 otherwise.
Definition: collection.cpp:176
AgentInstance instance(const QString &identifier) const
Returns the agent instance with the given identifier or an invalid agent instance if the identifier d...
Definition: core/agentmanager.cpp:385
void deleteLater()
QString i18n(const char *text, const TYPE &arg...)
CachePolicy cachePolicy() const
Returns the cache policy of the collection.
Definition: collection.cpp:336
qint64 unreadCount() const
Returns the number of unread items in this collection or -1 if this information is not available.
Definition: core/collectionstatistics.cpp:47
bool hasAttribute(const QByteArray &name) const
Returns true if the collection has an attribute of the given type name, false otherwise.
Definition: collection.cpp:161
QStringList localParts() const
Returns the parts to permanently cache locally.
Definition: cachepolicy.cpp:65
void setIndexingEnabled(bool enable)
Sets whether this collection should be indexed at all.
Definition: indexpolicyattribute.cpp:31
CollectionStatistics statistics() const
Returns the collection statistics of the collection.
Definition: collection.cpp:326
void collectionStatisticsChanged(Akonadi::Collection::Id id, const Akonadi::CollectionStatistics &statistics)
This signal is emitted if the statistics information of a monitored collection has changed.
static AgentManager * self()
Returns the global instance of the agent manager.
Definition: core/agentmanager.cpp:355
A single page in a collection properties dialog.
Definition: collectionpropertiespage.h:88
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.