forked from qt-creator/qt-creator
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:
@@ -398,7 +398,7 @@ bool FlatModel::trimEmptyDirectories(WrapperNode *parent)
|
||||
|
||||
Qt::DropActions FlatModel::supportedDragActions() const
|
||||
{
|
||||
return Qt::MoveAction;
|
||||
return Qt::CopyAction;
|
||||
}
|
||||
|
||||
QStringList FlatModel::mimeTypes() const
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user