OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06b81a5
)
use QFile::rename() in QDirModel::dropMimeData() for move action
author
Ivailo Monev
<xakepa10@gmail.com>
Fri, 19 Nov 2021 21:31:16 +0000
(23:31 +0200)
committer
Ivailo Monev
<xakepa10@gmail.com>
Fri, 19 Nov 2021 21:31:16 +0000
(23:31 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/itemviews/qdirmodel.cpp
patch
|
blob
|
history
diff --git
a/src/gui/itemviews/qdirmodel.cpp
b/src/gui/itemviews/qdirmodel.cpp
index
fd70b49
..
955a27c
100644
(file)
--- a/
src/gui/itemviews/qdirmodel.cpp
+++ b/
src/gui/itemviews/qdirmodel.cpp
@@
-548,8
+548,7
@@
bool QDirModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
case Qt::MoveAction:
for (; it != urls.constEnd(); ++it) {
QString path = (*it).toLocalFile();
- if (QFile::copy(path, to + QFileInfo(path).fileName())
- && QFile::remove(path)) {
+ if (QFile::rename(path, to + QFileInfo(path).fileName())) {
QModelIndex idx=index(QFileInfo(path).path());
if (idx.isValid()) {
refresh(idx);