summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtimezoneprivate_icu.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-02-22 20:26:48 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-02-23 05:45:53 +0000
commit4d92712a2c92c019c37238f808ae7a1900f45b97 (patch)
tree3b29315791a7912097f4d88cb651c18ae2bdf4c1 /src/corelib/tools/qtimezoneprivate_icu.cpp
parent4cd002402fe12f5e50d8267d0e9c39e525b99c2d (diff)
QTimeZonePrivate: make clone() const, use covariant return types
There's nothing wrong with cloning a const QTimeZonePrivate, so make clone() const. Also, if you're cloning a QTzTimeZonePrivate, you already know that you get a QTzTimeZonePrivate back. C++ supports covariant return types for this reason, so use them. Change-Id: I60e19e89b1b7bad080c552f1baca314ab0a6295e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qtimezoneprivate_icu.cpp')
-rw-r--r--src/corelib/tools/qtimezoneprivate_icu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qtimezoneprivate_icu.cpp b/src/corelib/tools/qtimezoneprivate_icu.cpp
index c088fe7694..887486f567 100644
--- a/src/corelib/tools/qtimezoneprivate_icu.cpp
+++ b/src/corelib/tools/qtimezoneprivate_icu.cpp
@@ -305,7 +305,7 @@ QIcuTimeZonePrivate::~QIcuTimeZonePrivate()
ucal_close(m_ucal);
}
-QTimeZonePrivate *QIcuTimeZonePrivate::clone()
+QIcuTimeZonePrivate *QIcuTimeZonePrivate::clone() const
{
return new QIcuTimeZonePrivate(*this);
}