|
Lines 168-174
Link Here
|
| 168 |
{ |
168 |
{ |
| 169 |
if ( isOpen() ) { // file already open |
169 |
if ( isOpen() ) { // file already open |
| 170 |
#if defined(QT_CHECK_STATE) |
170 |
#if defined(QT_CHECK_STATE) |
| 171 |
tqWarning( "TQFile::open: File already open" ); |
171 |
tqWarning( "TQFile::open: File (%s) already open", fn.latin1() ); |
| 172 |
#endif |
172 |
#endif |
| 173 |
return FALSE; |
173 |
return FALSE; |
| 174 |
} |
174 |
} |
|
Lines 182-188
Link Here
|
| 182 |
setMode( m ); |
182 |
setMode( m ); |
| 183 |
if ( !(isReadable() || isWritable()) ) { |
183 |
if ( !(isReadable() || isWritable()) ) { |
| 184 |
#if defined(QT_CHECK_RANGE) |
184 |
#if defined(QT_CHECK_RANGE) |
| 185 |
tqWarning( "TQFile::open: File access not specified" ); |
185 |
tqWarning( "TQFile::open: File access (%s) not specified", fn.latin1() ); |
| 186 |
#endif |
186 |
#endif |
| 187 |
return FALSE; |
187 |
return FALSE; |
| 188 |
} |
188 |
} |
|
Lines 340-346
Link Here
|
| 340 |
{ |
340 |
{ |
| 341 |
if ( isOpen() ) { |
341 |
if ( isOpen() ) { |
| 342 |
#if defined(QT_CHECK_RANGE) |
342 |
#if defined(QT_CHECK_RANGE) |
| 343 |
tqWarning( "TQFile::open: File already open" ); |
343 |
tqWarning( "TQFile::open: File (%s) already open", fn.latin1() ); |
| 344 |
#endif |
344 |
#endif |
| 345 |
return FALSE; |
345 |
return FALSE; |
| 346 |
} |
346 |
} |
|
Lines 412-418
Link Here
|
| 412 |
{ |
412 |
{ |
| 413 |
if ( isOpen() ) { |
413 |
if ( isOpen() ) { |
| 414 |
#if defined(QT_CHECK_RANGE) |
414 |
#if defined(QT_CHECK_RANGE) |
| 415 |
tqWarning( "TQFile::open: File already open" ); |
415 |
tqWarning( "TQFile::open: File (%s) already open", fn.latin1() ); |
| 416 |
#endif |
416 |
#endif |
| 417 |
return FALSE; |
417 |
return FALSE; |
| 418 |
} |
418 |
} |
|
Lines 508-514
Link Here
|
| 508 |
{ |
508 |
{ |
| 509 |
if ( !isOpen() ) { |
509 |
if ( !isOpen() ) { |
| 510 |
#if defined(QT_CHECK_STATE) |
510 |
#if defined(QT_CHECK_STATE) |
| 511 |
tqWarning( "TQFile::at: File is not open" ); |
511 |
tqWarning( "TQFile::at: File (%s) is not open", fn.latin1() ); |
| 512 |
#endif |
512 |
#endif |
| 513 |
return FALSE; |
513 |
return FALSE; |
| 514 |
} |
514 |
} |
|
Lines 564-574
Link Here
|
| 564 |
#endif |
564 |
#endif |
| 565 |
#if defined(QT_CHECK_STATE) |
565 |
#if defined(QT_CHECK_STATE) |
| 566 |
if ( !isOpen() ) { |
566 |
if ( !isOpen() ) { |
| 567 |
tqWarning( "TQFile::readBlock: File not open" ); |
567 |
tqWarning( "TQFile::readBlock: File (%s) not open", fn.latin1() ); |
| 568 |
return -1; |
568 |
return -1; |
| 569 |
} |
569 |
} |
| 570 |
if ( !isReadable() ) { |
570 |
if ( !isReadable() ) { |
| 571 |
tqWarning( "TQFile::readBlock: Read operation not permitted" ); |
571 |
tqWarning( "TQFile::readBlock: Read operation not permitted in file %s ", fn.latin1() ); |
| 572 |
return -1; |
572 |
return -1; |
| 573 |
} |
573 |
} |
| 574 |
#endif |
574 |
#endif |
|
Lines 633-643
Link Here
|
| 633 |
#endif |
633 |
#endif |
| 634 |
#if defined(QT_CHECK_STATE) |
634 |
#if defined(QT_CHECK_STATE) |
| 635 |
if ( !isOpen() ) { // file not open |
635 |
if ( !isOpen() ) { // file not open |
| 636 |
tqWarning( "TQFile::writeBlock: File not open" ); |
636 |
tqWarning( "TQFile::writeBlock: File (%s) not open", fn.latin1() ); |
| 637 |
return -1; |
637 |
return -1; |
| 638 |
} |
638 |
} |
| 639 |
if ( !isWritable() ) { // writing not permitted |
639 |
if ( !isWritable() ) { // writing not permitted |
| 640 |
tqWarning( "TQFile::writeBlock: Write operation not permitted" ); |
640 |
tqWarning( "TQFile::writeBlock: Write operation not permitted in file %s ", fn.latin1() ); |
| 641 |
return -1; |
641 |
return -1; |
| 642 |
} |
642 |
} |
| 643 |
#endif |
643 |
#endif |