forked from qt-creator/qt-creator
Introduce dragging for all explorer nodes.
Extend drop support with variant values. A drop may be a file drop or a value drop or both. Rename Utils::FileDropSupport to Utils::DropSupport and add methods to add not only files but any QVariant value to the mime data. Project explorer adds dragged nodes (which will be needed for future ModelEditor plugin). Change-Id: I799542c60fdecb3e64af0d3ba47b6caa9adbcfd7 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
#include <coreplugin/find/basetextfind.h>
|
||||
#include <utils/linecolumnlabel.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/dropsupport.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/mimetypes/mimedatabase.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -7319,7 +7320,7 @@ void TextEditorLinkLabel::mouseMoveEvent(QMouseEvent *event)
|
||||
if ((event->pos() - m_dragStartPosition).manhattanLength() < QApplication::startDragDistance())
|
||||
return;
|
||||
|
||||
auto data = new FileDropMimeData;
|
||||
auto data = new DropMimeData;
|
||||
data->addFile(m_link.targetFileName, m_link.targetLine, m_link.targetColumn);
|
||||
auto drag = new QDrag(this);
|
||||
drag->setMimeData(data);
|
||||
|
||||
Reference in New Issue
Block a user