Make QCoreApplicationPrivate::appName() thread-safe

Change-Id: Iea0d208e3e4721fff8a6667e0df1203a887c29d3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Tor Arne Vestbø 2013-09-26 13:20:27 +02:00 committed by The Qt Project
parent 9bd350d03d
commit 696060134d

View File

@ -146,6 +146,9 @@ QString QCoreApplicationPrivate::macMenuBarName()
#endif
QString QCoreApplicationPrivate::appName() const
{
static QBasicMutex applicationNameMutex;
QMutexLocker locker(&applicationNameMutex);
if (applicationName.isNull()) {
#ifdef Q_OS_MAC
applicationName = macMenuBarName();