diff options
author | Samuel Gaist <samuel.gaist@edeltech.ch> | 2013-10-10 16:43:44 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-17 21:06:06 +0200 |
commit | 72544a5142b19454f9636c567ba199161c02e79b (patch) | |
tree | 3935b691a150b89e4fbfc3b150f0fa0dd36f42e5 /src/widgets/itemviews/qabstractitemview.cpp | |
parent | cc3ece1da4f1d6b8742805770f18488183f8ad02 (diff) |
Rename private viewOptions to viewOptionsV1
Renaming of the private implementation of viewOptions to viewOptionsV1
so that future updates of QStyleOptionViewItem can be easily integrated
in the code with a simple search/replace.
Task-number: QTBUG-1180
Change-Id: I18f876a435417717fa0d759bb302a7c6059daf80
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/widgets/itemviews/qabstractitemview.cpp')
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index d3e6b7ab52..726c2704c4 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -1651,7 +1651,7 @@ bool QAbstractItemView::viewportEvent(QEvent *event) case QEvent::WhatsThis: { QHelpEvent *he = static_cast<QHelpEvent*>(event); const QModelIndex index = indexAt(he->pos()); - QStyleOptionViewItem option = d->viewOptions(); + QStyleOptionViewItem option = d->viewOptionsV1(); option.rect = visualRect(index); option.state |= (index == currentIndex() ? QStyle::State_HasFocus : QStyle::State_None); @@ -1851,7 +1851,7 @@ void QAbstractItemView::mouseReleaseEvent(QMouseEvent *event) emit clicked(index); if (edited) return; - QStyleOptionViewItem option = d->viewOptions(); + QStyleOptionViewItem option = d->viewOptionsV1(); if (d->pressedAlreadySelected) option.state |= QStyle::State_Selected; if ((model()->flags(index) & Qt::ItemIsEnabled) @@ -2627,7 +2627,7 @@ void QAbstractItemView::updateEditorGeometries() Q_D(QAbstractItemView); if(d->editorIndexHash.isEmpty()) return; - QStyleOptionViewItem option = d->viewOptions(); + QStyleOptionViewItem option = d->viewOptionsV1(); QEditorIndexHash::iterator it = d->editorIndexHash.begin(); QWidgetList editorsToRelease; QWidgetList editorsToHide; @@ -2972,7 +2972,7 @@ QSize QAbstractItemView::sizeHintForIndex(const QModelIndex &index) const Q_D(const QAbstractItemView); if (!d->isIndexValid(index) || !d->itemDelegate) return QSize(); - return d->delegateForIndex(index)->sizeHint(d->viewOptions(), index); + return d->delegateForIndex(index)->sizeHint(d->viewOptionsV1(), index); } /*! @@ -3000,7 +3000,7 @@ int QAbstractItemView::sizeHintForRow(int row) const ensurePolished(); - QStyleOptionViewItem option = d->viewOptions(); + QStyleOptionViewItem option = d->viewOptionsV1(); int height = 0; int colCount = d->model->columnCount(d->root); QModelIndex index; @@ -3031,7 +3031,7 @@ int QAbstractItemView::sizeHintForColumn(int column) const ensurePolished(); - QStyleOptionViewItem option = d->viewOptions(); + QStyleOptionViewItem option = d->viewOptionsV1(); int width = 0; int rows = d->model->rowCount(d->root); QModelIndex index; @@ -3054,7 +3054,7 @@ int QAbstractItemView::sizeHintForColumn(int column) const void QAbstractItemView::openPersistentEditor(const QModelIndex &index) { Q_D(QAbstractItemView); - QStyleOptionViewItem options = d->viewOptions(); + QStyleOptionViewItem options = d->viewOptionsV1(); options.rect = visualRect(index); options.state |= (index == currentIndex() ? QStyle::State_HasFocus : QStyle::State_None); @@ -3633,7 +3633,7 @@ QStyleOptionViewItem QAbstractItemView::viewOptions() const return option; } -QStyleOptionViewItem QAbstractItemViewPrivate::viewOptions() const +QStyleOptionViewItem QAbstractItemViewPrivate::viewOptionsV1() const { Q_Q(const QAbstractItemView); return q->viewOptions(); @@ -4274,7 +4274,7 @@ bool QAbstractItemViewPrivate::sendDelegateEvent(const QModelIndex &index, QEven { Q_Q(const QAbstractItemView); QModelIndex buddy = model->buddy(index); - QStyleOptionViewItem options = viewOptions(); + QStyleOptionViewItem options = viewOptionsV1(); options.rect = q->visualRect(buddy); options.state |= (buddy == q->currentIndex() ? QStyle::State_HasFocus : QStyle::State_None); QAbstractItemDelegate *delegate = delegateForIndex(index); @@ -4286,7 +4286,7 @@ bool QAbstractItemViewPrivate::openEditor(const QModelIndex &index, QEvent *even Q_Q(QAbstractItemView); QModelIndex buddy = model->buddy(index); - QStyleOptionViewItem options = viewOptions(); + QStyleOptionViewItem options = viewOptionsV1(); options.rect = q->visualRect(buddy); options.state |= (buddy == q->currentIndex() ? QStyle::State_HasFocus : QStyle::State_None); @@ -4338,7 +4338,7 @@ QPixmap QAbstractItemViewPrivate::renderToPixmap(const QModelIndexList &indexes, QPixmap pixmap(r->size()); pixmap.fill(Qt::transparent); QPainter painter(&pixmap); - QStyleOptionViewItem option = viewOptions(); + QStyleOptionViewItem option = viewOptionsV1(); option.state |= QStyle::State_Selected; for (int j = 0; j < paintPairs.count(); ++j) { option.rect = paintPairs.at(j).first.translated(-r->topLeft()); |