summaryrefslogtreecommitdiffstats
path: root/src
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:28:01 +0100
commitaec367ef2804c74f4ef5d5d647c43b7e65e12f67 (patch)
treec963c11d4a6cf0927412793b2c16b0a79a2800bf /src
parente919ffc1ec291cc393e48ea0b9b2580a7a4f954a (diff)
downloadtqt3-aec367ef2804c74f4ef5d5d647c43b7e65e12f67.tar.gz
tqt3-aec367ef2804c74f4ef5d5d647c43b7e65e12f67.zip
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>
Diffstat (limited to 'src')
-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 59f8e1423..27bdf31d8 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)
{