summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringbuilder.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-07-06 09:21:10 +0200
committerQt by Nokia <qt-info@nokia.com>2011-07-07 12:30:00 +0200
commitee85e9cc10bc6874c892b09fa54b5dbd79854069 (patch)
treeabc628be1f6a35ce12bda3d5f7ca7297dfb4d65c /src/corelib/tools/qstringbuilder.h
parentfcca106e590ba550c536a6b8de1b011ccc2c0d30 (diff)
Support for compile time generated QStrings
use with QString string(QStringLiteral("foo")) or QString string(qs("foo")). qs(...) can in almost all places replace QLatin1String. the Macro qs requires c++0x support or a compiler where sizeof(wchar_t) == 2. In case these conditions are not met, qs simply falls back to QLatin1String. The commit also cleans up the QStringData structure significantly, now using only 16 bytes for the header on 32 bit systems. The bitflags to store unicode directionality of the string and whether the string would require complex text processing to render are removed. They don't really belong here and the result can be calculated very fast in any case. Added an internal QRefCount class the encapsulates the reference counting semantics required where a negative refcount is never changed. This is required to be able to put the string data into a constant POD object. Change-Id: I5b1395213deca48b2d582a036a0e8a8358d26d14 Reviewed-on: http://codereview.qt.nokia.com/1218 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/tools/qstringbuilder.h')
0 files changed, 0 insertions, 0 deletions