Make from_msecs a QTimer class-static again
It will need to be called from removed_api.cpp once we widen QTimer::singleShot() from ms to ns. Don't use the QAbstractEventDispatcher::Duration typedef in qtimer.h to avoid including the resp. header. Keep the typedef as the return value on the definition of from_msecs(), though, as a static assertion that they're identical. Task-number: QTBUG-128426 Change-Id: Ib59895f4441e92813fe39778bb3836b039fdfbf0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 65a249715941bf6b6ecc980d3f865f367f66522d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
79dec148a9
commit
92597843d6
@ -290,7 +290,8 @@ void QTimer::timerEvent(QTimerEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
static QAbstractEventDispatcher::Duration from_msecs(std::chrono::milliseconds ms)
|
||||
QAbstractEventDispatcher::Duration // statically asserts that Duration is nanoseconds
|
||||
QTimer::from_msecs(std::chrono::milliseconds ms)
|
||||
{
|
||||
using Duration = QAbstractEventDispatcher::Duration;
|
||||
|
||||
|
@ -144,6 +144,8 @@ private:
|
||||
Q_DECLARE_PRIVATE(QTimer)
|
||||
friend class QChronoTimer;
|
||||
|
||||
static std::chrono::nanoseconds from_msecs(std::chrono::milliseconds);
|
||||
|
||||
inline int startTimer(int){ return -1;}
|
||||
inline void killTimer(int){}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user