summaryrefslogtreecommitdiffstats
path: root/src/uipparser
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/uipparser
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/uipparser')
-rw-r--r--src/uipparser/Qt3DSUIPParserActionHelper.cpp2
-rw-r--r--src/uipparser/Qt3DSUIPParserImpl.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/uipparser/Qt3DSUIPParserActionHelper.cpp b/src/uipparser/Qt3DSUIPParserActionHelper.cpp
index ab6d751..68c6be3 100644
--- a/src/uipparser/Qt3DSUIPParserActionHelper.cpp
+++ b/src/uipparser/Qt3DSUIPParserActionHelper.cpp
@@ -341,7 +341,7 @@ void CUIPParserActionHelper::BuildAction(TElement &inElement, UINT32 inEventName
Q3DStudio_ASSERT(theActionCount > 0);
for (UINT32 theActionIndex = 0; theActionIndex < theActionCount; ++theActionIndex) {
INT32 actionId = theAdder.AddAction(
- COMMAND_SETPROPERTY, theProperties[theActionIndex].first.GetNameHash(),
+ COMMAND_SETPROPERTY, theProperties[theActionIndex].first.nameHash(),
theProperties[theActionIndex].second.m_INT32);
if (theActionIndex == 0)
theAddActionIndex = actionId;
diff --git a/src/uipparser/Qt3DSUIPParserImpl.cpp b/src/uipparser/Qt3DSUIPParserImpl.cpp
index d0868ee..6503dbe 100644
--- a/src/uipparser/Qt3DSUIPParserImpl.cpp
+++ b/src/uipparser/Qt3DSUIPParserImpl.cpp
@@ -1156,7 +1156,7 @@ BOOL CUIPParserImpl::LoadSceneGraph(IPresentation &inPresentation, IDOMReader &i
thePath.insert(0, theNode->m_Name);
}
if (thePath.size())
- theNewElem.m_Path = m_ParseElementManager.m_StringTable.RegisterStr(thePath.c_str());
+ theNewElem.setPath(m_ParseElementManager.m_StringTable.RegisterStr(thePath.c_str()));
if (isBehavior) {
if (theFileString.find(".qml") != eastl::string::npos) {
@@ -2321,7 +2321,7 @@ BOOL CUIPParserImpl::LoadSlideElementAttrs(IPresentation &inPresentation, bool m
for (QT3DSU32 idx = previousListSize, end = theAttributeList.size(); idx < end;
++idx) {
UVariant *theValue = inElementData.m_Element->FindPropertyValue(
- theAttributeList[idx].first.m_Name);
+ theAttributeList[idx].first.name());
if (theValue) {
*theValue = theAttributeList[idx].second;
}