MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / dragEnterEvent

Method dragEnterEvent

Telegram/SourceFiles/dialogs/dialogs_widget.cpp:3307–3323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3305}
3306
3307void Widget::dragEnterEvent(QDragEnterEvent *e) {
3308 using namespace Storage;
3309
3310 const auto data = e->mimeData();
3311 _dragInScroll = false;
3312 _dragForward = !controller()->adaptive().isOneColumn()
3313 && data->hasFormat(u"application/x-td-forward"_q);
3314 if (_dragForward) {
3315 e->setDropAction(Qt::CopyAction);
3316 e->accept();
3317 updateDragInScroll(_scroll->geometry().contains(e->pos()));
3318 } else if (ComputeMimeDataState(data) != MimeDataState::None) {
3319 e->setDropAction(Qt::CopyAction);
3320 e->accept();
3321 }
3322 _chooseByDragTimer.cancel();
3323}
3324
3325void Widget::dragMoveEvent(QDragMoveEvent *e) {
3326 if (_scroll->geometry().contains(e->pos())) {

Callers

nothing calls this directly

Calls 5

ComputeMimeDataStateFunction · 0.85
isOneColumnMethod · 0.45
containsMethod · 0.45
geometryMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected