Commit e82ade53 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Port deprecated method

parent 1a22db0a
......@@ -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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment