Project tree: Do not pretend to support moving files via Drag & Drop

We claimed to support the move action, so on Windows the user could drag
files away to e.g. the Desktop or the Explorer. This resulted in
inconsistent state, because we do not (cannot?) handle an "external
drop" in any of our build system managers.
Instead, we now support only the copy action, which leaves our project
sources untouched. This is also more likely to be what the user wants.

Fixes: QTCREATORBUG-14494
Change-Id: Ie327780768f1ac68d6dbe95c3daa4aa4dc3f0f41
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Christian Kandeler
2019-02-04 15:06:18 +01:00
parent 0082a82fc6
commit 6ab9078e87
2 changed files with 2 additions and 2 deletions

View File

@@ -398,7 +398,7 @@ bool FlatModel::trimEmptyDirectories(WrapperNode *parent)
Qt::DropActions FlatModel::supportedDragActions() const
{
return Qt::MoveAction;
return Qt::CopyAction;
}
QStringList FlatModel::mimeTypes() const

View File

@@ -8568,7 +8568,7 @@ void TextEditorLinkLabel::mouseMoveEvent(QMouseEvent *event)
data->addFile(m_link.targetFileName, m_link.targetLine, m_link.targetColumn);
auto drag = new QDrag(this);
drag->setMimeData(data);
drag->exec(Qt::MoveAction);
drag->exec(Qt::CopyAction);
}
void TextEditorLinkLabel::mouseReleaseEvent(QMouseEvent *event)