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