summaryrefslogtreecommitdiffstats
path: root/src/corelib/compat
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/compat')
-rw-r--r--src/corelib/compat/removed_api.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp
index a2d8d6f63e..b214ca4f36 100644
--- a/src/corelib/compat/removed_api.cpp
+++ b/src/corelib/compat/removed_api.cpp
@@ -4,6 +4,7 @@
#define QT_CORE_BUILD_REMOVED_API
#include "qglobal.h"
+#include "qnumeric.h"
QT_USE_NAMESPACE
@@ -954,6 +955,20 @@ bool QUrlQuery::operator==(const QUrlQuery &other) const
return comparesEqual(*this, other);
}
+#include "qobject.h"
+
+int QObject::startTimer(std::chrono::milliseconds time, Qt::TimerType timerType)
+{
+ using namespace std::chrono;
+ using ratio = std::ratio_divide<std::milli, std::nano>;
+ if (nanoseconds::rep r; qMulOverflow<ratio::num>(time.count(), &r)) {
+ qWarning("QObject::startTimer(std::chrono::milliseconds time ...): "
+ "'time' arg will overflow when converted to nanoseconds.");
+ }
+ return startTimer(nanoseconds{time}, timerType);
+}
+
+
// #include "qotherheader.h"
// // implement removed functions from qotherheader.h
// order sections alphabetically to reduce chances of merge conflicts