summaryrefslogtreecommitdiffstats
path: root/src/Runtime/Source/engine
diff options
context:
space:
mode:
authorJanne Kangas <janne.kangas@qt.io>2019-05-14 11:02:30 +0300
committerJanne Kangas <janne.kangas@qt.io>2019-05-15 10:30:27 +0000
commitcb2f3cad5ca145bea8121c191ad3c5ff02d68e2c (patch)
tree905e334e63cd3269822ccb677b31e1be021f6a1b /src/Runtime/Source/engine
parentc1b1d767146a664c6427af74aac2d4966c9aea0f (diff)
Implement Q3DSSurfaceViewer::presentationReady in OpenGL Runtime
New signal fixes the issue where setAttribute calls triggered at presentationLoaded() were lost as the runtime overrode attribute values with initial values in UIP file. presentationReady signal is triggered when the initial property values are set, and setAttribute can be safely called to update properties. Task-id: QT3DS-3398 Change-Id: Id605ddeb92766da11e0280a276ffc5e36c57b931 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Runtime/Source/engine')
-rw-r--r--src/Runtime/Source/engine/Qt3DSRuntimeView.cpp3
-rw-r--r--src/Runtime/Source/engine/Qt3DSRuntimeView.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/Runtime/Source/engine/Qt3DSRuntimeView.cpp b/src/Runtime/Source/engine/Qt3DSRuntimeView.cpp
index e5c0f298..76866245 100644
--- a/src/Runtime/Source/engine/Qt3DSRuntimeView.cpp
+++ b/src/Runtime/Source/engine/Qt3DSRuntimeView.cpp
@@ -310,6 +310,9 @@ bool CRuntimeView::InitializeGraphics(const QSurfaceFormat &format, bool delayed
signalProxy(), &QRuntimeViewSignalProxy::SigSlideExited);
QObject::connect(m_Presentation->signalProxy(), &QPresentationSignalProxy::SigCustomSignal,
signalProxy(), &QRuntimeViewSignalProxy::SigCustomSignal);
+ QObject::connect(m_Presentation->signalProxy(),
+ &QPresentationSignalProxy::SigPresentationReady,
+ signalProxy(), &QRuntimeViewSignalProxy::SigPresentationReady);
QObject::connect(m_Presentation->signalProxy(), &QPresentationSignalProxy::SigElementCreated,
signalProxy(), &QRuntimeViewSignalProxy::SigElementCreated);
QObject::connect(m_Presentation->signalProxy(), &QPresentationSignalProxy::SigMaterialCreated,
diff --git a/src/Runtime/Source/engine/Qt3DSRuntimeView.h b/src/Runtime/Source/engine/Qt3DSRuntimeView.h
index 6dc0487b..f728f220 100644
--- a/src/Runtime/Source/engine/Qt3DSRuntimeView.h
+++ b/src/Runtime/Source/engine/Qt3DSRuntimeView.h
@@ -55,6 +55,7 @@ Q_SIGNALS:
void SigSlideEntered(const QString &elementPath, unsigned int index, const QString &name);
void SigSlideExited(const QString &elementPath, unsigned int index, const QString &name);
void SigCustomSignal(const QString &elementPath, const QString &name);
+ void SigPresentationReady();
void SigElementCreated(const QString &elementName, const QString &error);
void SigMaterialCreated(const QString &name, const QString &error);
};