diff options
| author | Marc Mutz <marc.mutz@kdab.com> | 2012-08-03 09:32:05 +0200 |
|---|---|---|
| committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-23 02:55:17 +0200 |
| commit | 6d56a216217045706121dc64ce9b3b25ec441b83 (patch) | |
| tree | 65bd9528ef8fc5bb275d0f412c365c9b0188506f /src/corelib/kernel/qtimer.cpp | |
| parent | a3e563c0913e5bc1607ea7f60187591ec7eabe50 (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 'src/corelib/kernel/qtimer.cpp')
0 files changed, 0 insertions, 0 deletions
