summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-03-22 13:26:31 +0100
committerSlávek Banko <slavek.banko@axis.cz>2022-03-22 13:38:02 +0100
commite99bbda7347d35833da0876bc745d5e0b6c18c2b (patch)
tree8f523c225ec32a7e6ed3854ba66fb810731e5a53
parent93058fb0a38cbab73683463cfa571fd622baa980 (diff)
downloadqt3-e99bbda7347d35833da0876bc745d5e0b6c18c2b.tar.gz
qt3-e99bbda7347d35833da0876bc745d5e0b6c18c2b.zip
Use empty d->cString for TQString::shared_null instead of null string.HEADmaster
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>
-rw-r--r--src/tools/qstring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp
index 3986ecf..f9f3faa 100644
--- a/src/tools/qstring.cpp
+++ b/src/tools/qstring.cpp
@@ -6000,7 +6000,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)
{
@@ -6254,7 +6254,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)
{