viewgit/index.php:465 Only variables should be passed by reference [2048]

viewgit/index.php:466 Non-static method GeSHi::get_language_name_from_extension() should not be called statically [2048]

  1. #ifndef RSSPARSER_H
  2. #define RSSPARSER_H
  3.  
  4. #include <QObject>
  5. #include <QtNetwork/QNetworkAccessManager>
  6. #include <QList>
  7. #include <QSqlTableModel>
  8. #include "feedmodel.h"
  9.  
  10. namespace Larss {
  11.  
  12. class RssParser : public QSqlTableModel
  13. {
  14. Q_OBJECT
  15. public:
  16. /**
  17.   * @brief RssParser constructor.
  18.   */
  19. explicit RssParser(QSqlDatabase db, FeedModel * model = NULL, QObject *parent = 0);
  20.  
  21. /**
  22.   * @brief Default destructor.
  23.   */
  24. ~RssParser();
  25.  
  26. /**
  27.   * @brief Function that tells the views that use this model
  28.   * what to display in the title of the columns.
  29.   */
  30. QVariant headerData (int section, Qt::Orientation orientation, int role) const;
  31.  
  32. /**
  33.   * @brief Get the link associated with a given ModelIndex.
  34.   */
  35. QString getLink (const QModelIndex& index);
  36.  
  37. /**
  38.   * @brief Get the id of the feed pointed by the QModelIndex or
  39.   * 0 if there is no feed pointed (i.e. is a category or
  40.   * the root of the tree).
  41.   */
  42. quint64 getFeed (const QModelIndex& index);
  43.  
  44. /**
  45.   * @brief Get the content associated with the feed.
  46.   */
  47. QString getContent (const QModelIndex& index);
  48.  
  49. /**
  50.   * @brief Get the title of a news pointed by index
  51.   */
  52. QString getTitle (const QModelIndex& index);
  53.  
  54. /**
  55.   * @brief Get the number of unread post for the feed pointed by
  56.   * the given QModelIndex.
  57.   */
  58. quint32 getUnreadCount (const QModelIndex& index);
  59.  
  60. /**
  61.   * @brief Set the read status on a news.
  62.   */
  63. void setReadStatus (const QModelIndex& index, bool read);
  64.  
  65. /**
  66.   * @brief Reimplement data to make unread post bold.
  67.   */
  68. QVariant data(const QModelIndex &idx, int role) const;
  69.  
  70. /**
  71.   * @brief Set the active category to display.
  72.   */
  73. void selectActiveFeed (quint64 feed_id);
  74.  
  75. /**
  76.   * @brief Get the next unread element.
  77.   */
  78. int getNextUnread (const QModelIndex& index);
  79.  
  80. /**
  81.   * @brief Delete all news that are from the given feed.
  82.   */
  83. void removeNewsForFeed (const QModelIndex& index);
  84.  
  85. /**
  86.   * @brief Database where all the news will be loaded and saved.
  87.   */
  88. QSqlDatabase db;
  89.  
  90. signals:
  91.  
  92. public slots:
  93.  
  94. private:
  95.  
  96. /**
  97.   * @brief The FeedModel
  98.   */
  99. FeedModel *model;
  100. };
  101.  
  102. }
  103.  
  104. #endif // RSSPARSER_H