summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2013-09-02 17:29:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-04 18:52:29 +0200
commit63b5082ea8e3e750af986f815474f7207006cb46 (patch)
tree8e638c5e37c99e5b494f89a26ff9911b51531c25
parentdc7972b261f6302f5a346a19c89cb1cfb567cee0 (diff)
Unhide QObject::parent() from QAbstract{Table,List}model.
Both overwrite QAbstractItemModel's parent taking a QModelIndex which hides the QObject::parent() method. This must be explicitly forwarded like e.g. QAbstractItemModel is doing. Change-Id: I6149ae365cd8467248f4ca79a3cb898e62068b10 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index ac98476492..95b9d271f3 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -432,6 +432,15 @@ public:
int row, int column, const QModelIndex &parent);
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+
+#ifdef Q_NO_USING_KEYWORD
+#ifndef Q_QDOC
+ inline QObject *parent() const { return QAbstractItemModel::parent(); }
+#endif
+#else
+ using QObject::parent;
+#endif
+
protected:
QAbstractTableModel(QAbstractItemModelPrivate &dd, QObject *parent);
@@ -454,6 +463,15 @@ public:
int row, int column, const QModelIndex &parent);
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+
+#ifdef Q_NO_USING_KEYWORD
+#ifndef Q_QDOC
+ inline QObject *parent() const { return QAbstractItemModel::parent(); }
+#endif
+#else
+ using QObject::parent;
+#endif
+
protected:
QAbstractListModel(QAbstractItemModelPrivate &dd, QObject *parent);