Commit 340c4d2f authored by Laurent Montel's avatar Laurent Montel 😁

const'ify

parent 73ad2be3
......@@ -51,18 +51,18 @@ KcmTreeItem *KcmTreeItem::child(const int row)
return nullptr;
}
int KcmTreeItem::childCount()
int KcmTreeItem::childCount() const
{
return m_children.count();
}
int KcmTreeItem::columnCount()
int KcmTreeItem::columnCount() const
{
// Hard coded, menu should never have more than one column
return 1;
}
KcmTreeItem *KcmTreeItem::parent()
KcmTreeItem *KcmTreeItem::parent() const
{
return m_parent;
}
......
......@@ -77,12 +77,12 @@ class KcmTreeItem
/**
* Get amount of children
*/
int childCount();
int childCount() const;
/**
* Get parent of current tree item
*/
KcmTreeItem *parent();
KcmTreeItem *parent() const;
/**
* Get index of tree item
......@@ -93,7 +93,7 @@ class KcmTreeItem
* Get amount of columns that tree item contains.
* Hardcoded to 1
*/
int columnCount();
int columnCount() const;
/**
* Get row of tree item
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment