diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2013-10-02 15:21:10 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-03 17:48:34 +0200 |
commit | df0347a9ed8be8e1d3d771c3d2abcfebec9ed87d (patch) | |
tree | 34eaf25df393679ecf55a3ee276f978d3ea50eee /src/quick | |
parent | a65ad5e919209f7b934e84516d732eaf2edd227f (diff) |
Don't print garbage or crash when using console.log
The problem was that the ctor of QMessageLogger did not make a deep
copy of the source or the function. Since the QByteArray returned from
toUtf8() was only guaranteed to live within the statement it was used,
the pointers that QMessageLogger held would point to released memory as
soon as the QByteArray got destructed.
This could only be reproduced if the logging framework tried to print
the source file or the source function.
In my case, I had set this environment variable to provoke this:
$env:QT_MESSAGE_PATTERN="%{file}(%{line}):%{message}"
Change-Id: I4ea4cf309c6c6420cef5bab0108a6cb2b2f9e841
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/quick')
0 files changed, 0 insertions, 0 deletions