Salome HOME
Updated copyright comment
[modules/gui.git] / src / Qtx / QtxWorkstack.cxx
index 6721d6d8a65ac8116cecf7dfa9fcbd684e727623..6a5ba33f5e7173d72d6b2ab67fdc874155fc9128 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -884,7 +884,7 @@ bool QtxWorkstackArea::restoreState( QDataStream& stream, QMap<QString, QtxWorks
     QtxWorkstackChild* c = map.contains( name ) ? map[name] : 0;
     if ( !c )
     {
-      qWarning( "QtxWorkstack: Restored child widget \"%s\" not found.", (const char*)name.toLatin1() );
+      qWarning( "QtxWorkstack: Restored child widget \"%s\" not found.", (const char*)name.toUtf8() );
       return false;
     }
 
@@ -959,7 +959,7 @@ void QtxWorkstackArea::customEvent( QEvent* e )
 {
   WidgetEvent* we = (WidgetEvent*)e;
 
-  switch ( we->type() )
+  switch ( (int)we->type() )
   {
   case ActivateWidget:
     myBar->updateActiveState();
@@ -1080,7 +1080,7 @@ void QtxWorkstackArea::onChildDestroyed( QObject* obj )
   \brief Called when child widget container is shown.
   \param c child widget container being shown
 */
-void QtxWorkstackArea::onChildShown( QtxWorkstackChild* c )
+void QtxWorkstackArea::onChildShown( QtxWorkstackChild* /*c*/ )
 {
   updateState();
 }
@@ -1089,7 +1089,7 @@ void QtxWorkstackArea::onChildShown( QtxWorkstackChild* c )
   \brief Called when child widget container is hidden.
   \param c child widget container being hidden
 */
-void QtxWorkstackArea::onChildHidden( QtxWorkstackChild* c )
+void QtxWorkstackArea::onChildHidden( QtxWorkstackChild* /*c*/ )
 {
   updateState();
 }
@@ -1469,7 +1469,7 @@ bool QtxWorkstackChild::eventFilter( QObject* o, QEvent* e )
   \brief Called when child widget is destroyed.
   \param obj child widget being destroyed
 */
-void QtxWorkstackChild::onDestroyed( QObject* obj )
+void QtxWorkstackChild::onDestroyed( QObject* /*obj*/ )
 {
   deleteLater();
 }
@@ -2203,7 +2203,7 @@ int QtxWorkstack::accel( const int id ) const
 {
   int res = 0;
   if ( myActionsMap.contains( id ) )
-    res = myActionsMap[id]->shortcut();
+    res = myActionsMap[id]->shortcut()[0];
   return res;
 }
 
@@ -2287,8 +2287,6 @@ static int positionSimple (QIntList& szList, const int nb, const int splitter_si
   int new_this = szList[item_ind];
   int new_next = 0;
 
-  bool isToCheck = false;
-
   if (need_pos < splitter_pos) {
     // Set size of all previous workareas to zero <--
     if (item_ind == nb - 1) {
@@ -2320,7 +2318,6 @@ static int positionSimple (QIntList& szList, const int nb, const int splitter_si
         new_this = splitter_size - new_item_rel_pos;
       }
       // jfa to do: in this case fixed size of next widgets could prevent right resizing
-      isToCheck = true;
     }
     if (item_ind == nb - 1) {
       new_this = splitter_size - new_item_rel_pos;
@@ -2651,7 +2648,7 @@ void QtxWorkstack::insertWidget( QWidget* wid, QWidget* pWid, QWidget* after )
   for ( QWidgetList::iterator itr = moveList.begin(); itr != moveList.end(); ++itr )
   {
     (*itr)->setParent( pWid );
-    (*itr)->setShown( map.contains( *itr ) ? map[*itr] : false );
+    (*itr)->setVisible( map.contains( *itr ) ? map[*itr] : false );
   }
 }
 
@@ -3127,7 +3124,7 @@ bool QtxWorkstack::restoreState( QDataStream& stream )
 
       map.insert( c->widget()->objectName(), c );
 
-      qDebug( "QtxWorkstack::restoreState: found widget \"%s\"", (const char*)c->widget()->objectName().toLatin1() );
+      qDebug( "QtxWorkstack::restoreState: found widget \"%s\"", (const char*)c->widget()->objectName().toUtf8() );
     }
   }
 
@@ -3309,7 +3306,7 @@ QtxWorkstackArea* QtxWorkstack::wgArea( QWidget* wid ) const
   \param wid_to widget specified the destination area
   \param before specifies whether the first widget has to be moved before or after
          the second widget
-  \return TRUE if operation is completed successfully, FALSE otherwise
+  \return \c true if operation is completed successfully, \c false otherwise
 */
 bool QtxWorkstack::move( QWidget* wid, QWidget* wid_to, const bool before )
 {
@@ -3345,7 +3342,7 @@ bool QtxWorkstack::move( QWidget* wid, QWidget* wid_to, const bool before )
 
 /*!
   \brief Group all windows in one area
-  \return TRUE if operation is completed successfully, FALSE otherwise
+  \return \c true if operation is completed successfully, \c false otherwise
 */
 void QtxWorkstack::stack()
 {