diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-05-26 11:11:08 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-05-26 13:11:41 +0000 |
commit | 9980ba5ba58b30933e951bd8c4f9807c42b978fd (patch) | |
tree | b37079ec1d63dd28127b398c1216d2b9a80fc84b /src/xml/doc/snippets | |
parent | a989c9839371782a671112c360a0820834aba641 (diff) |
Don't change the implementation of a method depending on QT_USE_QSTRINGUILDER
This is rather evil and caused crashes in static builds, when library
and application where compiler with different settings of the
QT_USE_QSTRINGBUILDER flag.
The reason is that the implementation of QStringDecoder::operator() was
different (and returning different data) with or without the setting.
The compiler would thus create two very different versions of this method
in different .o files. When linking the app, one of the implementations
would be chosen, leading to crashes in places where the other one was
expected.
Fix this by only providing the QStringBuilder enabled version of the
methods. They return a temporary object that's converatable to a
QString/QByteArray anyway. Make sure that qdoc shows a simple signature.
As a drive by fix a compile error in a code path that didn't get hit
so far.
Change-Id: I312fa564d0bc6b464f2b4466de1d53841f7b7b0f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/xml/doc/snippets')
0 files changed, 0 insertions, 0 deletions