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