summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2018-10-05 15:04:23 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2018-10-10 10:29:26 +0000
commitfe04c1301a1a6865fc96ee3a561696015ba3a1ae (patch)
tree4206bf178c6add95de590a5cd20248ffc58f9c2b /src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
parent9b0276d7aba5d93a2619d0f39698c43cdb13c084 (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/Bindings/Qt3DSDMTimelineItemBinding.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp18
1 files changed, 8 insertions, 10 deletions
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