88// Additions Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware
99// @file ScintillaEditBase.cpp - Qt widget that wraps ScintillaQt and provides events and scrolling
1010
11+ #include < cstdint>
1112#include " ScintillaEditBase.h"
1213#include " ScintillaQt.h"
1314#include " PlatQt.h"
@@ -383,7 +384,11 @@ void ScintillaEditBase::dragEnterEvent(QDragEnterEvent *event)
383384 } else if (event->mimeData ()->hasText ()) {
384385 event->acceptProposedAction ();
385386
387+ #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
386388 Point point = PointFromQPoint (event->pos ());
389+ #else
390+ Point point = PointFromQPoint (event->position ().toPoint ());
391+ #endif
387392 sqt->DragEnter (point);
388393 } else {
389394 event->ignore ();
@@ -402,7 +407,11 @@ void ScintillaEditBase::dragMoveEvent(QDragMoveEvent *event)
402407 } else if (event->mimeData ()->hasText ()) {
403408 event->acceptProposedAction ();
404409
410+ #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
405411 Point point = PointFromQPoint (event->pos ());
412+ #else
413+ Point point = PointFromQPoint (event->position ().toPoint ());
414+ #endif
406415 sqt->DragMove (point);
407416 } else {
408417 event->ignore ();
@@ -417,7 +426,11 @@ void ScintillaEditBase::dropEvent(QDropEvent *event)
417426 } else if (event->mimeData ()->hasText ()) {
418427 event->acceptProposedAction ();
419428
429+ #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
420430 Point point = PointFromQPoint (event->pos ());
431+ #else
432+ Point point = PointFromQPoint (event->position ().toPoint ());
433+ #endif
421434 bool move = (event->source () == this &&
422435 event->proposedAction () == Qt::MoveAction);
423436 sqt->Drop (point, event->mimeData (), move);
0 commit comments