KNewStuff
resultsstream.cpp
34ResultsStream::ResultsStream([[maybe_unused]] const Provider::SearchRequest &request, EngineBase *base)
37 // This ctor should not be used. It is private and we don't use. Nobody else should either. Here for ABI stability.
50 auto entriesLoaded = [this](const KNSCore::SearchRequest &request, const KNSCore::Entry::List &entries) {
70 qCWarning(KNEWSTUFFCORE) << "Request finished twice, check your provider" << sender() << d->engine;
103 connect(provider->d->base, &ProviderBase::entryDetailsLoaded, this, [this](const KNSCore::Entry &entry) {
104 if (d->request.d->filter == KNSCore::Filter::ExactEntryId && d->request.d->searchTerm == entry.uniqueId()) {
152 // fetchMore requires some extra tinkering but this is worthwhile. By offering a fetchMore we can fully encapsulate
153 // a search state so the caller doesn't have to worry about persisting SearchRequests. Instead we'll do it for them.
161 SearchRequest(d->request.d->sortMode, d->request.d->filter, d->request.d->searchTerm, d->request.d->categories, nextPage, d->request.d->pageSize);
The ResultsStream is returned by EngineBase::search.
Definition resultsstream.h:34
void fetch()
Issues the search, make sure all signals are connected before calling.
Definition resultsstream.cpp:117
void fetchMore()
Increments the requested page and issues another search.
Definition resultsstream.cpp:150
QCA_EXPORT ProviderList providers()
bool isEmpty() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
bool disconnect(const QMetaObject::Connection &connection)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:20:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:20:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.