]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix Bug 328262 - rename bug if you cancel when folder already exists
authorEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Tue, 3 Dec 2013 18:00:28 +0000 (19:00 +0100)
committerEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Tue, 3 Dec 2013 18:00:28 +0000 (19:00 +0100)
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

src/views/dolphinview.cpp

index 20bc9f522534feaa5faab871e63180617a5b8ef2..db9d8d22fb9aa398bccd19f5ecf19288a22041d0 100644 (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)));
             }
         }