forked from qt-creator/qt-creator
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: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
committed by
Eike Ziller
parent
647071d84b
commit
457c289100
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user