Fix Bug 328262 - rename bug if you cancel when folder already exists

Only connect the renamingFailed signal if there is no item with the new name in the model yet.

BUG: 328262
FIXED-IN: 4.11.5
REVIEW: 114228
This commit is contained in:
Emmanuel Pescosta 2013-12-03 19:00:28 +01:00
parent c3ad6c7406
commit c4c999d243

View file

@ -1492,7 +1492,9 @@ void DolphinView::slotRoleEditingFinished(int index, const QByteArray& role, con
}
KonqOperations* op = KonqOperations::renameV2(this, oldUrl, newName);
if (op) {
if (op && !newNameExistsAlready) {
// Only connect the renamingFailed signal if there is no item with the new name
// in the model yet, see bug 328262.
connect(op, SIGNAL(renamingFailed(KUrl,KUrl)), SLOT(slotRenamingFailed(KUrl,KUrl)));
}
}