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

View File

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

View File

@ -81,14 +81,14 @@ class FeedsModel : public QAbstractItemModel {
// Returns all activated service roots.
// NOTE: Service root nodes are lying directly UNDER
// the model root item.
QList<ServiceRoot*> serviceRoots();
QList<ServiceRoot*> serviceRoots() const;
// 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.
// NOTE: Standard service root is always activated.
StandardServiceRoot *standardServiceRoot();
StandardServiceRoot *standardServiceRoot() const;
// Returns the list of feeds which should be updated
// according to auto-update schedule.