diff options
Diffstat (limited to 'src/tools/ntqstring.h')
-rw-r--r-- | src/tools/ntqstring.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/tools/ntqstring.h b/src/tools/ntqstring.h index 29704e719..b91caf83c 100644 --- a/src/tools/ntqstring.h +++ b/src/tools/ntqstring.h @@ -360,11 +360,10 @@ inline bool operator>( TQChar c1, TQChar c2 ) { return !(c2>=c1); } // internal struct Q_EXPORT TQStringData : public TQShared { TQStringData() : - TQShared(), unicode(0), ascii(0), len(0), issimpletext(TRUE), maxl(0), islatin1(FALSE) { ref(); } + TQShared(), unicode(0), ascii(0), len(0), issimpletext(TRUE), maxl(0), islatin1(FALSE), security_unpaged(FALSE) { ref(); } TQStringData(TQChar *u, uint l, uint m) : - TQShared(), unicode(u), ascii(0), len(l), issimpletext(FALSE), maxl(m), islatin1(FALSE) { } - ~TQStringData() { if ( unicode ) delete[] ((char*)unicode); - if ( ascii ) delete[] ascii; } + TQShared(), unicode(u), ascii(0), len(l), issimpletext(FALSE), maxl(m), islatin1(FALSE), security_unpaged(FALSE) { } + ~TQStringData(); void deleteSelf(); TQChar *unicode; @@ -389,6 +388,8 @@ struct Q_EXPORT TQStringData : public TQShared { #endif uint islatin1 : 1; + bool security_unpaged : 1; + private: #if defined(TQ_DISABLE_COPY) TQStringData( const TQStringData& ); @@ -750,7 +751,12 @@ private: // needed for TQDeepCopy void detach(); + + void setSecurityUnPaged(bool lock); + static char* unicodeToLatin1( const TQChar*, uint len, bool unpaged ); + friend class TQDeepCopy<TQString>; + friend class TQLineEdit; }; class Q_EXPORT TQCharRef { |