summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-10-04 17:13:33 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-05 03:16:48 +0200
commitef1d18a55f6e5450d76a1a9c7ebdc951aa6ae8b7 (patch)
tree12cad129353974f02c0b9c581516d50dbb3986b0
parentee2e497f1c8216a22ddea53ab5ae1fd09bfee363 (diff)
Constify QTableWidget::selectedItems
Task-number: QTBUG-27448 Change-Id: I99175cc2b255b93f698d3c343639c19845c9f5a0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp4
-rw-r--r--src/widgets/itemviews/qtablewidget.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index b74d1195b6..e6f9e54abf 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -2352,9 +2352,9 @@ QList<QTableWidgetSelectionRange> QTableWidget::selectedRanges() const
\sa selectedIndexes()
*/
-QList<QTableWidgetItem*> QTableWidget::selectedItems()
+QList<QTableWidgetItem*> QTableWidget::selectedItems() const
{
- Q_D(QTableWidget);
+ Q_D(const QTableWidget);
QModelIndexList indexes = selectionModel()->selectedIndexes();
QList<QTableWidgetItem*> items;
for (int i = 0; i < indexes.count(); ++i) {
diff --git a/src/widgets/itemviews/qtablewidget.h b/src/widgets/itemviews/qtablewidget.h
index 206d55995a..ce0295afdc 100644
--- a/src/widgets/itemviews/qtablewidget.h
+++ b/src/widgets/itemviews/qtablewidget.h
@@ -276,7 +276,7 @@ public:
void setRangeSelected(const QTableWidgetSelectionRange &range, bool select);
QList<QTableWidgetSelectionRange> selectedRanges() const;
- QList<QTableWidgetItem*> selectedItems();
+ QList<QTableWidgetItem*> selectedItems() const;
QList<QTableWidgetItem*> findItems(const QString &text, Qt::MatchFlags flags) const;
int visualRow(int logicalRow) const;