summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qstandarditemmodel_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemviews/qstandarditemmodel_p.h')
-rw-r--r--src/gui/itemviews/qstandarditemmodel_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/itemviews/qstandarditemmodel_p.h b/src/gui/itemviews/qstandarditemmodel_p.h
index b2b16d1..8be8e9e 100644
--- a/src/gui/itemviews/qstandarditemmodel_p.h
+++ b/src/gui/itemviews/qstandarditemmodel_p.h
@@ -152,7 +152,7 @@ public:
inline QStandardItem *itemFromIndex(const QModelIndex &index) const {
Q_Q(const QStandardItemModel);
if (!index.isValid())
- return root;
+ return root.data();
if (index.model() != q)
return 0;
QStandardItem *parent = static_cast<QStandardItem*>(index.internalPointer());
@@ -177,7 +177,7 @@ public:
QVector<QStandardItem*> columnHeaderItems;
QVector<QStandardItem*> rowHeaderItems;
- QStandardItem *root;
+ QScopedPointer<QStandardItem> root;
const QStandardItem *itemPrototype;
int sortRole;
};