equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
1221 } |
1221 } |
1222 break; |
1222 break; |
1223 case Qt::MoveAction: |
1223 case Qt::MoveAction: |
1224 for (; it != urls.constEnd(); ++it) { |
1224 for (; it != urls.constEnd(); ++it) { |
1225 QString path = (*it).toLocalFile(); |
1225 QString path = (*it).toLocalFile(); |
1226 success = QFile::copy(path, to + QFileInfo(path).fileName()) |
1226 success = QFile::rename(path, to + QFileInfo(path).fileName()) && success; |
1227 && QFile::remove(path) && success; |
|
1228 } |
1227 } |
1229 break; |
1228 break; |
1230 default: |
1229 default: |
1231 return false; |
1230 return false; |
1232 } |
1231 } |
1777 Q_ASSERT(node->fileName == fileName); |
1776 Q_ASSERT(node->fileName == fileName); |
1778 } else { |
1777 } else { |
1779 node->fileName = fileName; |
1778 node->fileName = fileName; |
1780 } |
1779 } |
1781 |
1780 |
1782 if (info.size() == -1) { |
1781 if (info.size() == -1 && !info.isSymLink()) { |
1783 removeNode(parentNode, fileName); |
1782 removeNode(parentNode, fileName); |
1784 continue; |
1783 continue; |
1785 } |
1784 } |
1786 if (*node != info ) { |
1785 if (*node != info ) { |
1787 node->populate(info); |
1786 node->populate(info); |