]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx
Salome HOME
Copyright update 2022
[modules/geom.git] / src / GEOMToolsGUI / GEOMToolsGUI_PublishDlg.cxx
index baedb674070511932c792209d60f542afc4400c7..d31ecf834790a9c773c76ca4e6d5574166c53f1b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -78,11 +78,7 @@ GEOMToolsGUI_PublishDlg::GEOMToolsGUI_PublishDlg(QWidget* parent):
    SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
    headerItem->setIcon( 2, QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) ) );
    myTreeWidget->setHeaderItem ( headerItem );
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-   myTreeWidget->header()->setClickable( true );
-#else
    myTreeWidget->header()->setSectionsClickable( true );
-#endif
    myTreeWidget->header()->setSortIndicatorShown( true );
    myTreeWidget->header()->moveSection( 2, 0 );
    myTreeWidget->setSortingEnabled( true );
@@ -145,7 +141,7 @@ GEOMToolsGUI_PublishDlg::~GEOMToolsGUI_PublishDlg()
            QTreeWidgetItemIterator it( myTreeWidget );
            while ( *it ) {
              QString entry = myEntryToItem.key( *it );
-             _PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
+             _PTR(SObject) SO ( aStudy->FindObjectID( qUtf8Printable( entry ) ) );
              if ( SO ) {
                GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
                if ( CORBA::is_nil( aGeomObject ) ) continue;
@@ -232,7 +228,7 @@ QTreeWidgetItem* GEOMToolsGUI_PublishDlg::findParentItem(SalomeApp_DataObject* t
     if( !(aResult = myEntryToItem.value(targetEntry)) ) {
       if( aParrent != myGeomRoot ) {
         QString aName;
-        _PTR(SObject) aSO ( SalomeApp_Application::getStudy()->FindObjectID(qPrintable(aParrent->entry())));
+        _PTR(SObject) aSO ( SalomeApp_Application::getStudy()->FindObjectID(qUtf8Printable(aParrent->entry())));
         _PTR(GenericAttribute) anAttr;
         if ( aSO->FindAttribute(anAttr, "AttributeName") ) {
           _PTR(AttributeName) anAttrName (anAttr);
@@ -270,7 +266,7 @@ void GEOMToolsGUI_PublishDlg::buildTree(SalomeApp_DataObject* theItem) {
 
     //If object hasn't "AttributeDrawable" => it visible
     bool isDrawable = true;
-    _PTR(SObject) SO ( SalomeApp_Application::getStudy()->FindObjectID(qPrintable(theItem->entry())));
+    _PTR(SObject) SO ( SalomeApp_Application::getStudy()->FindObjectID(qUtf8Printable(theItem->entry())));
     _PTR(GenericAttribute) anAttr;
     if ( SO && SO->FindAttribute(anAttr, "AttributeDrawable") ) {
       _PTR(AttributeDrawable) aDrw (anAttr);
@@ -323,7 +319,7 @@ void GEOMToolsGUI_PublishDlg::clickOnApply() {
     QTreeWidgetItem* item = toProcess[i];
     if(item) {
       QString entry = myEntryToItem.key(item);
-      _PTR(SObject) SO ( aStudy->FindObjectID(qPrintable(entry)) );
+      _PTR(SObject) SO ( aStudy->FindObjectID(qUtf8Printable(entry)) );
       if(!SO) continue;
       _PTR(AttributeDrawable) aDrw = aBuilder->FindOrCreateAttribute( SO, "AttributeDrawable" );
       aDrw->SetDrawable( true );
@@ -446,7 +442,7 @@ void GEOMToolsGUI_PublishDlg::onItemClicked(QTreeWidgetItem* theItem, int theCol
     _PTR(Study) aStudy = appStudy->studyDS();
     if ( !aStudy ) return;
     QString entry = myEntryToItem.key( theItem );
-    _PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
+    _PTR(SObject) SO ( aStudy->FindObjectID( qUtf8Printable( entry ) ) );
     if ( !SO ) return;
     GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
     if ( CORBA::is_nil( aGeomObject ) ) return;