summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2014-09-12 12:59:53 -0500
committerTimothy Pearson <[email protected]>2014-09-12 12:59:53 -0500
commitb47847259808cc29f6bf98b8c788603d0d21a038 (patch)
tree4ce7377f698a62b2c6e04ec50b70641730dcfa42 /src
parent9c2ce91a364c22f9b232eb40f3c2a392360ed21c (diff)
downloadtqt3-b47847259808cc29f6bf98b8c788603d0d21a038.tar.gz
tqt3-b47847259808cc29f6bf98b8c788603d0d21a038.zip
Automated update from Qt3
Diffstat (limited to 'src')
-rw-r--r--src/tools/ntqtextstream.h5
-rw-r--r--src/tools/ntqvaluelist.h4
-rw-r--r--src/tools/qgpluginmanager.cpp2
-rw-r--r--src/tools/qtextstream.cpp31
4 files changed, 36 insertions, 6 deletions
diff --git a/src/tools/ntqtextstream.h b/src/tools/ntqtextstream.h
index e0520a5c4..609cd0dcd 100644
--- a/src/tools/ntqtextstream.h
+++ b/src/tools/ntqtextstream.h
@@ -102,6 +102,8 @@ public:
TQTextStream &operator<<( unsigned int );
TQTextStream &operator<<( signed long );
TQTextStream &operator<<( unsigned long );
+ TQTextStream &operator<<( signed long long );
+ TQTextStream &operator<<( unsigned long long );
TQTextStream &operator<<( float );
TQTextStream &operator<<( double );
TQTextStream &operator<<( const char* );
@@ -155,7 +157,8 @@ public:
private:
long input_int();
void init();
- TQTextStream &output_int( int, ulong, bool );
+ TQTextStream &output_int( int, unsigned long long, bool );
+
TQIODevice *dev;
int fflags;
diff --git a/src/tools/ntqvaluelist.h b/src/tools/ntqvaluelist.h
index b9fc73098..24a9cfc57 100644
--- a/src/tools/ntqvaluelist.h
+++ b/src/tools/ntqvaluelist.h
@@ -655,13 +655,11 @@ Q_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueList<T>& l
l.clear();
TQ_UINT32 c;
s >> c;
- for( TQ_UINT32 i = 0; i < c; ++i )
+ for( TQ_UINT32 i = 0; i < c && !s.atEnd(); ++i )
{
T t;
s >> t;
l.append( t );
- if ( s.atEnd() )
- break;
}
return s;
}
diff --git a/src/tools/qgpluginmanager.cpp b/src/tools/qgpluginmanager.cpp
index 8e2ea9a00..1e96cf8fe 100644
--- a/src/tools/qgpluginmanager.cpp
+++ b/src/tools/qgpluginmanager.cpp
@@ -323,6 +323,8 @@ void TQGPluginManager::addLibraryPath( const TQString& path )
TQString filter = "*.dylib; *.so; *.bundle";
#elif defined(Q_OS_HPUX)
TQString filter = "*.sl";
+#elif defined(Q_OS_OPENBSD)
+ TQString filter = "*.so; *.so.*";
#elif defined(Q_OS_UNIX)
TQString filter = "*.so";
#endif
diff --git a/src/tools/qtextstream.cpp b/src/tools/qtextstream.cpp
index 6a0e1d6b7..213581b82 100644
--- a/src/tools/qtextstream.cpp
+++ b/src/tools/qtextstream.cpp
@@ -195,6 +195,7 @@
#define I_SHORT 0x0010
#define I_INT 0x0020
#define I_LONG 0x0030
+#define I_LONGLONG 0x0040
#define I_TYPE_MASK 0x00f0
#define I_BASE_2 TQTS::bin
@@ -1862,7 +1863,7 @@ TQTextStream &TQTextStream::operator<<( char c )
return *this;
}
-TQTextStream &TQTextStream::output_int( int format, ulong n, bool neg )
+TQTextStream &TQTextStream::output_int( int format, unsigned long long n, bool neg )
{
static const char hexdigits_lower[] = "0123456789abcdef";
static const char hexdigits_upper[] = "0123456789ABCDEF";
@@ -1879,6 +1880,7 @@ TQTextStream &TQTextStream::output_int( int format, ulong n, bool neg )
case I_SHORT: len=16; break;
case I_INT: len=sizeof(int)*8; break;
case I_LONG: len=32; break;
+ case I_LONGLONG: len=64; break;
default: len = 0;
}
p = &buf[74]; // go reverse order
@@ -1925,7 +1927,7 @@ TQTextStream &TQTextStream::output_int( int format, ulong n, bool neg )
p = &buf[74];
*p = '\0';
if ( neg )
- n = (ulong)(-(long)n);
+ n = (unsigned long long)(-(long long)n);
do {
*--p = ((int)(n%10)) + '0';
n /= 10;
@@ -2041,6 +2043,31 @@ TQTextStream &TQTextStream::operator<<( unsigned long i )
return output_int( I_LONG | I_UNSIGNED, i, FALSE );
}
+/*!
+ \overload
+
+ Writes a \c long long \c int \a i to the stream and returns a reference
+ to the stream.
+*/
+
+TQTextStream &TQTextStream::operator<<( signed long long i )
+{
+ return output_int( I_LONGLONG | I_SIGNED, i, i < 0 );
+}
+
+
+/*!
+ \overload
+
+ Writes an \c unsigned \c long \c int \a i to the stream and
+ returns a reference to the stream.
+*/
+
+TQTextStream &TQTextStream::operator<<( unsigned long long i )
+{
+ return output_int( I_LONGLONG | I_UNSIGNED, i, FALSE );
+}
+
/*!
\overload