Qt::DropActions supportedActions,
DolphinController* controller)
{
- //do not start a new drag until the previous one has been finished
- //This is a (possibly temporary) fix for bug #187884
- static bool isDragging = false;
- if (isDragging) return;
- isDragging = true;
+ // Do not start a new drag until the previous one has been finished.
+ // This is a (possibly temporary) fix for bug #187884.
+ static bool isDragging = false;
+ if (isDragging) {
+ return;
+ }
+ isDragging = true;
QModelIndexList indexes = itemView->selectionModel()->selectedIndexes();
- if (indexes.count() > 0) {
+ if (!indexes.isEmpty()) {
QMimeData *data = itemView->model()->mimeData(indexes);
if (data == 0) {
return;
drag->exec(supportedActions, Qt::IgnoreAction);
m_dragSource = 0;
}
- isDragging = false;
+ isDragging = false;
}
bool DragAndDropHelper::isDragSource(QAbstractItemView* itemView)