Commit 457c2891 authored by Aleksey Sidorov's avatar Aleksey Sidorov Committed by Eike Ziller
Browse files

Fix possibly memory corruption



text.toUtf8() create a temporary QByteArray object, which is then destroyed and
const char *utfString may be corrupted.

Change-Id: Icd6584675c0c6e25423d25129d3b6fc8b055ebf0
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 647071d8
......@@ -128,8 +128,7 @@ static ApplicationProgressView *sharedProgressView = nil;
void Core::Internal::ProgressManagerPrivate::setApplicationLabel(const QString &text)
{
const char *utf8String = text.toUtf8().constData();
NSString *cocoaString = [[NSString alloc] initWithUTF8String:utf8String];
NSString *cocoaString = [[NSString alloc] initWithUTF8String:text.toUtf8().constData()];
[[NSApp dockTile] setBadgeLabel:cocoaString];
[cocoaString release];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment