LCOV - code coverage report
Current view: top level - src/models - SearchFeedItem.cpp (source / functions) Coverage Total Hit
Test: coverage.info.cleaned Lines: 76.5 % 17 13
Test Date: 2026-03-23 10:19:47 Functions: 60.0 % 5 3

            Line data    Source code
       1              : #include "SearchFeedItem.h"
       2              : 
       3            1 : SearchFeedItem::SearchFeedItem(ListModel *feedList) :
       4              :     LisvelFeedItem(FEED_ID_SEARCH, -3, "Search Results", feedList),
       5            1 :     searchScope(Scope::Global),
       6            1 :     scopeId(-1)
       7              : {
       8            1 : }
       9              : 
      10            1 : void SearchFeedItem::setScope(Scope scope, qint64 id)
      11              : {
      12            1 :     searchScope = scope;
      13            1 :     scopeId = id;
      14            1 : }
      15              : 
      16            8 : void SearchFeedItem::setSearchQuery(const QString& query)
      17              : {
      18            8 :     searchQuery = query.trimmed();
      19              : 
      20              :     // Clear any existing results when starting a new search.
      21            8 :     clearNews();
      22              : 
      23            8 :     setTitle("Search Results");
      24            8 : }
      25              : 
      26            0 : bool SearchFeedItem::canBookmark(qint64 bookmarkID, bool allowBackward)
      27              : {
      28              :     Q_UNUSED(bookmarkID);
      29              :     Q_UNUSED(allowBackward);
      30              : 
      31              :     // Search results are relevance-ordered, not chronological.
      32              :     // Bookmarking doesn't make sense in this context.
      33            0 :     return false;
      34              : }
      35              : 
      36            0 : bool SearchFeedItem::bookmarksEnabled() const
      37              : {
      38            0 :     return false;
      39              : }
        

Generated by: LCOV version 2.0-1