Make QCoreApplicationPrivate::appName() thread-safe
Change-Id: Iea0d208e3e4721fff8a6667e0df1203a887c29d3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
9bd350d03d
commit
696060134d
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user