diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2018-10-05 15:04:23 +0300 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2018-10-10 10:29:26 +0000 |
commit | fe04c1301a1a6865fc96ee3a561696015ba3a1ae (patch) | |
tree | 4206bf178c6add95de590a5cd20248ffc58f9c2b /src/Authoring/Studio/Palettes/Timeline | |
parent | 9b0276d7aba5d93a2619d0f39698c43cdb13c084 (diff) |
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 <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Timeline')
5 files changed, 18 insertions, 18 deletions
diff --git a/src/Authoring/Studio/Palettes/Timeline/Bindings/OffsetKeyframesCommandHelper.cpp b/src/Authoring/Studio/Palettes/Timeline/Bindings/OffsetKeyframesCommandHelper.cpp index 6525cce9..a0c4ee99 100644 --- a/src/Authoring/Studio/Palettes/Timeline/Bindings/OffsetKeyframesCommandHelper.cpp +++ b/src/Authoring/Studio/Palettes/Timeline/Bindings/OffsetKeyframesCommandHelper.cpp @@ -56,7 +56,7 @@ void COffsetKeyframesCommandHelper::SetCommandTime(qt3dsdm::Qt3DSDMKeyframeHandl long inTime) { // The DataModel system will take care of merging these under the hood. - ENSURE_EDITOR(L"Set Keyframe Time").SetKeyframeTime(inKeyframe, inTime); + ENSURE_EDITOR(QObject::tr("Set Keyframe Time")).SetKeyframeTime(inKeyframe, inTime); } // equivalent to commit (onmouseup) diff --git a/src/Authoring/Studio/Palettes/Timeline/Bindings/PathTimelineItemBinding.cpp b/src/Authoring/Studio/Palettes/Timeline/Bindings/PathTimelineItemBinding.cpp index 9581265f..f646415d 100644 --- a/src/Authoring/Studio/Palettes/Timeline/Bindings/PathTimelineItemBinding.cpp +++ b/src/Authoring/Studio/Palettes/Timeline/Bindings/PathTimelineItemBinding.cpp @@ -39,8 +39,8 @@ bool CPathTimelineItemBinding::IsExternalizeable() void CPathTimelineItemBinding::Externalize() { - Q3DStudio::ScopedDocumentEditor(*m_TransMgr->GetDoc(), L"Externalize Path Buffer", __FILE__, - __LINE__) + Q3DStudio::ScopedDocumentEditor(*m_TransMgr->GetDoc(), QObject::tr("Externalize Path Buffer"), + __FILE__, __LINE__) ->ExternalizePath(GetInstance()); } @@ -52,7 +52,7 @@ bool CPathTimelineItemBinding::IsInternalizeable() void CPathTimelineItemBinding::Internalize() { - Q3DStudio::ScopedDocumentEditor(*m_TransMgr->GetDoc(), L"Internalize Path Buffer", __FILE__, - __LINE__) + Q3DStudio::ScopedDocumentEditor(*m_TransMgr->GetDoc(), QObject::tr("Internalize Path Buffer"), + __FILE__, __LINE__) ->InternalizePath(GetInstance()); } 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<CDoc *>(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 diff --git a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemProperty.cpp b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemProperty.cpp index e241913d..73a7bb7d 100644 --- a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemProperty.cpp +++ b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemProperty.cpp @@ -232,7 +232,8 @@ void Qt3DSDMTimelineItemProperty::DeleteAllKeys() using namespace Q3DStudio; - ScopedDocumentEditor editor(*m_TransMgr->GetDoc(), L"Delete All Keyframes", __FILE__, __LINE__); + ScopedDocumentEditor editor(*m_TransMgr->GetDoc(), QObject::tr("Delete All Keyframes"), + __FILE__, __LINE__); for (size_t idx = 0, end = m_AnimationHandles.size(); idx < end; ++idx) editor->DeleteAllKeyframes(m_AnimationHandles[idx]); } diff --git a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineTimebar.cpp b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineTimebar.cpp index a4f27f6e..8c76046c 100644 --- a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineTimebar.cpp +++ b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineTimebar.cpp @@ -174,7 +174,7 @@ void Qt3DSDMTimelineTimebar::OnBeginDrag() void Qt3DSDMTimelineTimebar::OffsetTime(long inDiff) { if (m_DataHandle.Valid()) { - ENSURE_EDITOR(L"Time Bar Move").OffsetTimeRange(m_DataHandle, inDiff); + ENSURE_EDITOR(QObject::tr("Time Bar Move")).OffsetTimeRange(m_DataHandle, inDiff); m_TimelineTranslationManager->GetDoc() ->GetCore() ->GetDispatch() @@ -185,7 +185,8 @@ void Qt3DSDMTimelineTimebar::OffsetTime(long inDiff) void Qt3DSDMTimelineTimebar::ChangeTime(long inTime, bool inSetStart) { if (m_DataHandle.Valid()) { - ENSURE_EDITOR(L"Time Bar Resize").ResizeTimeRange(m_DataHandle, inTime, inSetStart); + ENSURE_EDITOR(QObject::tr("Time Bar Resize")).ResizeTimeRange(m_DataHandle, inTime, + inSetStart); m_TimelineTranslationManager->GetDoc() ->GetCore() ->GetDispatch() |