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:38:20 +0100
commit55f03c5eff9e9c3171c7b954c42e5ae614160428 (patch)
tree7758910b79911a7797337b266e6192437007134c /src
parent65f3815ede3eb3db71312b5cf4ca32fa58c90c66 (diff)
downloadqt3-55f03c5eff9e9c3171c7b954c42e5ae614160428.tar.gz
qt3-55f03c5eff9e9c3171c7b954c42e5ae614160428.zip
Use empty d->cString for TQString::shared_null instead of null string.r14.0.x
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)
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 c182447..413ada8 100644
--- a/src/tools/qstring.cpp
+++ b/src/tools/qstring.cpp
@@ -5992,7 +5992,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)
{
@@ -6246,7 +6246,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)
{