diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp index cf96ac41e1a..5a659077e5c 100644 --- a/src/corelib/compat/removed_api.cpp +++ b/src/corelib/compat/removed_api.cpp @@ -1165,6 +1165,7 @@ auto QStringConverter::encodingForName(const char *name) noexcept -> std::option #endif #include "qtimer.h" // inlined API + // removed inline API (MSVC) void QTimer::singleShot(std::chrono::milliseconds interval, Qt::TimerType timerType, const QObject *receiver, const char *member) diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index 0faaab5f601..00c6b7bf127 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -160,6 +160,13 @@ private: static constexpr Qt::TimerType defaultTypeFor(int msecs) noexcept { return defaultTypeFor(std::chrono::milliseconds{msecs}); } +#if QT_CORE_REMOVED_SINCE(6, 8) + static constexpr Qt::TimerType defaultTypeFor(std::chrono::milliseconds interval) noexcept + { + return defaultTypeFor(std::chrono::nanoseconds{interval}); + } +#endif + static constexpr Qt::TimerType defaultTypeFor(std::chrono::nanoseconds interval) noexcept { // coarse timers are worst in their first firing