diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-09-28 14:19:59 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-09-29 20:11:06 +0000 |
commit | bd4506fe5be0616c1d1f4cac94bb7399dc2072c2 (patch) | |
tree | 7e9e5c61170604d5c9c98ce7dc654fa582fc341b /src/corelib/kernel/qtimer.h | |
parent | 7d6c168a737f23003c85d917b972c3c8179bf349 (diff) |
Remove Q_ALWAYS_INLINE from frequently-used functions
MSVC is too stupid for them. Not only will it not inline those functions
if they are in a __declspec(dllimport) class, it will also print an
annoying Level 4 warning:
function 'function' marked as __forceinline not inlined
Task-number: QTBUG-57811
Task-number: QTBUG-55042
Change-Id: I0b48fc8e90304e0dacc3fffd14e8a346d18a9e0c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/corelib/kernel/qtimer.h')
-rw-r--r-- | src/corelib/kernel/qtimer.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index 7db5fc759b..44ae04f38d 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -165,37 +165,31 @@ Q_SIGNALS: public: #if QT_HAS_INCLUDE(<chrono>) || defined(Q_QDOC) - Q_ALWAYS_INLINE void setInterval(std::chrono::milliseconds value) { setInterval(int(value.count())); } - Q_ALWAYS_INLINE std::chrono::milliseconds intervalAsDuration() const { return std::chrono::milliseconds(interval()); } - Q_ALWAYS_INLINE std::chrono::milliseconds remainingTimeAsDuration() const { return std::chrono::milliseconds(remainingTime()); } - Q_ALWAYS_INLINE static void singleShot(std::chrono::milliseconds value, const QObject *receiver, const char *member) { singleShot(int(value.count()), receiver, member); } - Q_ALWAYS_INLINE static void singleShot(std::chrono::milliseconds value, Qt::TimerType timerType, const QObject *receiver, const char *member) { singleShot(int(value.count()), timerType, receiver, member); } - Q_ALWAYS_INLINE void start(std::chrono::milliseconds value) { start(int(value.count())); |