From 83991febd2b98788a0a018e187de0dfb7d95b500 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 9 Jul 2023 23:09:59 +0900 Subject: Remove Qt4 related stuff Signed-off-by: Michele Calgaro --- src/tools/qfile_unix.cpp | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'src/tools/qfile_unix.cpp') diff --git a/src/tools/qfile_unix.cpp b/src/tools/qfile_unix.cpp index e54ee6b97..f28899483 100644 --- a/src/tools/qfile_unix.cpp +++ b/src/tools/qfile_unix.cpp @@ -278,7 +278,7 @@ bool TQFile::open( int m ) length = INT_MAX; ioIndex = 0; } else { -#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) +#if defined(QT_LARGEFILE_SUPPORT) length = st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size; #else length = (Offset)st.st_size; @@ -352,12 +352,8 @@ bool TQFile::open( int m, FILE *f ) struct stat st; ::fstat( fileno(fh), &st ); #if defined(QT_LARGEFILE_SUPPORT) -#if !defined(QT_ABI_QT4) off_t tmp = ftello( fh ); ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp; -#else - ioIndex = (Offset)ftello( fh ); -#endif #else ioIndex = (Offset)ftell( fh ); #endif @@ -367,7 +363,7 @@ bool TQFile::open( int m, FILE *f ) length = INT_MAX; ioIndex = 0; } else { -#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) +#if defined(QT_LARGEFILE_SUPPORT) length = st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size; #else length = (Offset)st.st_size; @@ -423,7 +419,7 @@ bool TQFile::open( int m, int f ) ext_f = TRUE; struct stat st; ::fstat( fd, &st ); -#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) +#if defined(QT_LARGEFILE_SUPPORT) off_t tmp = ::lseek(fd, 0, SEEK_CUR); ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp; #else @@ -435,7 +431,7 @@ bool TQFile::open( int m, int f ) length = INT_MAX; ioIndex = 0; } else { -#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) +#if defined(QT_LARGEFILE_SUPPORT) length = st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size; #else length = (Offset)st.st_size; @@ -472,7 +468,7 @@ TQIODevice::Offset TQFile::size() const } if ( ret == -1 ) return 0; -#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) +#if defined(QT_LARGEFILE_SUPPORT) return (uint)st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size; #else return st.st_size; @@ -527,18 +523,14 @@ bool TQFile::at( Offset pos ) #endif } if ( ok ) -#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) +#if defined(QT_LARGEFILE_SUPPORT) ioIndex = pos > UINT_MAX ? UINT_MAX : (Offset)pos; #else ioIndex = (Offset)pos; #endif #if defined(QT_CHECK_RANGE) else -#if defined(QT_ABI_QT4) - tqWarning( "TQFile::at: Cannot set file position %lld", pos ); -#else tqWarning( "TQFile::at: Cannot set file position %lu", pos ); -#endif #endif return ok; } @@ -654,7 +646,7 @@ TQ_LONG TQFile::writeBlock( const char *p, TQ_ULONG len ) setErrorStringErrno( errno ); if ( !isSequentialAccess() ) { if ( isRaw() ) { // recalc file position -#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) +#if defined(QT_LARGEFILE_SUPPORT) off_t tmp = ::lseek( fd, 0, SEEK_CUR ); ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp; #else @@ -662,12 +654,8 @@ TQ_LONG TQFile::writeBlock( const char *p, TQ_ULONG len ) #endif } else { #if defined(QT_LARGEFILE_SUPPORT) -#if !defined(QT_ABI_QT4) off_t tmp = (Offset)::fseeko( fh, 0, SEEK_CUR ); ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp; -#else - ioIndex = (Offset)::fseeko( fh, 0, SEEK_CUR ); -#endif #else ioIndex = (Offset)::fseek( fh, 0, SEEK_CUR ); #endif -- cgit v1.2.1