Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kleopatra
Commits
e82ade53
Commit
e82ade53
authored
Feb 18, 2021
by
Ingo Klöcker
Browse files
Port deprecated method
parent
1a22db0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/utils/dragqueen.cpp
View file @
e82ade53
...
...
@@ -185,10 +185,18 @@ void DragQueen::mouseMoveEvent(QMouseEvent *e)
(
e
->
buttons
()
&
Qt
::
LeftButton
)
&&
(
m_dragStartPosition
-
e
->
pos
()).
manhattanLength
()
>
QApplication
::
startDragDistance
())
{
QDrag
*
drag
=
new
QDrag
(
this
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
if
(
const
QPixmap
*
const
pix
=
pixmap
())
{
drag
->
setPixmap
(
*
pix
);
drag
->
setHotSpot
(
calculate_hot_spot
(
e
->
pos
(),
pix
->
size
(),
this
));
}
#else
const
QPixmap
pix
=
pixmap
(
Qt
::
ReturnByValue
);
if
(
!
pix
.
isNull
())
{
drag
->
setPixmap
(
pix
);
drag
->
setHotSpot
(
calculate_hot_spot
(
e
->
pos
(),
pix
.
size
(),
this
));
}
#endif
drag
->
setMimeData
(
new
MimeDataProxy
(
m_data
));
drag
->
exec
();
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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