diff --git a/src/core/EntrySearcher.cpp b/src/core/EntrySearcher.cpp index 186a4e163..8ee07dd20 100644 --- a/src/core/EntrySearcher.cpp +++ b/src/core/EntrySearcher.cpp @@ -28,6 +28,15 @@ EntrySearcher::EntrySearcher(bool caseSensitive) { } +/** + * Search group, and its children, by parsing the provided search + * string for search terms. + * + * @param searchString search terms + * @param baseGroup group to start search from, cannot be null + * @param forceSearch ignore group search settings + * @return list of entries that match the search terms + */ QList EntrySearcher::search(const QString& searchString, const Group* baseGroup, bool forceSearch) { Q_ASSERT(baseGroup); @@ -36,6 +45,13 @@ QList EntrySearcher::search(const QString& searchString, const Group* ba return repeat(baseGroup, forceSearch); } +/** + * Repeat the last search starting from the given group + * + * @param baseGroup group to start search from, cannot be null + * @param forceSearch ignore group search settings + * @return list of entries that match the search terms + */ QList EntrySearcher::repeat(const Group* baseGroup, bool forceSearch) { Q_ASSERT(baseGroup); @@ -53,12 +69,26 @@ QList EntrySearcher::repeat(const Group* baseGroup, bool forceSearch) return results; } +/** + * Search provided entries by parsing the search string + * for search terms. + * + * @param searchString search terms + * @param entries list of entries to include in the search + * @return list of entries that match the search terms + */ QList EntrySearcher::searchEntries(const QString& searchString, const QList& entries) { parseSearchTerms(searchString); return repeatEntries(entries); } +/** + * Repeat the last search on the given entries + * + * @param entries list of entries to include in the search + * @return list of entries that match the search terms + */ QList EntrySearcher::repeatEntries(const QList& entries) { QList results; @@ -70,6 +100,11 @@ QList EntrySearcher::repeatEntries(const QList& entries) return results; } +/** + * Set the next search to be case sensitive or not + * + * @param state + */ void EntrySearcher::setCaseSensitive(bool state) { m_caseSensitive = state;