-
-
Save keefo/085ebca6d1788ebdb9f98d92b3b10bfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/src/corelib/kernel/qcoreapplication.cpp w/src/corelib/kernel/qcoreapplication.cpp | |
index 553eaf0..247d2ad 100644 | |
--- i/src/corelib/kernel/qcoreapplication.cpp | |
+++ w/src/corelib/kernel/qcoreapplication.cpp | |
@@ -144,8 +144,13 @@ QString QCoreApplicationPrivate::macMenuBarName() | |
return bundleName; | |
} | |
#endif | |
+ | |
+static QBasicMutex appNameMutex; | |
+ | |
QString QCoreApplicationPrivate::appName() const | |
{ | |
+ QMutexLocker locker(&appNameMutex); | |
+ | |
if (applicationName.isNull()) { | |
#ifdef Q_OS_MAC | |
applicationName = macMenuBarName(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/src/corelib/kernel/qcoreapplication.cpp w/src/corelib/kernel/qcoreapplication.cpp | |
index 553eaf0..52416ae 100644 | |
--- i/src/corelib/kernel/qcoreapplication.cpp | |
+++ w/src/corelib/kernel/qcoreapplication.cpp | |
@@ -146,6 +146,9 @@ QString QCoreApplicationPrivate::macMenuBarName() | |
#endif | |
QString QCoreApplicationPrivate::appName() const | |
{ | |
+ static QBasicMutex appNameMutex; | |
+ QMutexLocker locker(&appNameMutex); | |
+ | |
if (applicationName.isNull()) { | |
#ifdef Q_OS_MAC | |
applicationName = macMenuBarName(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment