summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qcolordialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs/qcolordialog.cpp')
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index cf1119254b..99946d341d 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -45,7 +45,9 @@
#include "qdrawutil.h"
#include "qevent.h"
#include "qimage.h"
-#include "qdrag.h"
+#if QT_CONFIG(draganddrop)
+#include <qdrag.h>
+#endif
#include "qlabel.h"
#include "qlayout.h"
#include "qlineedit.h"
@@ -592,7 +594,7 @@ protected:
void mousePressEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragEnterEvent(QDragEnterEvent *e) override;
void dragLeaveEvent(QDragLeaveEvent *e) override;
void dragMoveEvent(QDragMoveEvent *e) override;
@@ -624,7 +626,7 @@ void QColorWell::mousePressEvent(QMouseEvent *e)
void QColorWell::mouseMoveEvent(QMouseEvent *e)
{
QWellArray::mouseMoveEvent(e);
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
if (!mousePressed)
return;
if ((pressPos - e->pos()).manhattanLength() > QApplication::startDragDistance()) {
@@ -647,7 +649,7 @@ void QColorWell::mouseMoveEvent(QMouseEvent *e)
#endif
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QColorWell::dragEnterEvent(QDragEnterEvent *e)
{
if (qvariant_cast<QColor>(e->mimeData()->colorData()).isValid())
@@ -684,7 +686,7 @@ void QColorWell::dropEvent(QDropEvent *e)
}
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
void QColorWell::mouseReleaseEvent(QMouseEvent *e)
{
@@ -1072,7 +1074,7 @@ protected:
void mousePressEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void dragEnterEvent(QDragEnterEvent *e) override;
void dragLeaveEvent(QDragLeaveEvent *e) override;
void dropEvent(QDropEvent *e) override;
@@ -1110,7 +1112,7 @@ void QColorShowLabel::mousePressEvent(QMouseEvent *e)
void QColorShowLabel::mouseMoveEvent(QMouseEvent *e)
{
-#ifdef QT_NO_DRAGANDDROP
+#if !QT_CONFIG(draganddrop)
Q_UNUSED(e);
#else
if (!mousePressed)
@@ -1132,7 +1134,7 @@ void QColorShowLabel::mouseMoveEvent(QMouseEvent *e)
#endif
}
-#ifndef QT_NO_DRAGANDDROP
+#if QT_CONFIG(draganddrop)
void QColorShowLabel::dragEnterEvent(QDragEnterEvent *e)
{
if (qvariant_cast<QColor>(e->mimeData()->colorData()).isValid())
@@ -1157,7 +1159,7 @@ void QColorShowLabel::dropEvent(QDropEvent *e)
e->ignore();
}
}
-#endif // QT_NO_DRAGANDDROP
+#endif // QT_CONFIG(draganddrop)
void QColorShowLabel::mouseReleaseEvent(QMouseEvent *)
{