From 17d780ad457fb9cbfc92bf6114bfcf4cc4ac5a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Tue, 28 Feb 2017 08:54:56 +0100 Subject: QTimer: Avoid implicit conversion warnings This fixes compiling an application using QTimer and -Wshorten-64-to-32 on a 64-bit system without getting this warning: ... 5.8/clang_64/lib/QtCore.framework/Headers/qtimer.h:171:21: warning: implicit conversion loses integer precision: 'rep' (aka 'long long') to 'int' [-Wshorten-64-to-32] setInterval(value.count()); ~~~~~~~~~~~ ^~~~~~~~~~~~~ Change-Id: I3e0407a7193c841308f7271c41a8dd5a2eb2a534 Reviewed-by: Marc Mutz --- src/corelib/kernel/qtimer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/kernel/qtimer.h') diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index 96c7efd8f5..9303f82544 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -168,7 +168,7 @@ public: Q_ALWAYS_INLINE void setInterval(std::chrono::milliseconds value) { - setInterval(value.count()); + setInterval(int(value.count())); } Q_ALWAYS_INLINE -- cgit v1.2.3