UI: Fix Qt 6 position deprecations

This commit is contained in:
gxalpha 2022-07-19 16:12:17 +02:00 • committed by Ryan Foster
commit 05c6a408e3
7 changed files with 53 additions and 21 deletions

View file

@ -1186,7 +1186,14 @@ void SourceTree::dropEvent(QDropEvent *event)
QModelIndexList indices = selectedIndexes();
DropIndicatorPosition indicator = dropIndicatorPosition();
int row = indexAt(event->pos()).row();
int row = indexAt(
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
event->position().toPoint()
#else
event->pos()
#endif
)
.row();
bool emptyDrop = row == -1;
if (emptyDrop) {