Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > by-pkgid > b489161e8179a429b4f3255503fcb3d7 > files > 8

gwenview-1.4.1-5.1mdv2007.1.src.rpm

Index: mainwindow.h
===================================================================
--- mainwindow.h	(revisione 680290)
+++ mainwindow.h	(copia locale)
@@ -148,6 +148,7 @@
 	void makeDir();
 	void goHome();
 	void renameFile();
+	void renamed(const QString&);
 	void copyFiles();
 	void moveFiles();
 	void linkFiles();
Index: mainwindow.cpp
===================================================================
--- mainwindow.cpp	(revisione 680290)
+++ mainwindow.cpp	(copia locale)
@@ -256,7 +256,12 @@
 	}
 }
 
-
+void MainWindow::renamed(const QString& fileName) {
+	KURL url = mDocument->url();
+	url.setFileName(fileName);
+	mDocument->setURL(url);
+}
+	
 void MainWindow::slotDirURLChanged(const KURL& dirURL) {
 	LOG(dirURL.prettyURL(0,KURL::StripFileProtocol));
 	
@@ -350,7 +355,7 @@
 	} else {
 		url = mDocument->url();
 	}
-	FileOperation::rename(url, this);
+	FileOperation::rename(url, this, this, SLOT(renamed(const QString &)));
 }