mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 03:04:33 +02:00
Reset deadlock watch before qml load
This commit is contained in:
parent
9c11474dd7
commit
745438148a
1 changed files with 5 additions and 1 deletions
|
@ -426,7 +426,11 @@ void OffscreenQmlSurface::setBaseUrl(const QUrl& baseUrl) {
|
|||
}
|
||||
|
||||
QObject* OffscreenQmlSurface::load(const QUrl& qmlSource, std::function<void(QQmlContext*, QObject*)> f) {
|
||||
_qmlComponent->loadUrl(qmlSource);
|
||||
// Synchronous loading may take a while; restart the deadlock timer
|
||||
QMetaObject::invokeMethod(qApp, "updateHeartbeat", Qt::DirectConnection);
|
||||
|
||||
_qmlComponent->loadUrl(qmlSource, QQmlComponent::PreferSynchronous);
|
||||
|
||||
if (_qmlComponent->isLoading()) {
|
||||
connect(_qmlComponent, &QQmlComponent::statusChanged, this,
|
||||
[this, f](QQmlComponent::Status){
|
||||
|
|
Loading…
Reference in a new issue