summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-07-09 23:09:59 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-07-09 23:09:59 +0900
commit83991febd2b98788a0a018e187de0dfb7d95b500 (patch)
treeec363502a3d11082cc54d17b7969f8ba605e1f01 /src/tools
parent48ea22d00b58a37508567756b2955582cd9efe5a (diff)
downloadtqt3-83991febd2b98788a0a018e187de0dfb7d95b500.tar.gz
tqt3-83991febd2b98788a0a018e187de0dfb7d95b500.zip
Remove Qt4 related stuff
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/ntqfileinfo.h6
-rw-r--r--src/tools/ntqiodevice.h4
-rw-r--r--src/tools/qbuffer.cpp4
-rw-r--r--src/tools/qfile_unix.cpp26
-rw-r--r--src/tools/qfileinfo.cpp10
-rw-r--r--src/tools/qglobal.cpp6
-rw-r--r--src/tools/qiodevice.cpp4
-rw-r--r--src/tools/qstring.cpp5
-rw-r--r--src/tools/qtextstream.cpp4
9 files changed, 10 insertions, 59 deletions
diff --git a/src/tools/ntqfileinfo.h b/src/tools/ntqfileinfo.h
index 3924a13fa..86cfe6b2e 100644
--- a/src/tools/ntqfileinfo.h
+++ b/src/tools/ntqfileinfo.h
@@ -119,13 +119,7 @@ public:
bool permission( int permissionSpec ) const;
-#if (TQT_VERSION-0 >= 0x040000)
-#error "TQFileInfo::size() should return TQIODevice::Offset instead of uint"
-#elif defined(QT_ABI_QT4)
- TQIODevice::Offset size() const;
-#else
uint size() const;
-#endif
TQDateTime created() const;
TQDateTime lastModified() const;
diff --git a/src/tools/ntqiodevice.h b/src/tools/ntqiodevice.h
index d014265cd..543ab8515 100644
--- a/src/tools/ntqiodevice.h
+++ b/src/tools/ntqiodevice.h
@@ -91,11 +91,7 @@
class Q_EXPORT TQIODevice
{
public:
-#if defined(QT_ABI_QT4)
- typedef TQ_LLONG Offset;
-#else
typedef TQ_ULONG Offset;
-#endif
TQIODevice();
virtual ~TQIODevice();
diff --git a/src/tools/qbuffer.cpp b/src/tools/qbuffer.cpp
index 0afa52aef..b1707d78d 100644
--- a/src/tools/qbuffer.cpp
+++ b/src/tools/qbuffer.cpp
@@ -268,12 +268,8 @@ bool TQBuffer::at( Offset pos )
#endif
if ( pos > a_len ) {
#if defined(QT_CHECK_RANGE)
-#if defined(QT_ABI_QT4)
- tqWarning( "TQBuffer::at: Index %lld out of range", pos );
-#else
tqWarning( "TQBuffer::at: Index %lu out of range", pos );
#endif
-#endif
return FALSE;
}
ioIndex = pos;
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,13 +352,9 @@ 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
if ( (st.st_mode & S_IFMT) != S_IFREG || f == stdin ) { //stdin is non seekable
@@ -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,19 +523,15 @@ 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,13 +654,9 @@ 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
}
diff --git a/src/tools/qfileinfo.cpp b/src/tools/qfileinfo.cpp
index 763324d15..466e62cc4 100644
--- a/src/tools/qfileinfo.cpp
+++ b/src/tools/qfileinfo.cpp
@@ -45,7 +45,7 @@
#include "ntqdir.h"
#include "qfiledefs_p.h"
#include "ntqdeepcopy.h"
-#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4)
+#if defined(QT_LARGEFILE_SUPPORT)
#include <limits.h>
#endif
@@ -576,18 +576,12 @@ bool TQFileInfo::convertToAbs()
Returns the file size in bytes, or 0 if the file does not exist or
if the size is 0 or if the size cannot be fetched.
*/
-#if defined(QT_ABI_QT4)
-TQIODevice::Offset TQFileInfo::size() const
-#else
uint TQFileInfo::size() const
-#endif
{
if ( !fic || !cache )
doStat();
if ( fic )
-#if defined(QT_ABI_QT4)
- return (TQIODevice::Offset)fic->st.st_size;
-#elif defined(QT_LARGEFILE_SUPPORT)
+#if defined(QT_LARGEFILE_SUPPORT)
return (uint)fic->st.st_size > UINT_MAX ? UINT_MAX : (uint)fic->st.st_size;
#else
return (uint)fic->st.st_size;
diff --git a/src/tools/qglobal.cpp b/src/tools/qglobal.cpp
index ed8805291..8c8c82ac6 100644
--- a/src/tools/qglobal.cpp
+++ b/src/tools/qglobal.cpp
@@ -723,12 +723,6 @@ void tqSystemWarning( const char* msg, int code )
//
// The TQ_CHECK_PTR macro calls this function to check if an allocation went ok.
//
-#if (TQT_VERSION-0 >= 0x040000)
-#if defined(Q_CC_GNU)
-#warning "Change TQ_CHECK_PTR to '{if ((p)==0) tqt_check_pointer(__FILE__,__LINE__);}'"
-#warning "No need for tqt_check_pointer() to return a value - make it void!"
-#endif
-#endif
bool tqt_check_pointer( bool c, const char *n, int l )
{
if ( c )
diff --git a/src/tools/qiodevice.cpp b/src/tools/qiodevice.cpp
index 4f89ddea1..cf069aa22 100644
--- a/src/tools/qiodevice.cpp
+++ b/src/tools/qiodevice.cpp
@@ -568,11 +568,7 @@ bool TQIODevice::at( Offset pos )
{
#if defined(QT_CHECK_RANGE)
if ( pos > size() ) {
-#if defined(QT_ABI_QT4)
- tqWarning( "TQIODevice::at: Index %lld out of range", pos );
-#else
tqWarning( "TQIODevice::at: Index %lu out of range", pos );
-#endif
return FALSE;
}
#endif
diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp
index 27bdf31d8..9c205e950 100644
--- a/src/tools/qstring.cpp
+++ b/src/tools/qstring.cpp
@@ -2081,13 +2081,10 @@ static ArgEscapeData findArgEscapes(const TQString &s)
d.locale_occurrences = 0;
}
-#if TQT_VERSION < 0x040000
- // ### remove preprocessor in TQt 4.0
- /* Since in TQt < 4.0 only the first instance is replaced,
+ /* Only the first instance is replaced,
escape_len should hold the length of only the first escape
sequence */
if (d.occurrences == 0)
-#endif
{
++d.occurrences;
if (locale_arg) {
diff --git a/src/tools/qtextstream.cpp b/src/tools/qtextstream.cpp
index 37937e6d0..85059dafc 100644
--- a/src/tools/qtextstream.cpp
+++ b/src/tools/qtextstream.cpp
@@ -384,12 +384,8 @@ bool TQStringBuffer::at( Offset pos )
#endif
if ( pos >= s->length()*2 ) {
#if defined(QT_CHECK_RANGE)
-#if defined(QT_ABI_QT4)
- tqWarning( "TQStringBuffer::at: Index %lld out of range", pos );
-#else
tqWarning( "TQStringBuffer::at: Index %lu out of range", pos );
#endif
-#endif
return FALSE;
}
ioIndex = pos;