Constify QTableWidget::selectedItems

Task-number: QTBUG-27448

Change-Id: I99175cc2b255b93f698d3c343639c19845c9f5a0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Stephen Kelly 2012-10-04 17:13:33 +02:00 committed by The Qt Project
parent ee2e497f1c
commit ef1d18a55f
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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;