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 e99bbda734)
r14.0.x
Slávek Banko 3 years ago
parent 65f3815ede
commit 55f03c5eff
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

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

Loading…
Cancel
Save