From d4113bd50eda7a72954c065c3d89d8738a8cb272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sun, 11 Oct 2026 16:56:06 -0400 Subject: [PATCH] 14.31: the last two drag events through DragAt --- tests/ImageFileDropTests.cpp | 3 ++- tests/LayerEffectRowTests.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/ImageFileDropTests.cpp b/tests/ImageFileDropTests.cpp index bd838e8..dc35d73 100644 --- a/tests/ImageFileDropTests.cpp +++ b/tests/ImageFileDropTests.cpp @@ -1,3 +1,4 @@ +#include "DragAt.h" #include "ContentView.h" #include "IO/ImageFileDrop.h" #include "DNGFixture.h" @@ -83,7 +84,7 @@ QStringList names(const EditorSession &session) bool dropOn(QWidget &target, QMimeData *data, QPoint at, Qt::KeyboardModifiers modifiers = Qt::NoModifier) { - QDragEnterEvent entered(at, Qt::CopyAction, data, Qt::LeftButton, modifiers); + QDragEnterEvent entered(DragAt(at), Qt::CopyAction, data, Qt::LeftButton, modifiers); QApplication::sendEvent(&target, &entered); QDropEvent dropped(at, Qt::CopyAction, data, Qt::LeftButton, modifiers); QApplication::sendEvent(&target, &dropped); diff --git a/tests/LayerEffectRowTests.cpp b/tests/LayerEffectRowTests.cpp index e5a0d38..9ca9af6 100644 --- a/tests/LayerEffectRowTests.cpp +++ b/tests/LayerEffectRowTests.cpp @@ -1,3 +1,4 @@ +#include "DragAt.h" #include "Document/ProjectWorkspace.h" #include "Rendering/EditorCanvas.h" #include "UI/LayerIcons.h" @@ -106,7 +107,7 @@ struct Listed { bool drop(QMimeData *data, QPoint listPoint) { const QPointF inViewport = list.viewport()->mapFromParent(listPoint); - QDragEnterEvent enter(inViewport.toPoint(), Qt::CopyAction, data, Qt::LeftButton, Qt::AltModifier); + QDragEnterEvent enter(DragAt(inViewport.toPoint()), Qt::CopyAction, data, Qt::LeftButton, Qt::AltModifier); QApplication::sendEvent(list.viewport(), &enter); QDropEvent drop(inViewport, Qt::CopyAction, data, Qt::LeftButton, Qt::AltModifier); QApplication::sendEvent(list.viewport(), &drop);