Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
74a290ab
Commit
74a290ab
authored
Aug 17, 2022
by
Julius Künzel
💬
Browse files
[Qt6] Port deprecated globalPos() to globalPosition()
parent
06aee5ff
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/effects/effectstack/view/collapsibleeffectview.cpp
View file @
74a290ab
...
...
@@ -389,7 +389,11 @@ void CollapsibleEffectView::slotActivateEffect(bool active)
void
CollapsibleEffectView
::
mousePressEvent
(
QMouseEvent
*
e
)
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_dragStart
=
e
->
globalPos
();
#else
m_dragStart
=
e
->
globalPosition
().
toPoint
();
#endif
if
(
!
decoframe
->
property
(
"active"
).
toBool
())
{
// Activate effect if not already active
emit
activateEffect
(
m_model
->
row
());
...
...
@@ -399,7 +403,11 @@ void CollapsibleEffectView::mousePressEvent(QMouseEvent *e)
void
CollapsibleEffectView
::
mouseMoveEvent
(
QMouseEvent
*
e
)
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
if
((
e
->
globalPos
()
-
m_dragStart
).
manhattanLength
()
<
QApplication
::
startDragDistance
())
{
#else
if
((
e
->
globalPosition
().
toPoint
()
-
m_dragStart
).
manhattanLength
()
<
QApplication
::
startDragDistance
())
{
#endif
QPixmap
pix
=
frame
->
grab
();
emit
startDrag
(
pix
,
m_model
);
}
...
...
src/monitor/glwidget.cpp
View file @
74a290ab
...
...
@@ -760,7 +760,11 @@ void GLWidget::mousePressEvent(QMouseEvent *event)
m_dragStart
=
event
->
pos
();
}
}
else
if
((
event
->
button
()
&
Qt
::
RightButton
)
!=
0u
)
{
emit
showContextMenu
(
event
->
globalPos
());
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
emit
showContextMenu
(
event
->
globalPos
());
#else
emit
showContextMenu
(
event
->
globalPosition
().
toPoint
());
#endif
}
else
if
((
event
->
button
()
&
Qt
::
MiddleButton
)
!=
0u
)
{
m_panStart
=
event
->
pos
();
setCursor
(
Qt
::
ClosedHandCursor
);
...
...
src/monitor/monitor.cpp
View file @
74a290ab
...
...
@@ -842,7 +842,11 @@ void Monitor::mousePressEvent(QMouseEvent *event)
}
}
else
if
(
m_contextMenu
)
{
slotActivateMonitor
();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_contextMenu
->
popup
(
event
->
globalPos
());
#else
m_contextMenu
->
popup
(
event
->
globalPosition
().
toPoint
());
#endif
event
->
accept
();
}
QWidget
::
mousePressEvent
(
event
);
...
...
src/timeline2/view/timelinewidget.cpp
View file @
74a290ab
...
...
@@ -190,7 +190,11 @@ void TimelineWidget::setModel(const std::shared_ptr<TimelineItemModel> &model, M
void
TimelineWidget
::
mousePressEvent
(
QMouseEvent
*
event
)
{
emit
focusProjectMonitor
();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_clickPos
=
event
->
globalPos
();
#else
m_clickPos
=
event
->
globalPosition
().
toPoint
();
#endif
QQuickWidget
::
mousePressEvent
(
event
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment