mirror of https://github.com/kiwix/libkiwix.git
Readd a `SearchRenderer` constructor without `Library` argument.
Adding the library argument breaks the API. It is better to add another constructor to not have to create another major version.
This commit is contained in:
parent
a11abcf480
commit
ec18eb40ea
|
@ -49,10 +49,24 @@ class SearchRenderer
|
||||||
/**
|
/**
|
||||||
* Construct a SearchRenderer from a SearchResultSet.
|
* Construct a SearchRenderer from a SearchResultSet.
|
||||||
*
|
*
|
||||||
|
* The constructed version of the SearchRendered will not introduce
|
||||||
|
* the book name for each result. It is better to use the another constructor
|
||||||
|
* with a Library pointer to have a better html page.
|
||||||
|
*
|
||||||
* @param srs The `SearchResultSet` to render.
|
* @param srs The `SearchResultSet` to render.
|
||||||
* @param mapper The `NameMapper` to use to do the rendering.
|
* @param mapper The `NameMapper` to use to do the rendering.
|
||||||
* @param library The `Library` to use to look up book details for search
|
* @param start The start offset used for the srs.
|
||||||
* results
|
* @param estimatedResultCount The estimatedResultCount of the whole search
|
||||||
|
*/
|
||||||
|
SearchRenderer(zim::SearchResultSet srs, NameMapper* mapper,
|
||||||
|
unsigned int start, unsigned int estimatedResultCount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct a SearchRenderer from a SearchResultSet.
|
||||||
|
*
|
||||||
|
* @param srs The `SearchResultSet` to render.
|
||||||
|
* @param mapper The `NameMapper` to use to do the rendering.
|
||||||
|
* @param library The `Library` to use to look up book details for search results.
|
||||||
* @param start The start offset used for the srs.
|
* @param start The start offset used for the srs.
|
||||||
* @param estimatedResultCount The estimatedResultCount of the whole search
|
* @param estimatedResultCount The estimatedResultCount of the whole search
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -47,6 +47,11 @@ SearchRenderer::SearchRenderer(Searcher* searcher, NameMapper* mapper)
|
||||||
resultStart(searcher->getResultStart())
|
resultStart(searcher->getResultStart())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
SearchRenderer::SearchRenderer(zim::SearchResultSet srs, NameMapper* mapper,
|
||||||
|
unsigned int start, unsigned int estimatedResultCount)
|
||||||
|
: SearchRenderer(srs, mapper, nullptr, start, estimatedResultCount)
|
||||||
|
{}
|
||||||
|
|
||||||
SearchRenderer::SearchRenderer(zim::SearchResultSet srs, NameMapper* mapper, Library* library,
|
SearchRenderer::SearchRenderer(zim::SearchResultSet srs, NameMapper* mapper, Library* library,
|
||||||
unsigned int start, unsigned int estimatedResultCount)
|
unsigned int start, unsigned int estimatedResultCount)
|
||||||
: m_srs(srs),
|
: m_srs(srs),
|
||||||
|
|
Loading…
Reference in New Issue