diff --git a/src/plugins/coreplugin/progressmanager/progressmanager_mac.mm b/src/plugins/coreplugin/progressmanager/progressmanager_mac.mm index ba0ac9cf2d2..880e2c53980 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager_mac.mm +++ b/src/plugins/coreplugin/progressmanager/progressmanager_mac.mm @@ -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]; }