From 6128f4efb42dec892ce057d92832adc820114c60 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 13 Nov 2013 12:07:08 +0100 Subject: QTimeZone: mark ctors as explicit An int is not a proper representation for a QTimeZone, so don't provide an implicit conversion from it. OTOH, {QByteArray, int, QString, QString} _does_ nicely represent a QTimeZone, so explicitly state the implicitness of that constructor so {}-init continues to work in C++11. Change-Id: I865a6b38b8ab3c577625b7b08efbfc98914abfbe Reviewed-by: John Layt Reviewed-by: Lars Knoll --- src/corelib/tools/qtimezone.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/corelib/tools/qtimezone.h b/src/corelib/tools/qtimezone.h index 3f0d1ee9e7..cbc4f3e4ad 100644 --- a/src/corelib/tools/qtimezone.h +++ b/src/corelib/tools/qtimezone.h @@ -78,8 +78,8 @@ public: QTimeZone(); explicit QTimeZone(const QByteArray &olsenId); - QTimeZone(int offsetSeconds); - QTimeZone(const QByteArray &zoneId, int offsetSeconds, const QString &name, + explicit QTimeZone(int offsetSeconds); + /*implicit*/ QTimeZone(const QByteArray &zoneId, int offsetSeconds, const QString &name, const QString &abbreviation, QLocale::Country country = QLocale::AnyCountry, const QString &comment = QString()); QTimeZone(const QTimeZone &other); -- cgit v1.2.3