upgrade to qt 6 compliance
This commit is contained in:
@@ -1051,7 +1051,7 @@ void ViewerDisplayWidget::DrawSubtitleTracks()
|
||||
f.setFamily(family);
|
||||
}
|
||||
|
||||
f.setWeight(OLIVE_CONFIG("DefaultSubtitleWeight").toInt());
|
||||
f.setWeight(static_cast<QFont::Weight>(OLIVE_CONFIG("DefaultSubtitleWeight").toInt()));
|
||||
|
||||
bounding_box.adjust(bounding_box.width()/10, bounding_box.height()/10, -bounding_box.width()/10, -bounding_box.height()/10);
|
||||
|
||||
@@ -1145,7 +1145,7 @@ void ViewerDisplayWidget::ForwardDragEventToTextEdit(T *e)
|
||||
bool ViewerDisplayWidget::ForwardMouseEventToTextEdit(QMouseEvent *event, bool check_if_outside)
|
||||
{
|
||||
// Transform screen mouse coords to world mouse coords
|
||||
QPointF local_pos = GetVirtualPosForTextEdit(event->localPos());
|
||||
QPointF local_pos = GetVirtualPosForTextEdit(event->position());
|
||||
|
||||
if (check_if_outside) {
|
||||
if (local_pos.x() < 0 || local_pos.x() >= text_edit_->width() || local_pos.y() < 0 || local_pos.y() >= text_edit_->height()) {
|
||||
@@ -1156,8 +1156,8 @@ bool ViewerDisplayWidget::ForwardMouseEventToTextEdit(QMouseEvent *event, bool c
|
||||
|
||||
local_pos = AdjustPosByVAlign(local_pos);
|
||||
|
||||
event->setLocalPos(local_pos);
|
||||
return ForwardEventToTextEdit(event);
|
||||
QMouseEvent derived(event->type(), local_pos, event->scenePosition(), event->globalPosition(), event->button(), event->buttons(), event->modifiers(), event->source(), event->pointingDevice());
|
||||
return ForwardEventToTextEdit(&derived);
|
||||
}
|
||||
|
||||
bool ViewerDisplayWidget::ForwardEventToTextEdit(QEvent *event)
|
||||
|
||||
Reference in New Issue
Block a user