diff options
Diffstat (limited to 'src/corelib/tools/qlocale.cpp')
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 136bafa..4a66b92 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -637,7 +637,8 @@ static QString winSystemPMText() } /*! - Returns the fallback locale obtained from the system. + \since 4.6 + Returns the fallback locale obtained from the system. */ QLocale QSystemLocale::fallbackLocale() const { @@ -1156,7 +1157,7 @@ static void getMacPreferredLanguageAndCountry(QString *language, QString *countr kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - if (CFArrayGetCount(languages) > 0) { + if (languages && CFArrayGetCount(languages) > 0) { QCFType<CFLocaleRef> locale = CFLocaleCreate(kCFAllocatorDefault, CFStringRef(CFArrayGetValueAtIndex(languages, 0))); if (language) @@ -1283,6 +1284,8 @@ QVariant QSystemLocale::query(QueryType type, QVariant /* in */) const #elif !defined(Q_OS_SYMBIAN) /*! + \since 4.6 + Returns a fallback locale, that will get used for everything that is not explicitly overridden by the system locale. */ |