Diffstat (limited to 'inputmethods/handwriting/qimpenchar.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/handwriting/qimpenchar.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inputmethods/handwriting/qimpenchar.cpp b/inputmethods/handwriting/qimpenchar.cpp index db5d135..b83b2a4 100644 --- a/inputmethods/handwriting/qimpenchar.cpp +++ b/inputmethods/handwriting/qimpenchar.cpp | |||
@@ -371,50 +371,50 @@ bool QIMPenCharSet::save( Domain d ) | |||
371 | QByteArray buf; | 371 | QByteArray buf; |
372 | QDataStream ds( buf, IO_WriteOnly ); | 372 | QDataStream ds( buf, IO_WriteOnly ); |
373 | ds << QString( "QPT 1.1" ); | 373 | ds << QString( "QPT 1.1" ); |
374 | ds << csTitle; | 374 | ds << csTitle; |
375 | ds << desc; | 375 | ds << desc; |
376 | ds << (Q_INT8)csType; | 376 | ds << (Q_INT8)csType; |
377 | QIMPenCharIterator ci( chars ); | 377 | QIMPenCharIterator ci( chars ); |
378 | for ( ; ci.current(); ++ci ) { | 378 | for ( ; ci.current(); ++ci ) { |
379 | QIMPenChar *pc = ci.current(); | 379 | QIMPenChar *pc = ci.current(); |
380 | if ( ( ( (d == System) && pc->testFlag( QIMPenChar::System ) ) || | 380 | if ( ( ( (d == System) && pc->testFlag( QIMPenChar::System ) ) || |
381 | ( (d == User) && !pc->testFlag( QIMPenChar::System ) ) ) && | 381 | ( (d == User) && !pc->testFlag( QIMPenChar::System ) ) ) && |
382 | ( !pc->testFlag (QIMPenChar::Combined ) ) ) { | 382 | ( !pc->testFlag (QIMPenChar::Combined ) ) ) { |
383 | ds << *pc; | 383 | ds << *pc; |
384 | } | 384 | } |
385 | } | 385 | } |
386 | 386 | ||
387 | file.writeBlock( buf ); | 387 | file.writeBlock( buf ); |
388 | file.close(); | 388 | file.close(); |
389 | if ( file.status() == IO_Ok ) | 389 | if ( file.status() == IO_Ok ) |
390 | ok = TRUE; | 390 | ok = TRUE; |
391 | } | 391 | } |
392 | 392 | ||
393 | if ( ok ) { | 393 | if ( ok ) { |
394 | if ( ::rename( tmpFn.latin1(), fn.latin1() ) < 0 ) { | 394 | if ( ::rename( tmpFn.latin1(), fn.latin1() ) < 0 ) { |
395 | qWarning( "problem renaming file %s to %s, errno: %d", | 395 | owarn << "problem renaming file " <<tmpFn.latin1() << " to "<< fn.latin1() |
396 | tmpFn.latin1(), fn.latin1(), errno ); | 396 | << ", errno: " << errno << oendl; |
397 | // remove the tmp file, otherwise, it will just lay around... | 397 | // remove the tmp file, otherwise, it will just lay around... |
398 | QFile::remove( tmpFn.latin1() ); | 398 | QFile::remove( tmpFn.latin1() ); |
399 | ok = FALSE; | 399 | ok = FALSE; |
400 | } | 400 | } |
401 | } | 401 | } |
402 | 402 | ||
403 | return ok; | 403 | return ok; |
404 | } | 404 | } |
405 | 405 | ||
406 | QIMPenChar *QIMPenCharSet::at( int i ) | 406 | QIMPenChar *QIMPenCharSet::at( int i ) |
407 | { | 407 | { |
408 | return chars.at(i); | 408 | return chars.at(i); |
409 | } | 409 | } |
410 | 410 | ||
411 | void QIMPenCharSet::markDeleted( uint ch ) | 411 | void QIMPenCharSet::markDeleted( uint ch ) |
412 | { | 412 | { |
413 | QIMPenCharIterator ci( chars ); | 413 | QIMPenCharIterator ci( chars ); |
414 | for ( ; ci.current(); ++ci ) { | 414 | for ( ; ci.current(); ++ci ) { |
415 | QIMPenChar *pc = ci.current(); | 415 | QIMPenChar *pc = ci.current(); |
416 | if ( pc->character() == ch && pc->testFlag( QIMPenChar::System ) ) | 416 | if ( pc->character() == ch && pc->testFlag( QIMPenChar::System ) ) |
417 | pc->setFlag( QIMPenChar::Deleted ); | 417 | pc->setFlag( QIMPenChar::Deleted ); |
418 | } | 418 | } |
419 | } | 419 | } |
420 | 420 | ||