From: Artem Zhidkov Date: Fri, 10 Jul 2020 13:46:34 +0000 (+0300) Subject: Task #3237: Allow usage of accented characters in ObjectBrowser X-Git-Tag: V9_6_0a1~60^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FEDF_2020_Lot2;p=modules%2Fshaper.git Task #3237: Allow usage of accented characters in ObjectBrowser Use wide-strings for debug logging. --- diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index f667942f8..0a3fa52d6 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -113,7 +113,7 @@ std::wstring Model_Data::name() Handle(TDataStd_Name) aName; if (shapeLab().FindAttribute(TDataStd_Name::GetID(), aName)) { #ifdef DEBUG_NAMES - myObject->myName = TCollection_AsciiString(aName->Get()).ToCString(); + myObject->myName = Locale::Convert::toWString(aName->Get().ToExtString()); #endif return Locale::Convert::toWString(aName->Get().ToExtString()); } diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 09a56b188..6b0ade0b5 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -52,6 +52,10 @@ Model_Update MY_UPDATER_INSTANCE; /// the only one instance initialized on load of the library //#define DEB_UPDATE +#ifdef DEB_UPDATE +#include +#endif + Model_Update::Model_Update() { Events_Loop* aLoop = Events_Loop::loop(); @@ -117,7 +121,7 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) { else if (myProcessOnFinish.find(theFeature) == myProcessOnFinish.end()) myProcessOnFinish[theFeature] = std::set >(); #ifdef DEB_UPDATE - std::cout<<"*** Add process on finish "<name()<name()<& theMessag if (!(*anObjIter)->data()->isValid()) continue; #ifdef DEB_UPDATE - std::cout<<">>> in event updated "<<(*anObjIter)->groupName()<< - " "<<(*anObjIter)->data()->name()<>> in event updated "<groupName()) + <data()->name()<groupName() == ModelAPI_ResultParameter::group()) { myIsParamUpdated = true; @@ -563,14 +567,14 @@ bool Model_Update::processFeature(FeaturePtr theFeature) } #ifdef DEB_UPDATE - std::cout<<"* Process feature "<name()<name()<getKind() == "Sketch") { #ifdef DEB_UPDATE - std::cout << "****** Update sketch args " << theFeature->name() << std::endl; + std::wcout << L"****** Update sketch args " << theFeature->name() << std::endl; #endif AttributeSelectionPtr anExtSel = theFeature->selection("External"); if (anExtSel.get()) { @@ -689,7 +693,7 @@ bool Model_Update::processFeature(FeaturePtr theFeature) } #ifdef DEB_UPDATE - std::cout<<"Update args "<name()<name()<data()->isValid()) @@ -712,7 +716,7 @@ bool Model_Update::processFeature(FeaturePtr theFeature) // don't disable Part because it will make disabled all the features // (performance and problems with the current feature) #ifdef DEB_UPDATE - std::cout<<"Invalid args "<name()<name()<eraseResults(false); redisplayWithResults(theFeature, ModelAPI_StateInvalidArgument); // result also must be updated @@ -742,7 +746,7 @@ bool Model_Update::processFeature(FeaturePtr theFeature) } } else { #ifdef DEB_UPDATE - std::cout<<"Feature is not valid, erase results "<name()<name()<eraseResults(false); redisplayWithResults(theFeature, ModelAPI_StateInvalidArgument); // result also must be updated @@ -979,7 +983,7 @@ bool Model_Update::isReason(std::shared_ptr& theFeature, void Model_Update::executeFeature(FeaturePtr theFeature) { #ifdef DEB_UPDATE - std::cout<<"Execute Feature "<name()<name()< myDoc; ///< document this object belongs to public: #ifdef DEBUG_NAMES - std::string myName; // name of this object + std::wstring myName; // name of this object #endif /// By default object is displayed in the object browser. MODELAPI_EXPORT virtual bool isInHistory();