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 FEEDMODEL_H
  2. #define FEEDMODEL_H
  3.  
  4. #include <QObject>
  5. #include <QAbstractItemModel>
  6. #include <QSqlDatabase>
  7. #include <QtXml>
  8.  
  9. namespace Larss {
  10.  
  11. #define FEEDMODEL_MAX_CATEGORIES 1024
  12.  
  13. class FeedModel : public QAbstractItemModel {
  14. Q_OBJECT
  15.  
  16. public:
  17. explicit FeedModel(QSqlDatabase db, QObject *parent = 0);
  18.  
  19. /**
  20.   * @brief Destructor for the FeedModel
  21.   */
  22. ~FeedModel();
  23.  
  24. /**
  25.   * @brief Get the ModelIndex associated with a given row and column.
  26.   */
  27. QModelIndex index(int row, int column, const QModelIndex &parent) const;
  28.  
  29. /**
  30.   * @brief Get the number of rows in the list.
  31.   */
  32. int rowCount(const QModelIndex &parent) const;
  33.  
  34. /**
  35.   * @brief Get the number of column
  36.   */
  37. int columnCount(const QModelIndex &parent) const;
  38.  
  39. /**
  40.   * @brief Get the data associated to a given node.
  41.   */
  42. QVariant data(const QModelIndex &index, int role) const;
  43.  
  44. /**
  45.   * @brief Get the parent of a given node.
  46.   */
  47. QModelIndex parent(const QModelIndex &child) const;
  48.  
  49. /**
  50.   * @brief Return the flags for the given item.
  51.   */
  52. Qt::ItemFlags flags(const QModelIndex &index) const;
  53.  
  54. /**
  55.   * @brief Return the data to be inserted in the column header of the treeview.
  56.   */
  57. QVariant headerData(int section, Qt::Orientation orientation, int role) const;
  58.  
  59. /**
  60.   * @brief Return the URL associated with a given ModelIndex
  61.   */
  62. QString getUrl (const QModelIndex& index);
  63.  
  64. /**
  65.   * @brief Method used to change the data in the database
  66.   */
  67. bool setData(const QModelIndex &index, const QVariant &value, int role);
  68.  
  69. /**
  70.   * @brief Add a category.
  71.   */
  72. bool addCategory (QString name);
  73.  
  74. /**
  75.   * @brief Add a new feed in the specified category.
  76.   */
  77. bool addFeed (QString name, QString url, quint32 category_id);
  78.  
  79. signals:
  80.  
  81. public slots:
  82.  
  83. private:
  84. /**
  85.   * @brief Database containing the data of the feeds.
  86.   */
  87. QSqlDatabase db;
  88.  
  89.  
  90. };
  91.  
  92. }
  93.  
  94. #endif // FEEDMODEL_H