Changeset View
Changeset View
Standalone View
Standalone View
src/kitemviews/kitemlistcontroller.cpp
Show First 20 Lines • Show All 922 Lines • ▼ Show 20 Line(s) | 922 | if (m_model->sortRole().isEmpty()) { | |||
---|---|---|---|---|---|
923 | // The model supports inserting of items between other items. | 923 | // The model supports inserting of items between other items. | ||
924 | dropAboveIndex = m_view->showDropIndicator(pos); | 924 | dropAboveIndex = m_view->showDropIndicator(pos); | ||
925 | } | 925 | } | ||
926 | 926 | | |||
927 | if (dropAboveIndex >= 0) { | 927 | if (dropAboveIndex >= 0) { | ||
928 | // Something has been dropped between two items. | 928 | // Something has been dropped between two items. | ||
929 | m_view->hideDropIndicator(); | 929 | m_view->hideDropIndicator(); | ||
930 | emit aboveItemDropEvent(dropAboveIndex, event); | 930 | emit aboveItemDropEvent(dropAboveIndex, event); | ||
931 | } else { | 931 | } else if (!event->mimeData()->hasFormat(m_model->blacklistItemDropEventMimeType())) { | ||
932 | // Something has been dropped on an item or on an empty part of the view. | 932 | // Something has been dropped on an item or on an empty part of the view. | ||
933 | emit itemDropEvent(m_view->itemAt(pos), event); | 933 | emit itemDropEvent(m_view->itemAt(pos), event); | ||
934 | } | 934 | } | ||
935 | 935 | | |||
936 | QAccessibleEvent accessibilityEvent(view(), QAccessible::DragDropEnd); | 936 | QAccessibleEvent accessibilityEvent(view(), QAccessible::DragDropEnd); | ||
937 | QAccessible::updateAccessibility(&accessibilityEvent); | 937 | QAccessible::updateAccessibility(&accessibilityEvent); | ||
938 | 938 | | |||
939 | return true; | 939 | return true; | ||
▲ Show 20 Lines • Show All 389 Lines • Show Last 20 Lines |