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 data to be inserted in the column header of the treeview.
  51.   */
  52. QVariant headerData(int section, Qt::Orientation orientation, int role) const;
  53.  
  54. /**
  55.   * @brief Return the URL associated with a given ModelIndex
  56.   */
  57. QString getUrl (const QModelIndex& index);
  58.  
  59. /**
  60.   * @brief Method used to change the data in the database
  61.   */
  62. bool setData(const QModelIndex &index, const QVariant &value, int role);
  63.  
  64. /**
  65.   * @brief Add a category.
  66.   */
  67. bool addCategory (QString name);
  68.  
  69. /**
  70.   * @brief Add a new feed in the specified category.
  71.   */
  72. bool addFeed (QString name, QString url, quint32 category_id);
  73.  
  74. signals:
  75.  
  76. public slots:
  77.  
  78. private:
  79. /**
  80.   * @brief Database containing the data of the feeds.
  81.   */
  82. QSqlDatabase db;
  83.  
  84.  
  85. };
  86.  
  87. }
  88.  
  89. #endif // FEEDMODEL_H