diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-06-27 09:47:07 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-06-28 09:31:22 +0300 |
commit | 9677851febf223cb3e74aa0d11edf95d0c08b919 (patch) | |
tree | cce42160d48e178e01fe7194da2e2f77b6219250 /src/engine/Qt3DSRuntimeView.cpp | |
parent | 3a014b324f1948192cb973c62c40150464ce5aa2 (diff) |
Fix simpleqml example
- Reset source when window changes because it will cause new renderer to be
created and it would not have proper source without it.
- Update the example codes and resources
- Change how the init timer is initialized to get proper result each time
the presentation gets reloaded.
Task-number: QT3DS-3681
Change-Id: I64d4f6980b87b6efcbb906bb4ad241956ce0a7bc
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/engine/Qt3DSRuntimeView.cpp')
-rw-r--r-- | src/engine/Qt3DSRuntimeView.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/engine/Qt3DSRuntimeView.cpp b/src/engine/Qt3DSRuntimeView.cpp index c1f3b3d..90a2562 100644 --- a/src/engine/Qt3DSRuntimeView.cpp +++ b/src/engine/Qt3DSRuntimeView.cpp @@ -260,6 +260,7 @@ CRuntimeView::~CRuntimeView() bool CRuntimeView::BeginLoad(const QString &sourcePath, const QStringList &variantList) { bool theResult = false; + m_startupTime = -1; // boot up the application BootupPreGraphicsInitObjects(); @@ -372,7 +373,7 @@ void CRuntimeView::Render() m_Application->UpdateAndRender(); - if (m_startupTime < 0 && m_startupTimer) { + if (m_startupTime < 0 && m_startupTimer && m_startupTimer->isValid()) { m_startupTime = m_startupTimer->elapsed(); m_startupTimer->invalidate(); } |