Use empty d->cString for TQString::shared_null instead of null string.

This restores consistency for the behavior of methods TQString::utf8()
and TQString::local8Bit() with null TQStrings.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/66/head
Slávek Banko 3 years ago
parent e919ffc1ec
commit aec367ef28
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -6000,7 +6000,7 @@ void TQString::setSecurityUnPaged(bool lock) {
TQCString TQString::utf8() const
{
if (!d->cString) {
d->cString = new TQCString;
d->cString = new TQCString("");
}
if(d == shared_null)
{
@ -6254,7 +6254,7 @@ TQString TQString::fromLatin1( const char* chars, int len )
TQCString TQString::local8Bit() const
{
if (!d->cString) {
d->cString = new TQCString;
d->cString = new TQCString("");
}
if(d == shared_null)
{

Loading…
Cancel
Save