From aec367ef2804c74f4ef5d5d647c43b7e65e12f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 22 Mar 2022 13:26:31 +0100 Subject: [PATCH] Use empty d->cString for TQString::shared_null instead of null string. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This restores consistency for the behavior of methods TQString::utf8() and TQString::local8Bit() with null TQStrings. Signed-off-by: Slávek Banko --- src/tools/qstring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp index 59f8e142..27bdf31d 100644 --- a/src/tools/qstring.cpp +++ b/src/tools/qstring.cpp @@ -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) {