summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qstringlistmodel.cpp
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-09-26 18:16:08 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-02 16:25:02 +0100
commit9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22 (patch)
tree1a9643ef367a24f836ec0a552229106b3776b7dd /src/corelib/itemmodels/qstringlistmodel.cpp
parent000025ca1ecabe363934bdc8794b01ffb926af66 (diff)
Add implementations of QAIM::sibling in public APIs.
Change-Id: I2248641f2ed8735c28bd9572470520995a4a5b62 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/corelib/itemmodels/qstringlistmodel.cpp')
-rw-r--r--src/corelib/itemmodels/qstringlistmodel.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/itemmodels/qstringlistmodel.cpp b/src/corelib/itemmodels/qstringlistmodel.cpp
index 2bea97d4b4..49345f155a 100644
--- a/src/corelib/itemmodels/qstringlistmodel.cpp
+++ b/src/corelib/itemmodels/qstringlistmodel.cpp
@@ -127,6 +127,17 @@ int QStringListModel::rowCount(const QModelIndex &parent) const
}
/*!
+ \reimp
+*/
+QModelIndex QStringListModel::sibling(int row, int column, const QModelIndex &idx) const
+{
+ if (!idx.isValid() || column != 0 || row >= lst.count())
+ return QModelIndex();
+
+ return createIndex(row, 0);
+}
+
+/*!
Returns data for the specified \a role, from the item with the
given \a index.