summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp6
-rw-r--r--src/widgets/itemviews/qabstractitemview_p.h2
-rw-r--r--src/widgets/itemviews/qlistview.cpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index 1d8be6398c..16de80476f 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -1904,7 +1904,7 @@ void QAbstractItemView::dragEnterEvent(QDragEnterEvent *event)
&& (event->source() != this|| !(event->possibleActions() & Qt::MoveAction)))
return;
- if (d_func()->canDecode(event)) {
+ if (d_func()->canDrop(event)) {
event->accept();
setState(DraggingState);
} else {
@@ -1933,7 +1933,7 @@ void QAbstractItemView::dragMoveEvent(QDragMoveEvent *event)
QModelIndex index = indexAt(event->pos());
d->hover = index;
if (!d->droppingOnItself(event, index)
- && d->canDecode(event)) {
+ && d->canDrop(event)) {
if (index.isValid() && d->showDropIndicator) {
QRect rect = visualRect(index);
@@ -1978,7 +1978,7 @@ void QAbstractItemView::dragMoveEvent(QDragMoveEvent *event)
}
}
d->viewport->update();
- } // can decode
+ } // can drop
if (d->shouldAutoScroll(event->pos()))
startAutoScroll();
diff --git a/src/widgets/itemviews/qabstractitemview_p.h b/src/widgets/itemviews/qabstractitemview_p.h
index e04f08da36..c3bd1fb504 100644
--- a/src/widgets/itemviews/qabstractitemview_p.h
+++ b/src/widgets/itemviews/qabstractitemview_p.h
@@ -164,7 +164,7 @@ public:
#ifndef QT_NO_DRAGANDDROP
virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const;
- inline bool canDecode(QDropEvent *event) {
+ inline bool canDrop(QDropEvent *event) {
QModelIndex index;
int col = -1;
int row = -1;
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index a097228846..e7d18092f1 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -1977,7 +1977,7 @@ void QListModeViewBase::dragMoveEvent(QDragMoveEvent *event)
? intersectVector.last() : QModelIndex();
dd->hover = index;
if (!dd->droppingOnItself(event, index)
- && dd->canDecode(event)) {
+ && dd->canDrop(event)) {
if (index.isValid() && dd->showDropIndicator) {
QRect rect = qq->visualRect(index);
@@ -2023,7 +2023,7 @@ void QListModeViewBase::dragMoveEvent(QDragMoveEvent *event)
}
}
dd->viewport->update();
- } // can decode
+ } // can drop
if (dd->shouldAutoScroll(event->pos()))
qq->startAutoScroll();
@@ -2757,7 +2757,7 @@ bool QIconModeViewBase::filterDragLeaveEvent(QDragLeaveEvent *e)
bool QIconModeViewBase::filterDragMoveEvent(QDragMoveEvent *e)
{
- if (e->source() != qq || !dd->canDecode(e))
+ if (e->source() != qq || !dd->canDrop(e))
return false;
// ignore by default