mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-11 11:47:41 -05:00
Remove Qt5 support
This commit is contained in:
@@ -178,11 +178,7 @@ void MacroSegmentList::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton ||
|
||||
event->button() == Qt::RightButton) {
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
_dragPosition = GetDragIndex(event->globalPos());
|
||||
#else
|
||||
_dragPosition = GetDragIndex(event->globalPosition().toPoint());
|
||||
#endif
|
||||
emit SelectionChanged(_dragPosition);
|
||||
} else {
|
||||
_dragPosition = -1;
|
||||
@@ -300,11 +296,7 @@ void MacroSegmentList::dragMoveEvent(QDragMoveEvent *event)
|
||||
return;
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
_dragCursorPos = (mapToGlobal(event->pos()));
|
||||
#else
|
||||
_dragCursorPos = (mapToGlobal(event->position().toPoint()));
|
||||
#endif
|
||||
CheckDropLine(_dragCursorPos);
|
||||
}
|
||||
|
||||
@@ -450,16 +442,6 @@ void MacroSegmentList::dropEvent(QDropEvent *event)
|
||||
{
|
||||
HideLastDropLine();
|
||||
auto widget = qobject_cast<QWidget *>(event->source());
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
if (widget && !widget->geometry().contains(event->pos()) &&
|
||||
widgetIsInLayout(widget, _contentLayout)) {
|
||||
int dropPosition = GetDropIndex(mapToGlobal(event->pos()));
|
||||
if (dropPosition == -1) {
|
||||
return;
|
||||
}
|
||||
emit Reorder(dropPosition, _dragPosition);
|
||||
}
|
||||
#else
|
||||
if (widget &&
|
||||
!widget->geometry().contains(event->position().toPoint()) &&
|
||||
widgetIsInLayout(widget, _contentLayout)) {
|
||||
@@ -470,7 +452,6 @@ void MacroSegmentList::dropEvent(QDropEvent *event)
|
||||
}
|
||||
emit Reorder(dropPosition, _dragPosition);
|
||||
}
|
||||
#endif
|
||||
_dragPosition = -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user