Commit cf4c9fdb authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compiles against qt5.15

parent d1cc0cec
......@@ -208,18 +208,10 @@ 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();
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