summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtimezoneprivate_win.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_win.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_win.cpp')
-rw-r--r--src/corelib/tools/qtimezoneprivate_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qtimezoneprivate_win.cpp b/src/corelib/tools/qtimezoneprivate_win.cpp
index 4febeda537..16dfaefb74 100644
--- a/src/corelib/tools/qtimezoneprivate_win.cpp
+++ b/src/corelib/tools/qtimezoneprivate_win.cpp
@@ -415,7 +415,7 @@ QWinTimeZonePrivate::~QWinTimeZonePrivate()
{
}
-QTimeZonePrivate *QWinTimeZonePrivate::clone()
+QWinTimeZonePrivate *QWinTimeZonePrivate::clone() const
{
return new QWinTimeZonePrivate(*this);
}