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

List:       kde-commits
Subject:    KDE/kdesdk/kompare/libdiff2
From:       Kevin Kofler <kevin.kofler () chello ! at>
Date:       2010-04-01 2:18:57
Message-ID: 20100401021857.B6781AC888 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1109777 by kkofler:

kompare/libdiff2: Restore error handling for temporary file (using QFile::error \
instead of the Qt3Support QIODevice::status).

 M  +6 -1      komparemodellist.cpp  


--- trunk/KDE/kdesdk/kompare/libdiff2/komparemodellist.cpp #1109776:1109777
@@ -328,9 +328,14 @@
 
 	if( list.count() > 0 )
 		stream << list.join( "" );
+	if( temp.error() != QFile::NoError ) {
+		emit error( i18n( "<qt>Could not write to the temporary file <b>%1</b>, deleting \
it.</qt>", temp.fileName() ) ); +		temp.remove();
+		return false;
+	}
 
 	temp.close();
-	if( false/* || temp.status() != 0 */) {
+	if( temp.error() != QFile::NoError ) {
 		emit error( i18n( "<qt>Could not write to the temporary file <b>%1</b>, deleting \
it.</qt>", temp.fileName() ) );  temp.remove();
 		return false;


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

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