QmlJs: prevent "copy" icon in outline drag and drop

Copying items in the outline tree is not allowed, so the icon it is
not shown while dragging with the CTRL button pressed.

Task-number: QTCREATORBUG-13450
Change-Id: Ibfcf954c273051ef03112d11ee6a3457530802bb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Benelli
2017-12-04 11:54:07 +01:00
parent 2349a0a5c4
commit 7376336e15
2 changed files with 6 additions and 0 deletions

View File

@@ -430,6 +430,11 @@ Qt::DropActions QmlOutlineModel::supportedDragActions() const
return Qt::MoveAction | Qt::CopyAction;
}
Qt::DropActions QmlOutlineModel::supportedDropActions() const
{
return Qt::MoveAction;
}
Document::Ptr QmlOutlineModel::document() const
{

View File

@@ -84,6 +84,7 @@ public:
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
Qt::ItemFlags flags(const QModelIndex &index) const;
Qt::DropActions supportedDragActions() const;
Qt::DropActions supportedDropActions() const;
QmlJS::Document::Ptr document() const;
void update(const QmlJSTools::SemanticInfo &semanticInfo);