summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtimezoneprivate_mac.mm
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_mac.mm
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_mac.mm')
-rw-r--r--src/corelib/tools/qtimezoneprivate_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qtimezoneprivate_mac.mm b/src/corelib/tools/qtimezoneprivate_mac.mm
index 0c2dbe6fef..4e9a432fbf 100644
--- a/src/corelib/tools/qtimezoneprivate_mac.mm
+++ b/src/corelib/tools/qtimezoneprivate_mac.mm
@@ -82,7 +82,7 @@ QMacTimeZonePrivate::~QMacTimeZonePrivate()
[m_nstz release];
}
-QTimeZonePrivate *QMacTimeZonePrivate::clone()
+QMacTimeZonePrivate *QMacTimeZonePrivate::clone() const
{
return new QMacTimeZonePrivate(*this);
}