summaryrefslogtreecommitdiffstats
path: root/src/runtime/Qt3DSPresentation.cpp
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2020-01-20 09:05:11 +0200
committerAntti Määttä <antti.maatta@qt.io>2020-01-22 13:29:00 +0200
commitaee9f758b2fe152d95dcd7ac9776b4e0cd765d0c (patch)
tree392884eac23a7f1829b49ace65ec5e3632c2cbe8 /src/runtime/Qt3DSPresentation.cpp
parent88849a83a6f9ca3524cf3ba32c3a4ed7e6fabdb9 (diff)
Optimize element attribute name hashing
Task-number: QT3DS-4041 Change-Id: I64ccd129b12053b057e5e992d89a05a2bc6cd33d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/runtime/Qt3DSPresentation.cpp')
-rw-r--r--src/runtime/Qt3DSPresentation.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/runtime/Qt3DSPresentation.cpp b/src/runtime/Qt3DSPresentation.cpp
index 504e7b6..851cfef 100644
--- a/src/runtime/Qt3DSPresentation.cpp
+++ b/src/runtime/Qt3DSPresentation.cpp
@@ -237,16 +237,16 @@ void CPresentation::NotifyDataOutputs()
Q3DStudio::TElementList &dirtyList = GetFrameData().GetDirtyList();
for (int idx = 0, end = dirtyList.GetCount(); idx < end; ++idx) {
Q3DStudio::TElement &element = *dirtyList[idx];
- if (m_pathToDataOutMap.contains(element.m_Path)) {
- auto outDefIter = m_pathToDataOutMap.find(element.m_Path);
+ if (m_pathToDataOutMap.contains(element.path())) {
+ auto outDefIter = m_pathToDataOutMap.find(element.path());
- while (outDefIter != m_pathToDataOutMap.end() && outDefIter.key() == element.m_Path) {
+ while (outDefIter != m_pathToDataOutMap.end() && outDefIter.key() == element.path()) {
qt3ds::runtime::DataOutputDef &outDef = outDefIter.value();
// Get current value
Q3DStudio::UVariant value;
- qt3ds::QT3DSU32 attribHash
- = CHash::HashAttribute(outDef.observedAttribute.attributeName[0]);
+ qt3ds::QT3DSU32 attribHash = CHash::HashAttribute(
+ outDef.observedAttribute.attributeName[0].constData());
element.GetAttribute(attribHash, value);
QVariant qvar;
switch (outDef.observedAttribute.propertyType) {
@@ -439,7 +439,7 @@ void CPresentation::ProcessEventBubbling(SEventCommand &ioEvent, INT32 &ioEventC
// Event bubbling
if (ioEvent.m_BubbleUp) {
- TElement *theParent = ioEvent.m_Target->m_Parent;
+ TElement *theParent = ioEvent.m_Target->GetParent();
if (theParent) {
ioEvent.m_Target = theParent;
ProcessEvent(ioEvent, ioEventCount);
@@ -513,7 +513,7 @@ void CPresentation::ProcessCommand(const SEventCommand &inCommand)
} else if (inCommand.m_Type == COMMAND_EMITSIGNAL) {
CRegisteredString nameStr = GetStringTable().HandleToStr(inCommand.m_Arg1.m_INT32);
m_Application->GetRuntimeFactoryCore().GetScriptEngineQml().ProcessSignal(this, inCommand);
- QString path = QString::fromLatin1(inCommand.m_Target->m_Path.c_str());
+ QString path = QString::fromLatin1(inCommand.m_Target->path().c_str());
QString name = QString::fromLatin1(nameStr.c_str());
signalProxy()->SigCustomSignal(path, name);
} else {