projects
/
cuteexplorer
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06d3fb6
)
no rename failed for canceled renamedialog
author
Tommi Asp
<tomma.asp@gmail.com>
Thu, 6 May 2010 17:40:03 +0000
(20:40 +0300)
committer
Tommi Asp
<tomma.asp@gmail.com>
Thu, 6 May 2010 17:40:03 +0000
(20:40 +0300)
src/filelistwidget.cpp
patch
|
blob
|
history
diff --git
a/src/filelistwidget.cpp
b/src/filelistwidget.cpp
index
4466fed
..
f578e7c
100644
(file)
--- a/
src/filelistwidget.cpp
+++ b/
src/filelistwidget.cpp
@@
-70,7
+70,7
@@
void FileListWidget::actionRename()
{
QFileInfo file = fileSystemModel->fileInfo(this->selectedIndexes().first());
QString newName = QInputDialog::getText(this, tr("Rename"), tr("New filename: "), QLineEdit::Normal, file.fileName());
- if(newName != file.fileName())
+ if(newName != file.fileName() && !newName.isEmpty())
{
if(QFile::rename(file.absoluteFilePath(), file.absolutePath()+"/"+newName))
return;