Merge pull request #5516 from encounter/qdropevent-fix

Avoid incorrect casts to QDropEvent
This commit is contained in:
Pengfei Zhu 2020-09-01 22:27:37 +08:00 committed by GitHub
commit a39e0ea3b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,9 +172,7 @@ bool OpenGLWindow::event(QEvent* event) {
case QEvent::Drop: case QEvent::Drop:
GetMainWindow()->DropAction(static_cast<QDropEvent*>(event)); GetMainWindow()->DropAction(static_cast<QDropEvent*>(event));
return true; return true;
case QEvent::DragResponse:
case QEvent::DragEnter: case QEvent::DragEnter:
case QEvent::DragLeave:
case QEvent::DragMove: case QEvent::DragMove:
GetMainWindow()->AcceptDropEvent(static_cast<QDropEvent*>(event)); GetMainWindow()->AcceptDropEvent(static_cast<QDropEvent*>(event));
return true; return true;