From 4d92712a2c92c019c37238f808ae7a1900f45b97 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 22 Feb 2017 20:26:48 +0100 Subject: 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 --- src/corelib/tools/qtimezoneprivate_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools/qtimezoneprivate_win.cpp') 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); } -- cgit v1.2.3