summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-12-08 07:09:26 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-12-08 07:09:47 +0100
commit3ec31ef9c5acd57a4a59c0d5f5e20b8d9a19bfa1 (patch)
tree8b55dd13dbc2a33fe7c857f622e10b817386bdb3 /src/corelib/tools
parent6f87f2d23fb50d8183ea173fe423b7e1a24c0e2e (diff)
parent4ad8798de428b44fe4c56e1ca111940068056c57 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qbytearray.cpp4
-rw-r--r--src/corelib/tools/qtimezoneprivate_tz.cpp7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 319af3ca03..b972be68a3 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -2930,9 +2930,9 @@ QByteArray QByteArray::toUpper_helper(QByteArray &a)
/*! \fn void QByteArray::clear()
- Clears the contents of the byte array and makes it empty.
+ Clears the contents of the byte array and makes it null.
- \sa resize(), isEmpty()
+ \sa resize(), isNull()
*/
void QByteArray::clear()
diff --git a/src/corelib/tools/qtimezoneprivate_tz.cpp b/src/corelib/tools/qtimezoneprivate_tz.cpp
index 90ce8e3b68..85ed345869 100644
--- a/src/corelib/tools/qtimezoneprivate_tz.cpp
+++ b/src/corelib/tools/qtimezoneprivate_tz.cpp
@@ -918,6 +918,13 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
if (!ianaId.isEmpty() && ianaId.at(0) == ':')
ianaId = ianaId.mid(1);
+ // The TZ value can be ":/etc/localtime" which libc considers
+ // to be a "default timezone", in which case it will be read
+ // by one of the blocks below, so unset it here so it is not
+ // considered as a valid/found ianaId
+ if (ianaId == "/etc/localtime")
+ ianaId.clear();
+
// On Debian Etch and later /etc/localtime is real file with name held in /etc/timezone
if (ianaId.isEmpty()) {
QFile tzif(QStringLiteral("/etc/timezone"));