summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qexceptionhandling.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-12-19 10:36:04 +0100
committerMarc Mutz <marc.mutz@qt.io>2024-12-26 08:07:20 +0000
commitd9264ee65d6f24e1008b08494b1472a54ac01940 (patch)
tree7a9171fb7eb3e1a4ce7204f9f373b6849b12643c /src/corelib/global/qexceptionhandling.cpp
parent1a9f8cc0df33195df959cee2e355dde4cbacd754 (diff)
QTest::toString(QCbor-type): port from const char* to unique_ptr<char[]>
This is more robust and lessens the impedance mismatch as seen by the old code using std::unique_ptr<char[]>(expr).get(). The new code isn't impedance-mismatch-free, either (UP{qstrdup(qba.data())}), but short of writing a small string class whose internal buffer can be release()ed to comply with the archaic QTest::toString() new[]'ed const char* return value, there's not much we can do about it atm. Also separate the internal from the "public" stuff in QCborValueFormatter by adding private: and public: sections. Pick-to: 6.9 6.8 Change-Id: I09a2ad1a75bb9eab3d01f2b5b60afc2d762da384 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qexceptionhandling.cpp')
0 files changed, 0 insertions, 0 deletions