diff --git a/src/gui/kernel/qdrag.cpp b/src/gui/kernel/qdrag.cpp index bb0e490aa0..dcd0d13d5c 100644 --- a/src/gui/kernel/qdrag.cpp +++ b/src/gui/kernel/qdrag.cpp @@ -284,6 +284,7 @@ Qt::DropAction QDrag::exec(Qt::DropActions supportedActions, Qt::DropAction defa return d->executed_action; } +#if QT_DEPRECATED_SINCE(5, 13) /*! \obsolete @@ -311,6 +312,7 @@ Qt::DropAction QDrag::start(Qt::DropActions request) d->executed_action = QDragManager::self()->drag(this); return d->executed_action; } +#endif /*! Sets the drag \a cursor for the \a action. This allows you diff --git a/src/gui/kernel/qdrag.h b/src/gui/kernel/qdrag.h index 27b9c2c88f..7acd5088bd 100644 --- a/src/gui/kernel/qdrag.h +++ b/src/gui/kernel/qdrag.h @@ -74,7 +74,10 @@ public: QObject *source() const; QObject *target() const; +#if QT_DEPRECATED_SINCE(5, 13) + QT_DEPRECATED_X("Use QDrag::exec() instead") Qt::DropAction start(Qt::DropActions supportedActions = Qt::CopyAction); +#endif Qt::DropAction exec(Qt::DropActions supportedActions = Qt::MoveAction); Qt::DropAction exec(Qt::DropActions supportedActions, Qt::DropAction defaultAction); diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 0a10f72d7b..92ab846a41 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -646,7 +646,7 @@ void QColorWell::mouseMoveEvent(QMouseEvent *e) drg->setMimeData(mime); drg->setPixmap(pix); mousePressed = false; - drg->start(); + drg->exec(Qt::CopyAction); } #endif } @@ -1131,7 +1131,7 @@ void QColorShowLabel::mouseMoveEvent(QMouseEvent *e) drg->setMimeData(mime); drg->setPixmap(pix); mousePressed = false; - drg->start(); + drg->exec(Qt::CopyAction); } #endif } diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index 6dcb2dd693..2a5a0c34dc 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -324,7 +324,7 @@ void QLineEditPrivate::drag() data->setText(control->selectedText()); QDrag *drag = new QDrag(q); drag->setMimeData(data); - Qt::DropAction action = drag->start(); + Qt::DropAction action = drag->exec(Qt::CopyAction); if (action == Qt::MoveAction && !control->isReadOnly() && drag->target() != q) control->removeSelection(); }