From a085aad2b5575fe689ff6675cfbc2b2f35788120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Tue, 16 Sep 2014 03:27:27 +0200 Subject: [PATCH] Enhance warning verbosity in TQFile (unix) (cherry picked from commit fdc4699bcbf4b4900a8ad75974420193218fd2c2) --- src/tools/qfile_unix.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/tools/qfile_unix.cpp b/src/tools/qfile_unix.cpp index b6da559..9414e84 100644 --- a/src/tools/qfile_unix.cpp +++ b/src/tools/qfile_unix.cpp @@ -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