summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-06-07 15:07:44 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-06-07 15:50:54 +0200
commit4386425ce310815076739ea5f15fe4f1218599c8 (patch)
tree55a186c2201c195dceb5f902333bd208f5e01d0b /src/widgets
parent71304aefd0668f6ba2d41ef84d7f48aaa95db06f (diff)
Implement QDropEvent::source() again
QDropEvent::source() now returns a QObject instead of a widget, matching the implementation in QDrag. Reviewed-by: Samuel
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp2
-rw-r--r--src/widgets/to_be_moved/qtextcontrol.cpp2
-rw-r--r--src/widgets/to_be_moved/qtextcontrol_p_p.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index c6e06e22c2..c918072196 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -780,7 +780,7 @@ void QGraphicsViewPrivate::populateSceneDragDropEvent(QGraphicsSceneDragDropEven
dest->setDropAction(source->dropAction());
dest->setMimeData(source->mimeData());
dest->setWidget(viewport);
- dest->setSource(source->source());
+ dest->setSource(qobject_cast<QWidget *>(source->source()));
#else
Q_UNUSED(dest)
Q_UNUSED(source)
diff --git a/src/widgets/to_be_moved/qtextcontrol.cpp b/src/widgets/to_be_moved/qtextcontrol.cpp
index ab294b9e0d..aeb2ede106 100644
--- a/src/widgets/to_be_moved/qtextcontrol.cpp
+++ b/src/widgets/to_be_moved/qtextcontrol.cpp
@@ -1885,7 +1885,7 @@ bool QTextControlPrivate::dragMoveEvent(QEvent *e, const QMimeData *mimeData, co
return true; // accept proposed action
}
-bool QTextControlPrivate::dropEvent(const QMimeData *mimeData, const QPointF &pos, Qt::DropAction dropAction, QWidget *source)
+bool QTextControlPrivate::dropEvent(const QMimeData *mimeData, const QPointF &pos, Qt::DropAction dropAction, QObject *source)
{
Q_Q(QTextControl);
dndFeedbackCursor = QTextCursor();
diff --git a/src/widgets/to_be_moved/qtextcontrol_p_p.h b/src/widgets/to_be_moved/qtextcontrol_p_p.h
index 099843437a..1b707eeef3 100644
--- a/src/widgets/to_be_moved/qtextcontrol_p_p.h
+++ b/src/widgets/to_be_moved/qtextcontrol_p_p.h
@@ -160,7 +160,7 @@ public:
bool dragEnterEvent(QEvent *e, const QMimeData *mimeData);
void dragLeaveEvent();
bool dragMoveEvent(QEvent *e, const QMimeData *mimeData, const QPointF &pos);
- bool dropEvent(const QMimeData *mimeData, const QPointF &pos, Qt::DropAction dropAction, QWidget *source);
+ bool dropEvent(const QMimeData *mimeData, const QPointF &pos, Qt::DropAction dropAction, QObject *source);
void inputMethodEvent(QInputMethodEvent *);