path: root/examples/qtconcurrent
diff options
authorMarc Mutz <>2017-02-21 09:10:47 +0100
committerMarc Mutz <>2017-04-20 18:09:10 +0000
commit7291a244161ddf77308413b5abad9def68e4415a (patch)
tree62ad7cac3e07ab7273a4180a0ecb227fa01baf74 /examples/qtconcurrent
parenteec388865f20dda209e1805f55f4185e8ab07546 (diff)
QErrorMessage: use QStringBuilder
Extract Method msgType2i18nString() and use it to build 'rich' in a single QStringBuilder expression. Replace the switch over QtMsgType with an array of QT_TRANSLATE_NOOP'ed strings. That introduces a dependency on the order and amount of enum values, so add static and dynamic asserts to catch any change. Saves memory allocations, as well as nearly 300B in text size on GCC 7 optimized Linux AMD64 builds. Change-Id: I48cc916cba283e482a90ca4ae28aa17b26a4e5ab Reviewed-by: David Faure <>
Diffstat (limited to 'examples/qtconcurrent')
0 files changed, 0 insertions, 0 deletions