Adjust to QUnifiedTimer slow mode changes
a318e331f1387eb3c9d13be96c28619453a35571 in qtbase. Task-number: QTBUG-137919 Change-Id: I98e3871053bbb04b83aa114844f07293501d95d6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
parent
8c6eda1e67
commit
182bb9d04d
|
@ -306,8 +306,7 @@ void GlobalInspector::processMessage(const QByteArray &message)
|
|||
} else if (command == SET_ANIMATION_SPEED) {
|
||||
qreal speed;
|
||||
ds >> speed;
|
||||
QUnifiedTimer::instance()->setSlowModeEnabled(speed != 1.0);
|
||||
QUnifiedTimer::instance()->setSlowdownFactor(speed);
|
||||
QUnifiedTimer::instance()->setSpeedModifier(1 / speed);
|
||||
} else if (command == SHOW_APP_ON_TOP) {
|
||||
bool showOnTop;
|
||||
ds >> showOnTop;
|
||||
|
|
|
@ -296,8 +296,7 @@ void QQuickDesignerSupportItems::disableBehaivour(QObject *object)
|
|||
|
||||
void QQuickDesignerSupportItems::stopUnifiedTimer()
|
||||
{
|
||||
QUnifiedTimer::instance()->setSlowdownFactor(0.00001);
|
||||
QUnifiedTimer::instance()->setSlowModeEnabled(true);
|
||||
QUnifiedTimer::instance()->setSpeedModifier(0);
|
||||
}
|
||||
|
||||
void QQuickDesignerSupportItems::registerFixResourcePathsForObjectCallBack(void (*callback)(QObject *))
|
||||
|
|
|
@ -559,7 +559,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
#if QT_CONFIG(qml_animation)
|
||||
if (parser.isSet(slowAnimationsOption))
|
||||
QUnifiedTimer::instance()->setSlowModeEnabled(true);
|
||||
QUnifiedTimer::instance()->setSpeedModifier(0.2);
|
||||
if (parser.isSet(fixedAnimationsOption))
|
||||
QUnifiedTimer::instance()->setConsistentTiming(true);
|
||||
#endif
|
||||
|
|
|
@ -537,7 +537,7 @@ int main(int argc, char ** argv)
|
|||
|
||||
QQuickWindow::setTextRenderType(options.textRenderType);
|
||||
|
||||
QUnifiedTimer::instance()->setSlowModeEnabled(options.slowAnimations);
|
||||
QUnifiedTimer::instance()->setSpeedModifier(options.slowAnimations ? 0.2 : 1);
|
||||
|
||||
if (options.rhi) {
|
||||
if (options.rhiBackendSet)
|
||||
|
|
Loading…
Reference in New Issue