diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-03-13 21:27:19 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-03-13 21:38:06 +0900 |
| commit | a69ae19e8bd15c028ceeeb9525622d2826697763 (patch) | |
| tree | 6a950ad85d7c60c27d401c79514cc3ce5639d062 /src | |
| parent | 3ad431df9af959fd9add5e4d16d3f4d46132cfb7 (diff) | |
| download | tqt-a69ae19e8bd15c028ceeeb9525622d2826697763.tar.gz tqt-a69ae19e8bd15c028ceeeb9525622d2826697763.zip | |
Remove 'grp' from TQChar since now surrogate pairs are correctly supported
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/tqchar.h | 41 | ||||
| -rw-r--r-- | src/tools/tqstring.cpp | 5 |
2 files changed, 9 insertions, 37 deletions
diff --git a/src/tools/tqchar.h b/src/tools/tqchar.h index fdf111079..7f98e155c 100644 --- a/src/tools/tqchar.h +++ b/src/tools/tqchar.h @@ -231,65 +231,42 @@ public: #endif private: ushort ucs; -#if defined(QT_QSTRING_UCS_4) - ushort grp; -#endif } TQ_PACKED; inline TQChar::TQChar() : ucs( 0 ) -#ifdef QT_QSTRING_UCS_4 - , grp( 0 ) -#endif { } + inline TQChar::TQChar( char c ) : ucs( (uchar)c ) -#ifdef QT_QSTRING_UCS_4 - , grp( 0 ) -#endif { } + inline TQChar::TQChar( uchar c ) : ucs( c ) -#ifdef QT_QSTRING_UCS_4 - , grp( 0 ) -#endif { } + inline TQChar::TQChar( uchar c, uchar r ) : ucs( (r << 8) | c ) -#ifdef QT_QSTRING_UCS_4 - , grp( 0 ) -#endif { } + inline TQChar::TQChar( const TQChar& c ) : ucs( c.ucs ) -#ifdef QT_QSTRING_UCS_4 - , grp( c.grp ) -#endif { } inline TQChar::TQChar( ushort rc ) : ucs( rc ) -#ifdef QT_QSTRING_UCS_4 - , grp( 0 ) -#endif { } + inline TQChar::TQChar( short rc ) : ucs( (ushort) rc ) -#ifdef QT_QSTRING_UCS_4 - , grp( 0 ) -#endif { } -inline TQChar::TQChar( uint rc ) : ucs( (ushort ) (rc & 0xffff) ) -#ifdef QT_QSTRING_UCS_4 - , grp( (ushort) ((rc >> 16) & 0xffff) ) -#endif + +inline TQChar::TQChar( uint rc ) : ucs( (ushort) ( rc ) { } -inline TQChar::TQChar( int rc ) : ucs( (ushort) (rc & 0xffff) ) -#ifdef QT_QSTRING_UCS_4 - , grp( (ushort) ((rc >> 16) & 0xffff) ) -#endif + +inline TQChar::TQChar( int rc ) : ucs( (ushort) ( rc ) ) { } diff --git a/src/tools/tqstring.cpp b/src/tools/tqstring.cpp index ae95bcaf0..cec2ca61a 100644 --- a/src/tools/tqstring.cpp +++ b/src/tools/tqstring.cpp @@ -6421,11 +6421,6 @@ TQDataStream &operator<<( TQDataStream &s, const TQString &str ) TQDataStream &operator>>( TQDataStream &s, TQString &str ) { -#ifdef QT_QSTRING_UCS_4 -#if defined(Q_CC_GNU) -#warning "operator>> not working properly" -#endif -#endif if ( s.version() == 1 ) { TQCString l; s >> l; |
