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>
master
Slávek Banko 2 years ago
parent 93058fb0a3
commit e99bbda734
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

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

Loading…
Cancel
Save