summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-08-03 09:32:05 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-23 02:55:17 +0200
commit6d56a216217045706121dc64ce9b3b25ec441b83 (patch)
tree65bd9528ef8fc5bb275d0f412c365c9b0188506f /tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp
parenta3e563c0913e5bc1607ea7f60187591ec7eabe50 (diff)
Logging: make qEmergencyOut() not allocate from the heap
Commit 6e6b74c0 introduced heap allocation in the form of QString::fromLatin1().utf16() into qEmergencyOut(), a function that's called in OOM situations and in cases where another exception is still in flight. Luckily, QString::fromLatin1().utf16() is just a funny way of copying an array of chars into an array of wchar_ts, so we do that manually now and use a static wchar_t buffer. While at it, also throw text elision into the mix. This commit also fixes the message passed to _CrtDbgReportW(). What should be displayed is the emergency_buf, not the format string. Also remove a similar allocation in qt_message_output(). Change-Id: I2c44a298fc0927bb992de4977a7e4a7b47b16b26 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp')
0 files changed, 0 insertions, 0 deletions