From fe04c1301a1a6865fc96ee3a561696015ba3a1ae Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Fri, 5 Oct 2018 15:04:23 +0300 Subject: Change many CStrings to QString - A lot of CString, CFilePath, and Qt3DSFile occureneces and their relevant code has been removed to save the costy back and forth conversion between CString and QString. - Renovated several classes as part of the process (Preferences classes, recent items, build configuration, probably few more) - Assorted tweaks here and there Task-number: QT3DS-1899 Task-number: QT3DS-2455 Change-Id: Ibbf4c3b7ab0b9fe6e19d8aed822fa29d43b99086 Reviewed-by: Miikka Heikkinen --- .../Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp') diff --git a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp index e4c7ce78..7fa26eaa 100644 --- a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp +++ b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp @@ -195,7 +195,8 @@ void ToggleChildrenLock(Q3DStudio::ScopedDocumentEditor &scopedDocEditor, void Qt3DSDMTimelineItemBinding::SetLocked(bool inLocked) { CDoc *theDoc = dynamic_cast(g_StudioApp.GetCore()->GetDoc()); - Q3DStudio::ScopedDocumentEditor scopedDocEditor(*theDoc, L"SetLock", __FILE__, __LINE__); + Q3DStudio::ScopedDocumentEditor scopedDocEditor(*theDoc, QObject::tr("SetLock"), __FILE__, + __LINE__); SDataModelSceneAsset sceneAsset = m_StudioSystem->GetClientDataModelBridge()->GetSceneAsset(); ToggleChildrenLock(scopedDocEditor, this, sceneAsset, inLocked); @@ -767,8 +768,8 @@ void Qt3DSDMTimelineItemBinding::InsertKeyframe() return; TPropertyBindingMap::const_iterator theIter = m_PropertyBindingMap.begin(); - ScopedDocumentEditor editor(*g_StudioApp.GetCore()->GetDoc(), L"Insert Keyframe", __FILE__, - __LINE__); + ScopedDocumentEditor editor(*g_StudioApp.GetCore()->GetDoc(), QObject::tr("Insert Keyframe"), + __FILE__, __LINE__); for (; theIter != m_PropertyBindingMap.end(); ++theIter) editor->KeyframeProperty(m_DataHandle, theIter->first, false); } @@ -779,13 +780,10 @@ void Qt3DSDMTimelineItemBinding::DeleteAllChannelKeyframes() return; CDoc *theDoc = m_TransMgr->GetDoc(); - Q3DStudio::ScopedDocumentEditor editor(*theDoc, L"Delete Channel Keyframes", __FILE__, - __LINE__); - for (TPropertyBindingMap::iterator theIter = m_PropertyBindingMap.begin(), - theEnd = m_PropertyBindingMap.end(); - theIter != theEnd; ++theIter) { - theIter->second->DeleteAllKeys(); - } + Q3DStudio::ScopedDocumentEditor editor(*theDoc, QObject::tr("Delete Channel Keyframes"), + __FILE__, __LINE__); + for (auto &kv : m_PropertyBindingMap) + kv.second->DeleteAllKeys(); } IKeyframe *Qt3DSDMTimelineItemBinding::GetKeyframeByTime(long inTime) const -- cgit v1.2.3