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:36:20 +0100
commitceae2cc92e7d7d1ff177950f2b0e2530fef8c752 (patch)
treef240a067bd0b1c36476b8f7315a10fb4ee1664f5
parentf837b16e3643b563353b00180153ff906de5de11 (diff)
downloadtqt3-ceae2cc92e7d7d1ff177950f2b0e2530fef8c752.tar.gz
tqt3-ceae2cc92e7d7d1ff177950f2b0e2530fef8c752.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> (cherry picked from commit aec367ef2804c74f4ef5d5d647c43b7e65e12f67)
-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 25ec4204..1147fd82 100644
--- a/src/tools/qstring.cpp
+++ b/src/tools/qstring.cpp
@@ -5992,7 +5992,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)
{
@@ -6246,7 +6246,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)
{