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>
(cherry picked from commit aec367ef28)
r14.0.x
Slávek Banko 2 years ago
parent f837b16e36
commit ceae2cc92e
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -5992,7 +5992,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)
{
@ -6246,7 +6246,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