| 3372 | } |
| 3373 | |
| 3374 | void Widget::dropEvent(QDropEvent *e) { |
| 3375 | _chooseByDragTimer.cancel(); |
| 3376 | if (_scroll->geometry().contains(e->pos())) { |
| 3377 | const auto globalPosition = mapToGlobal(e->pos()); |
| 3378 | const auto thread = _suggestions |
| 3379 | ? _suggestions->updateFromParentDrag(globalPosition) |
| 3380 | : _inner->updateFromParentDrag(globalPosition); |
| 3381 | if (thread) { |
| 3382 | e->setDropAction(Qt::CopyAction); |
| 3383 | e->accept(); |
| 3384 | controller()->content()->filesOrForwardDrop( |
| 3385 | thread, |
| 3386 | e->mimeData()); |
| 3387 | if (!thread->owningHistory()->isForum()) { |
| 3388 | hideChildList(); |
| 3389 | } |
| 3390 | controller()->widget()->raise(); |
| 3391 | controller()->widget()->activateWindow(); |
| 3392 | } |
| 3393 | } |
| 3394 | } |
| 3395 | |
| 3396 | void Widget::listScrollUpdated() { |
| 3397 | const auto scrollTop = _scroll->scrollTop(); |
nothing calls this directly
no test coverage detected