diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-03-24 16:17:17 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-03-24 16:17:17 (GMT) |
commit | 116fed06f9ed561befb505d94b6b44dc71bf9e45 (patch) | |
tree | 1c758431a36e350b13509beb50d1cac336a702c6 /src/corelib/tools/qlocale_unix.cpp | |
parent | 7e50de65d564d69d28a73fee3c65dd0a92bf3f53 (diff) | |
download | Qt-116fed06f9ed561befb505d94b6b44dc71bf9e45.zip Qt-116fed06f9ed561befb505d94b6b44dc71bf9e45.tar.gz Qt-116fed06f9ed561befb505d94b6b44dc71bf9e45.tar.bz2 |
Use QByteArray::isEmpty instead of isNull in QLocale
When checking whether the environment variable is set or not, check for
its length by using isEmpty as the envvar can be set to an empty string.
Task-number: QTBUG-15321
Reviewed-by: Zeno Albisser
Diffstat (limited to 'src/corelib/tools/qlocale_unix.cpp')
-rw-r--r-- | src/corelib/tools/qlocale_unix.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qlocale_unix.cpp b/src/corelib/tools/qlocale_unix.cpp index 21097bf..40a52ba 100644 --- a/src/corelib/tools/qlocale_unix.cpp +++ b/src/corelib/tools/qlocale_unix.cpp @@ -94,9 +94,9 @@ Q_GLOBAL_STATIC(QSystemLocaleData, qSystemLocaleData) QLocale QSystemLocale::fallbackLocale() const { QByteArray lang = qgetenv("LC_ALL"); - if (lang.isNull()) + if (lang.isEmpty()) lang = qgetenv("LC_NUMERIC"); - if (lang.isNull()) + if (lang.isEmpty()) lang = qgetenv("LANG"); return QLocale(QLatin1String(lang)); } |