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:29 +0100
commit4223d739e95e19595f62238006a7549be19068f0 (patch)
treef20ab899d62d404a2c9e87e96086fbbd7970e5e1
parent1bda8d37ecae1c41004b013600a4e8309a23136d (diff)
downloadqt3-v3.5.13-sru.tar.gz
qt3-v3.5.13-sru.zip
Use empty d->cString for TQString::shared_null instead of null string.v3.5.13-sru
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 e99bbda7347d35833da0876bc745d5e0b6c18c2b)
-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 483efb9..795953a 100644
--- a/src/tools/qstring.cpp
+++ b/src/tools/qstring.cpp
@@ -5725,7 +5725,7 @@ const char* QString::ascii() const
QCString QString::utf8() const
{
if (!d->cString) {
- d->cString = new QCString;
+ d->cString = new QCString("");
}
if(d == shared_null)
{
@@ -5974,7 +5974,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)
{