diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2017-02-28 08:54:56 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2017-02-28 09:56:13 +0000 |
commit | 17d780ad457fb9cbfc92bf6114bfcf4cc4ac5a7f (patch) | |
tree | 31389993f3b6294da327761a56c420f766ffe5c5 | |
parent | 657bea873b9bf66764848d612b4188039ec7e583 (diff) |
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 <marc.mutz@kdab.com>
-rw-r--r-- | src/corelib/kernel/qtimer.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 |