comparison kdiff3/src/pdiff.cpp @ 50:8c9752066f09

Error-detection for diff-problems improved.
author joachim99
date Fri, 17 Oct 2003 16:54:25 +0000
parents 675b2ed580b2
children c59d5a3a8ff3
comparison
equal deleted inserted replaced
49:f2d44f9d268d 50:8c9752066f09
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18 /*************************************************************************** 18 /***************************************************************************
19 * $Log$ 19 * $Log$
20 * Revision 1.3 2003/10/17 16:54:25 joachim99
21 * Error-detection for diff-problems improved.
22 *
20 * Revision 1.2 2003/10/11 12:50:38 joachim99 23 * Revision 1.2 2003/10/11 12:50:38 joachim99
21 * KDiff3App::slotRefresh(): Call setFont() for subwindows 24 * KDiff3App::slotRefresh(): Call setFont() for subwindows
22 * 25 *
23 * Revision 1.1 2003/10/06 18:38:48 joachim99 26 * Revision 1.1 2003/10/06 18:38:48 joachim99
24 * KDiff3 version 0.9.70 27 * KDiff3 version 0.9.70
261 } 264 }
262 265
263 if ( currentLine1 == size1 && currentLine2 == size2 ) 266 if ( currentLine1 == size1 && currentLine2 == size2 )
264 bSuccess = true; 267 bSuccess = true;
265 } 268 }
269 else
270 {
271 bSuccess = size1==size2;
272 }
266 } 273 }
267 if ( currentLine1==0 && currentLine2==0 ) 274 if ( currentLine1==0 && currentLine2==0 )
268 { 275 {
269 Diff d( 0, size1, size2 ); 276 Diff d( 0, size1, size2 );
270 diffList.push_back(d); 277 diffList.push_back(d);
271 } 278 }
272 279
273 FileAccess::removeFile( fileName1 );
274 FileAccess::removeFile( fileName2 );
275 FileAccess::removeFile( fileNameOut );
276 g_pProgressDialog->setSubCurrent(1.0); 280 g_pProgressDialog->setSubCurrent(1.0);
277 281
278 if ( !bSuccess ) 282 if ( !bSuccess )
279 { 283 {
280 KMessageBox::sorry(this, 284 KMessageBox::sorry(this,
282 "Check if the diff works, if the program can write in the temp folder or if the disk is full.\n" 286 "Check if the diff works, if the program can write in the temp folder or if the disk is full.\n"
283 "The external diff option will be disabled now and the internal diff will be used."), 287 "The external diff option will be disabled now and the internal diff will be used."),
284 i18n("KDiff3 Warning")); 288 i18n("KDiff3 Warning"));
285 m_pOptionDialog->m_bUseExternalDiff = false; 289 m_pOptionDialog->m_bUseExternalDiff = false;
286 } 290 }
291
292 FileAccess::removeFile( fileName1 );
293 FileAccess::removeFile( fileName2 );
294 FileAccess::removeFile( fileNameOut );
287 } 295 }
288 296
289 if ( ! m_pOptionDialog->m_bUseExternalDiff ) 297 if ( ! m_pOptionDialog->m_bUseExternalDiff )
290 { 298 {
291 g_pProgressDialog->setSubCurrent(0.0); 299 g_pProgressDialog->setSubCurrent(0.0);