diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2022-03-22 13:26:31 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2022-03-22 13:38:20 +0100 |
commit | 55f03c5eff9e9c3171c7b954c42e5ae614160428 (patch) | |
tree | 7758910b79911a7797337b266e6192437007134c | |
parent | 65f3815ede3eb3db71312b5cf4ca32fa58c90c66 (diff) | |
download | qt3-r14.0.x.tar.gz qt3-r14.0.x.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)
-rw-r--r-- | src/tools/qstring.cpp | 4 |
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) { |