summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Timeline/Bindings/TimelineBreadCrumbProvider.cpp
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2017-12-14 13:44:38 +0200
committerTomi Korpipää <tomi.korpipaa@qt.io>2017-12-15 10:13:43 +0000
commita73befeaa3c641f302dcf1e26badf9d1357568cd (patch)
tree48a2fe9910109856b6e169312bafaeebcbccb46c /src/Authoring/Studio/Palettes/Timeline/Bindings/TimelineBreadCrumbProvider.cpp
parent9652d11b257bba0174270dfb8addd3b25e1e4961 (diff)
Get rid of obsolete string localization files
Also fix coding style on files touched, as this task is in the codebase cleanup epic. Task-number: QT3DS-69 Change-Id: I4f98523659c817b9f7803cc8ee310b44094b65e4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Timeline/Bindings/TimelineBreadCrumbProvider.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Timeline/Bindings/TimelineBreadCrumbProvider.cpp42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/Authoring/Studio/Palettes/Timeline/Bindings/TimelineBreadCrumbProvider.cpp b/src/Authoring/Studio/Palettes/Timeline/Bindings/TimelineBreadCrumbProvider.cpp
index 33bbe6bb..c41963c6 100644
--- a/src/Authoring/Studio/Palettes/Timeline/Bindings/TimelineBreadCrumbProvider.cpp
+++ b/src/Authoring/Studio/Palettes/Timeline/Bindings/TimelineBreadCrumbProvider.cpp
@@ -36,8 +36,6 @@
#include "StudioApp.h"
#include "Cmd.h"
#include "ResourceCache.h"
-#include "Strings.h"
-#include "StringLoader.h"
#include "CColor.h"
#include "ClientDataModelBridge.h"
@@ -75,7 +73,7 @@ static inline void FillBreadCrumb(SBreadCrumb &outBreadCrumb,
ISlideSystem *theSlideSystem = inDoc->GetStudioSystem()->GetSlideSystem();
Q3DStudio::CId theId = theBridge->GetGUID(inInstance);
qt3dsdm::Qt3DSDMSlideHandle theMasterSlide =
- theSlideSystem->GetMasterSlideByComponentGuid(GuidtoSLong4(theId));
+ theSlideSystem->GetMasterSlideByComponentGuid(GuidtoSLong4(theId));
ASSERT(theMasterSlide.Valid()); // it should be valid because inAsset should be OBJTYPE_SCENE or
// non-library OBJTYPE_COMPONENT
@@ -85,16 +83,16 @@ static inline void FillBreadCrumb(SBreadCrumb &outBreadCrumb,
// Determine the color
outBreadCrumb.m_Color =
- theIsMaster ? CColor(0, 0, 255) : CColor(0, 0, 0); // blue for master, black otherwise
+ theIsMaster ? CColor(0, 0, 255) : CColor(0, 0, 0); // blue for master, black otherwise
// Determine the text string
outBreadCrumb.m_String = theBridge->GetName(inInstance).toQString();
outBreadCrumb.m_String += " (";
- if (theIsMaster)
- outBreadCrumb.m_String += ::LoadResourceString(IDS_OBJTYPE_MASTER).toQString();
- else {
+ if (theIsMaster) {
+ outBreadCrumb.m_String += QObject::tr("Master");
+ } else {
Qt3DSDMSlideHandle theActiveSlide =
- theSlideSystem->GetSlideByIndex(theMasterSlide, theActiveIndex);
+ theSlideSystem->GetSlideByIndex(theMasterSlide, theActiveIndex);
Qt3DSDMInstanceHandle theInstanceHandle = theSlideSystem->GetSlideInstance(theActiveSlide);
ASSERT(theInstanceHandle.Valid());
outBreadCrumb.m_String += theBridge->GetName(theInstanceHandle).toQString();
@@ -211,29 +209,33 @@ void CTimelineBreadCrumbProvider::FillSlideList(qt3dsdm::Qt3DSDMInstanceHandle i
m_BreadCrumbList.push_back(inInstance);
Qt3DSDMPropertyHandle theNameProp =
- m_Doc->GetStudioSystem()->GetClientDataModelBridge()->GetNameProperty();
+ m_Doc->GetStudioSystem()->GetClientDataModelBridge()->GetNameProperty();
IStudioFullSystemSignalProvider *theEngine =
- m_Doc->GetStudioSystem()->GetFullSystemSignalProvider();
+ m_Doc->GetStudioSystem()->GetFullSystemSignalProvider();
std::function<void(Qt3DSDMInstanceHandle, Qt3DSDMPropertyHandle)> theSetter(
- std::bind(&CTimelineBreadCrumbProvider::OnNameDirty, this));
+ std::bind(&CTimelineBreadCrumbProvider::OnNameDirty, this));
// Listen to name changes on the Asset
- m_Connections.push_back(theEngine->ConnectInstancePropertyValue(
- std::bind(qt3dsdm::MaybackCallbackInstancePropertyValue<std::function<void(
- Qt3DSDMInstanceHandle, Qt3DSDMPropertyHandle)>>,
- std::placeholders::_1, std::placeholders::_2, inInstance, theNameProp, theSetter)));
+ m_Connections.push_back(
+ theEngine->ConnectInstancePropertyValue(
+ std::bind(qt3dsdm::MaybackCallbackInstancePropertyValue<std::function<void(
+ Qt3DSDMInstanceHandle, Qt3DSDMPropertyHandle)>>,
+ std::placeholders::_1, std::placeholders::_2, inInstance,
+ theNameProp, theSetter)));
// Listen to name changes on the non-master Slides
qt3dsdm::Qt3DSDMSlideHandle theMasterSlide =
- theSlideSystem->GetMasterSlideByComponentGuid(GuidtoSLong4(theId));
+ theSlideSystem->GetMasterSlideByComponentGuid(GuidtoSLong4(theId));
long theSlideCount = (long)theSlideSystem->GetSlideCount(theMasterSlide);
for (long theIndex = 1; theIndex < theSlideCount; ++theIndex) {
Qt3DSDMSlideHandle theSlide = theSlideSystem->GetSlideByIndex(theMasterSlide, theIndex);
Qt3DSDMInstanceHandle theSlideInstance = theSlideSystem->GetSlideInstance(theSlide);
- m_Connections.push_back(theEngine->ConnectInstancePropertyValue(
- std::bind(qt3dsdm::MaybackCallbackInstancePropertyValue<std::function<void(
- Qt3DSDMInstanceHandle, Qt3DSDMPropertyHandle)>>,
- std::placeholders::_1, std::placeholders::_2, theSlideInstance, theNameProp, theSetter)));
+ m_Connections.push_back(
+ theEngine->ConnectInstancePropertyValue(
+ std::bind(qt3dsdm::MaybackCallbackInstancePropertyValue<std::function<void(
+ Qt3DSDMInstanceHandle, Qt3DSDMPropertyHandle)>>,
+ std::placeholders::_1, std::placeholders::_2, theSlideInstance,
+ theNameProp, theSetter)));
}
}