|
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 |
TQString error = TQString("TQFile::open: File (%1) already open").arg(fn); |
|
|
172 |
tqWarning( error ); |
| 172 |
#endif |
173 |
#endif |
| 173 |
return FALSE; |
174 |
return FALSE; |
| 174 |
} |
175 |
} |
|
Lines 182-188
Link Here
|
| 182 |
setMode( m ); |
183 |
setMode( m ); |
| 183 |
if ( !(isReadable() || isWritable()) ) { |
184 |
if ( !(isReadable() || isWritable()) ) { |
| 184 |
#if defined(QT_CHECK_RANGE) |
185 |
#if defined(QT_CHECK_RANGE) |
| 185 |
tqWarning( "TQFile::open: File access not specified" ); |
186 |
TQString error = TQString("TQFile::open: File access (%1) not specified").arg(fn); |
|
|
187 |
tqWarning( error ); |
| 186 |
#endif |
188 |
#endif |
| 187 |
return FALSE; |
189 |
return FALSE; |
| 188 |
} |
190 |
} |
|
Lines 340-346
Link Here
|
| 340 |
{ |
342 |
{ |
| 341 |
if ( isOpen() ) { |
343 |
if ( isOpen() ) { |
| 342 |
#if defined(QT_CHECK_RANGE) |
344 |
#if defined(QT_CHECK_RANGE) |
| 343 |
tqWarning( "TQFile::open: File already open" ); |
345 |
TQString error = TQString("TQFile::open: File (%1) already open").arg(fn); |
|
|
346 |
tqWarning( error ); |
| 344 |
#endif |
347 |
#endif |
| 345 |
return FALSE; |
348 |
return FALSE; |
| 346 |
} |
349 |
} |
|
Lines 412-418
Link Here
|
| 412 |
{ |
415 |
{ |
| 413 |
if ( isOpen() ) { |
416 |
if ( isOpen() ) { |
| 414 |
#if defined(QT_CHECK_RANGE) |
417 |
#if defined(QT_CHECK_RANGE) |
| 415 |
tqWarning( "TQFile::open: File already open" ); |
418 |
TQString error = TQString("TQFile::open: File (%1) already open").arg(fn); |
|
|
419 |
tqWarning( error ); |
| 416 |
#endif |
420 |
#endif |
| 417 |
return FALSE; |
421 |
return FALSE; |
| 418 |
} |
422 |
} |
|
Lines 508-514
Link Here
|
| 508 |
{ |
512 |
{ |
| 509 |
if ( !isOpen() ) { |
513 |
if ( !isOpen() ) { |
| 510 |
#if defined(QT_CHECK_STATE) |
514 |
#if defined(QT_CHECK_STATE) |
| 511 |
tqWarning( "TQFile::at: File is not open" ); |
515 |
TQString error = TQString("TQFile::at: File (%1) is not open").arg(fn); |
|
|
516 |
tqWarning( error ); |
| 512 |
#endif |
517 |
#endif |
| 513 |
return FALSE; |
518 |
return FALSE; |
| 514 |
} |
519 |
} |
|
Lines 564-574
Link Here
|
| 564 |
#endif |
569 |
#endif |
| 565 |
#if defined(QT_CHECK_STATE) |
570 |
#if defined(QT_CHECK_STATE) |
| 566 |
if ( !isOpen() ) { |
571 |
if ( !isOpen() ) { |
| 567 |
tqWarning( "TQFile::readBlock: File not open" ); |
572 |
TQString error = TQString("TQFile::readBlock: File (%1) not open").arg(fn); |
|
|
573 |
tqWarning( error ); |
| 568 |
return -1; |
574 |
return -1; |
| 569 |
} |
575 |
} |
| 570 |
if ( !isReadable() ) { |
576 |
if ( !isReadable() ) { |
| 571 |
tqWarning( "TQFile::readBlock: Read operation not permitted" ); |
577 |
TQString error = TQString("TQFile::readBlock: Read operation not permitted in file %1 ").arg(fn); |
|
|
578 |
tqWarning( error ); |
| 572 |
return -1; |
579 |
return -1; |
| 573 |
} |
580 |
} |
| 574 |
#endif |
581 |
#endif |
|
Lines 633-643
Link Here
|
| 633 |
#endif |
640 |
#endif |
| 634 |
#if defined(QT_CHECK_STATE) |
641 |
#if defined(QT_CHECK_STATE) |
| 635 |
if ( !isOpen() ) { // file not open |
642 |
if ( !isOpen() ) { // file not open |
| 636 |
tqWarning( "TQFile::writeBlock: File not open" ); |
643 |
TQString error = TQString("TQFile::writeBlock: File (%1) not open").arg(fn); |
|
|
644 |
tqWarning( error ); |
| 637 |
return -1; |
645 |
return -1; |
| 638 |
} |
646 |
} |
| 639 |
if ( !isWritable() ) { // writing not permitted |
647 |
if ( !isWritable() ) { // writing not permitted |
| 640 |
tqWarning( "TQFile::writeBlock: Write operation not permitted" ); |
648 |
TQString error = TQString("TQFile::writeBlock: Write operation not permitted in file %1 ").arg(fn); |
|
|
649 |
tqWarning( error ); |
| 641 |
return -1; |
650 |
return -1; |
| 642 |
} |
651 |
} |
| 643 |
#endif |
652 |
#endif |