diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-06-17 17:28:28 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-06-17 17:28:28 -0500 |
commit | 6dec101d43dcbd4195c47d54bd388db1a8d7230e (patch) | |
tree | 7c336cbed3a93807a34cd4df39b2f92a7d48a141 /src/tools/qstring.cpp | |
parent | f27c2533f735d53c6b555f387c6390c0690cc246 (diff) | |
download | tqt3-6dec101d43dcbd4195c47d54bd388db1a8d7230e.tar.gz tqt3-6dec101d43dcbd4195c47d54bd388db1a8d7230e.zip |
Automated update from Qt3
Diffstat (limited to 'src/tools/qstring.cpp')
-rw-r--r-- | src/tools/qstring.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp index bb521868c..86ba42469 100644 --- a/src/tools/qstring.cpp +++ b/src/tools/qstring.cpp @@ -642,7 +642,7 @@ const TQString &TQChar::decomposition() const pos+=2; TQString s; - Q_UINT16 c; + TQ_UINT16 c; while ( (c = TQUnicodeTables::decomposition_map[pos++]) != 0 ) s += TQChar( c ); // ### In 4.0, return s, and not shared_decomp. shared_decomp @@ -926,17 +926,17 @@ class TQLigature public: TQLigature( TQChar c ); - Q_UINT16 first() { cur = ligatures; return cur ? *cur : 0; } - Q_UINT16 next() { return cur && *cur ? *(cur++) : 0; } - Q_UINT16 current() { return cur ? *cur : 0; } + TQ_UINT16 first() { cur = ligatures; return cur ? *cur : 0; } + TQ_UINT16 next() { return cur && *cur ? *(cur++) : 0; } + TQ_UINT16 current() { return cur ? *cur : 0; } int match(TQString & str, unsigned int index); TQChar head(); TQChar::Decomposition tag(); private: - Q_UINT16 *ligatures; - Q_UINT16 *cur; + TQ_UINT16 *ligatures; + TQ_UINT16 *cur; }; TQLigature::TQLigature( TQChar c ) @@ -947,7 +947,7 @@ TQLigature::TQLigature( TQChar c ) else { pos = TQUnicodeTables::ligature_info[(pos<<8)+c.cell()]; - ligatures = (Q_UINT16 *)&(TQUnicodeTables::ligature_map[pos]); + ligatures = (TQ_UINT16 *)&(TQUnicodeTables::ligature_map[pos]); } cur = ligatures; } @@ -974,8 +974,8 @@ int TQLigature::match(TQString & str, unsigned int index) if(!current()) return 0; - Q_UINT16 lig = current() + 2; - Q_UINT16 ch; + TQ_UINT16 lig = current() + 2; + TQ_UINT16 ch; while ((i < str.length()) && (ch = TQUnicodeTables::decomposition_map[lig])) { if (str[(int)i] != TQChar(ch)) @@ -2076,7 +2076,7 @@ TQString TQString::arg( const TQString& a, int fieldWidth ) const */ TQString TQString::arg( long a, int fieldWidth, int base ) const { - return arg((Q_LLONG)a, fieldWidth, base); + return arg((TQ_LLONG)a, fieldWidth, base); } /*! @@ -2088,7 +2088,7 @@ TQString TQString::arg( long a, int fieldWidth, int base ) const */ TQString TQString::arg( ulong a, int fieldWidth, int base ) const { - return arg((Q_ULLONG)a, fieldWidth, base); + return arg((TQ_ULLONG)a, fieldWidth, base); } /*! @@ -2098,7 +2098,7 @@ TQString TQString::arg( ulong a, int fieldWidth, int base ) const be between 2 and 36. If \a base is 10, the '%L' syntax can be used to produce localized strings. */ -TQString TQString::arg( Q_LLONG a, int fieldWidth, int base ) const +TQString TQString::arg( TQ_LLONG a, int fieldWidth, int base ) const { ArgEscapeData d = findArgEscapes(*this); @@ -2128,7 +2128,7 @@ TQString TQString::arg( Q_LLONG a, int fieldWidth, int base ) const be between 2 and 36. If \a base is 10, the '%L' syntax can be used to produce localized strings. */ -TQString TQString::arg( Q_ULLONG a, int fieldWidth, int base ) const +TQString TQString::arg( TQ_ULLONG a, int fieldWidth, int base ) const { ArgEscapeData d = findArgEscapes(*this); @@ -2557,13 +2557,13 @@ TQString &TQString::sprintf( const char* cformat, ... ) switch (*c) { case 'd': case 'i': { - Q_LLONG i; + TQ_LLONG i; switch (length_mod) { case lm_none: i = va_arg(ap, int); break; case lm_hh: i = va_arg(ap, int); break; case lm_h: i = va_arg(ap, int); break; case lm_l: i = va_arg(ap, long int); break; - case lm_ll: i = va_arg(ap, Q_LLONG); break; + case lm_ll: i = va_arg(ap, TQ_LLONG); break; case lm_j: i = va_arg(ap, long int); break; case lm_z: i = va_arg(ap, size_t); break; case lm_t: i = va_arg(ap, int); break; @@ -2577,13 +2577,13 @@ TQString &TQString::sprintf( const char* cformat, ... ) case 'u': case 'x': case 'X': { - Q_ULLONG u; + TQ_ULLONG u; switch (length_mod) { case lm_none: u = va_arg(ap, unsigned int); break; case lm_hh: u = va_arg(ap, unsigned int); break; case lm_h: u = va_arg(ap, unsigned int); break; case lm_l: u = va_arg(ap, unsigned long int); break; - case lm_ll: u = va_arg(ap, Q_ULLONG); break; + case lm_ll: u = va_arg(ap, TQ_ULLONG); break; default: u = 0; break; } @@ -2656,11 +2656,11 @@ TQString &TQString::sprintf( const char* cformat, ... ) break; } case 'p': { - Q_ULLONG i; + TQ_ULLONG i; #ifdef Q_OS_WIN64 - i = (Q_ULLONG) va_arg(ap, void*); + i = (TQ_ULLONG) va_arg(ap, void*); #else - i = (Q_ULONG) va_arg(ap, void*); + i = (TQ_ULONG) va_arg(ap, void*); #endif #ifdef Q_OS_WIN32 @@ -2691,7 +2691,7 @@ TQString &TQString::sprintf( const char* cformat, ... ) break; } case lm_ll: { - Q_LLONG *n = va_arg(ap, Q_LLONG*); + TQ_LLONG *n = va_arg(ap, TQ_LLONG*); volatile uint tmp = result.length(); // egcs-2.91.66 gets internal *n = tmp; // compiler error without volatile break; @@ -4697,7 +4697,7 @@ int TQString::contains( const TQRegExp &rx ) const long TQString::toLong( bool *ok, int base ) const { - Q_LLONG v = toLongLong( ok, base ); + TQ_LLONG v = toLongLong( ok, base ); if ( v < LONG_MIN || v > LONG_MAX ) { if ( ok ) *ok = FALSE; @@ -4731,7 +4731,7 @@ long TQString::toLong( bool *ok, int base ) const \sa number() */ -Q_LLONG TQString::toLongLong( bool *ok, int base ) const +TQ_LLONG TQString::toLongLong( bool *ok, int base ) const { #if defined(QT_CHECK_RANGE) if ( base != 0 && (base < 2 || base > 36) ) { @@ -4742,7 +4742,7 @@ Q_LLONG TQString::toLongLong( bool *ok, int base ) const bool my_ok; TQLocale def_locale; - Q_LLONG result = def_locale.d->stringToLongLong(*this, base, &my_ok, TQLocalePrivate::FailOnGroupSeparators); + TQ_LLONG result = def_locale.d->stringToLongLong(*this, base, &my_ok, TQLocalePrivate::FailOnGroupSeparators); if (my_ok) { if (ok != 0) *ok = TRUE; @@ -4787,7 +4787,7 @@ Q_LLONG TQString::toLongLong( bool *ok, int base ) const ulong TQString::toULong( bool *ok, int base ) const { - Q_ULLONG v = toULongLong( ok, base ); + TQ_ULLONG v = toULongLong( ok, base ); if ( v > ULONG_MAX ) { if ( ok ) *ok = FALSE; @@ -4821,7 +4821,7 @@ ulong TQString::toULong( bool *ok, int base ) const \sa number() */ -Q_ULLONG TQString::toULongLong( bool *ok, int base ) const +TQ_ULLONG TQString::toULongLong( bool *ok, int base ) const { #if defined(QT_CHECK_RANGE) if ( base != 0 && (base < 2 || base > 36) ) { @@ -4832,7 +4832,7 @@ Q_ULLONG TQString::toULongLong( bool *ok, int base ) const bool my_ok; TQLocale def_locale; - Q_ULLONG result = def_locale.d->stringToUnsLongLong(*this, base, &my_ok, TQLocalePrivate::FailOnGroupSeparators); + TQ_ULLONG result = def_locale.d->stringToUnsLongLong(*this, base, &my_ok, TQLocalePrivate::FailOnGroupSeparators); if (my_ok) { if (ok != 0) *ok = TRUE; @@ -4879,7 +4879,7 @@ Q_ULLONG TQString::toULongLong( bool *ok, int base ) const short TQString::toShort( bool *ok, int base ) const { - Q_LLONG v = toLongLong( ok, base ); + TQ_LLONG v = toLongLong( ok, base ); if ( v < SHRT_MIN || v > SHRT_MAX ) { if ( ok ) *ok = FALSE; @@ -4916,7 +4916,7 @@ short TQString::toShort( bool *ok, int base ) const ushort TQString::toUShort( bool *ok, int base ) const { - Q_ULLONG v = toULongLong( ok, base ); + TQ_ULLONG v = toULongLong( ok, base ); if ( v > USHRT_MAX ) { if ( ok ) *ok = FALSE; @@ -4961,7 +4961,7 @@ ushort TQString::toUShort( bool *ok, int base ) const int TQString::toInt( bool *ok, int base ) const { - Q_LLONG v = toLongLong( ok, base ); + TQ_LLONG v = toLongLong( ok, base ); if ( v < INT_MIN || v > INT_MAX ) { if ( ok ) *ok = FALSE; @@ -4997,7 +4997,7 @@ int TQString::toInt( bool *ok, int base ) const uint TQString::toUInt( bool *ok, int base ) const { - Q_ULLONG v = toULongLong( ok, base ); + TQ_ULLONG v = toULongLong( ok, base ); if ( v > UINT_MAX ) { if ( ok ) *ok = FALSE; @@ -5149,7 +5149,7 @@ float TQString::toFloat( bool *ok ) const \endcode */ -TQString &TQString::setNum( Q_LLONG n, int base ) +TQString &TQString::setNum( TQ_LLONG n, int base ) { #if defined(QT_CHECK_RANGE) if ( base < 2 || base > 36 ) { @@ -5171,7 +5171,7 @@ TQString &TQString::setNum( Q_LLONG n, int base ) The base is 10 by default and must be between 2 and 36. */ -TQString &TQString::setNum( Q_ULLONG n, int base ) +TQString &TQString::setNum( TQ_ULLONG n, int base ) { #if defined(QT_CHECK_RANGE) if ( base < 2 || base > 36 ) { @@ -5192,7 +5192,7 @@ TQString &TQString::setNum( Q_ULLONG n, int base ) // ### 4.0: inline TQString &TQString::setNum( long n, int base ) { - return setNum( (Q_LLONG)n, base ); + return setNum( (TQ_LLONG)n, base ); } /*! @@ -5203,7 +5203,7 @@ TQString &TQString::setNum( long n, int base ) // ### 4.0: inline TQString &TQString::setNum( ulong n, int base ) { - return setNum( (Q_ULLONG)n, base ); + return setNum( (TQ_ULLONG)n, base ); } /*! @@ -5343,7 +5343,7 @@ TQString TQString::number( ulong n, int base ) \sa setNum() */ -TQString TQString::number( Q_LLONG n, int base ) +TQString TQString::number( TQ_LLONG n, int base ) { TQString s; s.setNum( n, base ); @@ -5355,7 +5355,7 @@ TQString TQString::number( Q_LLONG n, int base ) \sa setNum() */ -TQString TQString::number( Q_ULLONG n, int base ) +TQString TQString::number( TQ_ULLONG n, int base ) { TQString s; s.setNum( n, base ); @@ -6846,7 +6846,7 @@ TQDataStream &operator<<( TQDataStream &s, const TQString &str ) delete [] b; } else { // write null marker - s << (Q_UINT32)0xffffffff; + s << (TQ_UINT32)0xffffffff; } } return s; @@ -6873,7 +6873,7 @@ TQDataStream &operator>>( TQDataStream &s, TQString &str ) str = TQString( l ); } else { - Q_UINT32 bytes = 0; + TQ_UINT32 bytes = 0; s >> bytes; // read size of string if ( bytes == 0xffffffff ) { // null string str = TQString::null; |