summaryrefslogtreecommitdiff
path: root/inputmethods/handwriting/qimpenchar.cpp
Unidiff
Diffstat (limited to 'inputmethods/handwriting/qimpenchar.cpp') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpenchar.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/inputmethods/handwriting/qimpenchar.cpp b/inputmethods/handwriting/qimpenchar.cpp
index 0c37e5c..929f370 100644
--- a/inputmethods/handwriting/qimpenchar.cpp
+++ b/inputmethods/handwriting/qimpenchar.cpp
@@ -337,36 +337,39 @@ bool QIMPenCharSet::load( const QString &fn, Domain d )
337 csType = Combining; 337 csType = Combining;
338 } 338 }
339 while ( !ds.atEnd() ) { 339 while ( !ds.atEnd() ) {
340 QIMPenChar *pc = new QIMPenChar; 340 QIMPenChar *pc = new QIMPenChar;
341 ds >> *pc; 341 ds >> *pc;
342 if ( d == User ) 342 if ( d == User )
343 markDeleted( pc->character() ); // override system 343 markDeleted( pc->character() ); // override system
344 addChar( pc ); 344 addChar( pc );
345 } 345 }
346 if ( file.status() == IO_Ok ) 346 if ( file.status() == IO_Ok )
347 ok = TRUE; 347 ok = TRUE;
348 } 348 }
349 349 setHidden ( false );
350 return ok; 350 return ok;
351} 351}
352 352
353/*! 353/*!
354 Save this character set. 354 Save this character set.
355 */ 355 */
356bool QIMPenCharSet::save( Domain d ) 356bool QIMPenCharSet::save( Domain d )
357{ 357{
358 if ( filename( d ).isEmpty() ) 358 if ( filename( d ).isEmpty() )
359 return FALSE; 359 return FALSE;
360 360
361 if ( hidden() )
362 return TRUE;
363
361 bool ok = FALSE; 364 bool ok = FALSE;
362 365
363 QString fn = filename( d ); 366 QString fn = filename( d );
364 QString tmpFn = fn + ".new"; 367 QString tmpFn = fn + ".new";
365 QFile file( tmpFn ); 368 QFile file( tmpFn );
366 if ( file.open( IO_WriteOnly|IO_Raw ) ) { 369 if ( file.open( IO_WriteOnly|IO_Raw ) ) {
367 QByteArray buf; 370 QByteArray buf;
368 QDataStream ds( buf, IO_WriteOnly ); 371 QDataStream ds( buf, IO_WriteOnly );
369 ds << QString( "QPT 1.1" ); 372 ds << QString( "QPT 1.1" );
370 ds << csTitle; 373 ds << csTitle;
371 ds << desc; 374 ds << desc;
372 ds << (Q_INT8)csType; 375 ds << (Q_INT8)csType;