Enhance warning verbosity in TQFile (unix)

(cherry picked from commit fdc4699bcb)
v3.5.13-sru
François Andriot 10 years ago committed by Slávek Banko
parent 664cc9b90c
commit a085aad2b5

@ -168,7 +168,7 @@ bool QFile::open( int m )
{
if ( isOpen() ) { // file already open
#if defined(QT_CHECK_STATE)
qWarning( "QFile::open: File already open" );
qWarning( "QFile::open: File (%s) already open", fn.latin1() );
#endif
return FALSE;
}
@ -182,7 +182,7 @@ bool QFile::open( int m )
setMode( m );
if ( !(isReadable() || isWritable()) ) {
#if defined(QT_CHECK_RANGE)
qWarning( "QFile::open: File access not specified" );
qWarning( "QFile::open: File access (%s) not specified", fn.latin1() );
#endif
return FALSE;
}
@ -340,7 +340,7 @@ bool QFile::open( int m, FILE *f )
{
if ( isOpen() ) {
#if defined(QT_CHECK_RANGE)
qWarning( "QFile::open: File already open" );
qWarning( "QFile::open: File (%s) already open", fn.latin1() );
#endif
return FALSE;
}
@ -412,7 +412,7 @@ bool QFile::open( int m, int f )
{
if ( isOpen() ) {
#if defined(QT_CHECK_RANGE)
qWarning( "QFile::open: File already open" );
qWarning( "QFile::open: File (%s) already open", fn.latin1() );
#endif
return FALSE;
}
@ -508,7 +508,7 @@ bool QFile::at( Offset pos )
{
if ( !isOpen() ) {
#if defined(QT_CHECK_STATE)
qWarning( "QFile::at: File is not open" );
qWarning( "QFile::at: File (%s) is not open", fn.latin1() );
#endif
return FALSE;
}
@ -564,11 +564,11 @@ Q_LONG QFile::readBlock( char *p, Q_ULONG len )
#endif
#if defined(QT_CHECK_STATE)
if ( !isOpen() ) {
qWarning( "QFile::readBlock: File not open" );
qWarning( "QFile::readBlock: File (%s) not open", fn.latin1() );
return -1;
}
if ( !isReadable() ) {
qWarning( "QFile::readBlock: Read operation not permitted" );
qWarning( "QFile::readBlock: Read operation not permitted in file %s ", fn.latin1() );
return -1;
}
#endif
@ -633,11 +633,11 @@ Q_LONG QFile::writeBlock( const char *p, Q_ULONG len )
#endif
#if defined(QT_CHECK_STATE)
if ( !isOpen() ) { // file not open
qWarning( "QFile::writeBlock: File not open" );
qWarning( "QFile::writeBlock: File (%s) not open", fn.latin1() );
return -1;
}
if ( !isWritable() ) { // writing not permitted
qWarning( "QFile::writeBlock: Write operation not permitted" );
qWarning( "QFile::writeBlock: Write operation not permitted in file %s ", fn.latin1() );
return -1;
}
#endif

Loading…
Cancel
Save