[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegraphics/gwenview
From:       Aurélien Gâteau <aurelien.gateau () free ! fr>
Date:       2007-06-30 22:53:55
Message-ID: 1183244035.904308.1494.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 681944 by gateau:

Update Document::format() when saving.


 M  +5 -1      lib/documentloadedimpl.cpp  
 M  +1 -0      tests/documenttest.cpp  


--- trunk/KDE/kdegraphics/gwenview/lib/documentloadedimpl.cpp #681943:681944
@@ -58,7 +58,11 @@
 
 
 bool DocumentLoadedImpl::saveInternal(QIODevice* device, const QString& format) {
-	return document()->image().save(device, format.toAscii());
+	bool ok = document()->image().save(device, format.toAscii());
+	if (ok) {
+		setDocumentFormat(format.toAscii());
+	}
+	return ok;
 }
 
 
--- trunk/KDE/kdegraphics/gwenview/tests/documenttest.cpp #681943:681944
@@ -96,6 +96,7 @@
 	KUrl destUrl(QDir::currentPath() + "/result.png");
 	Document::SaveResult result = doc->save(destUrl, "png");
 	QCOMPARE(result, Document::SR_OK);
+	QCOMPARE(doc->format().data(), "png");
 
 	QVERIFY2(doc->isLoaded(),
 		"Document is supposed to finish loading before saving"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic