Making stuff const.

This commit is contained in:
Martin Rotter 2016-01-10 08:55:22 +01:00
parent e41b62b16f
commit ebbeb8056b
2 changed files with 6 additions and 6 deletions

@ -486,7 +486,7 @@ void FeedsModel::reassignNodeToNewParent(RootItem *original_node, RootItem *new_
} }
} }
QList<ServiceRoot*> FeedsModel::serviceRoots() { QList<ServiceRoot*> FeedsModel::serviceRoots() const {
QList<ServiceRoot*> roots; QList<ServiceRoot*> roots;
foreach (RootItem *root, m_rootItem->childItems()) { foreach (RootItem *root, m_rootItem->childItems()) {
@ -498,7 +498,7 @@ QList<ServiceRoot*> FeedsModel::serviceRoots() {
return roots; return roots;
} }
bool FeedsModel::containsServiceRootFromEntryPoint(ServiceEntryPoint *point) { bool FeedsModel::containsServiceRootFromEntryPoint(ServiceEntryPoint *point) const {
foreach (RootItem *root, serviceRoots()) { foreach (RootItem *root, serviceRoots()) {
if (root->toServiceRoot()->code() == point->code()) { if (root->toServiceRoot()->code() == point->code()) {
return true; return true;
@ -508,7 +508,7 @@ bool FeedsModel::containsServiceRootFromEntryPoint(ServiceEntryPoint *point) {
return false; return false;
} }
StandardServiceRoot *FeedsModel::standardServiceRoot() { StandardServiceRoot *FeedsModel::standardServiceRoot() const {
foreach (RootItem *root, serviceRoots()) { foreach (RootItem *root, serviceRoots()) {
StandardServiceRoot *std_service_root; StandardServiceRoot *std_service_root;

@ -81,14 +81,14 @@ class FeedsModel : public QAbstractItemModel {
// Returns all activated service roots. // Returns all activated service roots.
// NOTE: Service root nodes are lying directly UNDER // NOTE: Service root nodes are lying directly UNDER
// the model root item. // the model root item.
QList<ServiceRoot*> serviceRoots(); QList<ServiceRoot*> serviceRoots() const;
// Determines if there is any account activated from given entry point. // Determines if there is any account activated from given entry point.
bool containsServiceRootFromEntryPoint(ServiceEntryPoint *point); bool containsServiceRootFromEntryPoint(ServiceEntryPoint *point) const;
// Direct and the only global accessor to standard service root. // Direct and the only global accessor to standard service root.
// NOTE: Standard service root is always activated. // NOTE: Standard service root is always activated.
StandardServiceRoot *standardServiceRoot(); StandardServiceRoot *standardServiceRoot() const;
// Returns the list of feeds which should be updated // Returns the list of feeds which should be updated
// according to auto-update schedule. // according to auto-update schedule.