summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringbuilder.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago@kde.org>2011-07-07 19:51:09 +0200
committerQt by Nokia <qt-info@nokia.com>2011-07-08 11:22:30 +0200
commit571785b31d21715857228b00f96cd24601b28c8c (patch)
treeb5cbc9b7faf988c4d1ea7f3f29027d4abbb34174 /src/corelib/tools/qstringbuilder.h
parentf3d6589068450283e9f147851113d1795b47acc6 (diff)
Make the new QStringLiteral produce a non-temporary
This is currently GCC-only code (the __extension ({ }) stuff), but it was the only way I found to create a static variable and return it. I had to add the QConstStringDataPtr container because I had to return a pointer to the data -- it's impossible to return a reference through this extension. I could have returned a naked pointer directly too. This isn't complete. GCC 4.6 is placing the string in the .data section, not .rodata as we wanted. Investigating further. Change-Id: I170030dca3eddbd69f6c879e952f652f7fe5d958 Reviewed-on: http://codereview.qt.nokia.com/1350 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/tools/qstringbuilder.h')
0 files changed, 0 insertions, 0 deletions