From c58f41faceb6b23f6801c6c740a7e138460a72bd Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 2 Sep 2022 11:37:39 +0200 Subject: [PATCH] Editor: accept drop actions In order to remove the selected text of another editor widget when dragging text from one editor to another the drop event needs to be accepted. Fixes: QTCREATORBUG-28125 Change-Id: I8333fe096baf589e5669fc43370fc3519c72bb2d Reviewed-by: Christian Stenger Reviewed-by: Eike Ziller --- src/plugins/texteditor/texteditor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index b5f5a6e4cb9..76cf8c3232e 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -7678,6 +7678,7 @@ void TextEditorWidget::dropEvent(QDropEvent *e) insertFromMimeData(mime); delete mimeOverwrite; cursor.endEditBlock(); + e->acceptProposedAction(); } QMimeData *TextEditorWidget::duplicateMimeData(const QMimeData *source)