Commit c3d3589c authored by hjk's avatar hjk Committed by hjk

TreeModel: Remove now-unused TreeItem::setFlags() and m_flags

Change-Id: I1bae545b96c274a74cd6491b33ba138be489086f
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent b57faed1
......@@ -606,7 +606,7 @@ namespace Utils {
// TreeItem
//
TreeItem::TreeItem()
: m_parent(0), m_model(0), m_flags(Qt::ItemIsEnabled|Qt::ItemIsSelectable)
: m_parent(0), m_model(0)
{
}
......@@ -641,7 +641,7 @@ bool TreeItem::setData(int column, const QVariant &data, int role)
Qt::ItemFlags TreeItem::flags(int column) const
{
Q_UNUSED(column);
return m_flags;
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
}
bool TreeItem::hasChildren() const
......@@ -766,11 +766,6 @@ int TreeItem::level() const
return l;
}
void TreeItem::setFlags(Qt::ItemFlags flags)
{
m_flags = flags;
}
QModelIndex TreeItem::index() const
{
QTC_ASSERT(m_model, return QModelIndex());
......
......@@ -64,7 +64,6 @@ public:
TreeItem *lastChild() const;
int level() const;
void setFlags(Qt::ItemFlags flags);
int childCount() const { return m_children.size(); }
TreeItem *childAt(int index) const;
QVector<TreeItem *> children() const { return m_children; }
......@@ -137,7 +136,6 @@ private:
TreeItem *m_parent; // Not owned.
BaseTreeModel *m_model; // Not owned.
Qt::ItemFlags m_flags;
protected:
QVector<TreeItem *> m_children; // Owned.
......
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