Salome HOME
Small addition to commit 02eb44be: fix regression related to QtxComboBox's signal...
authorvsr <vsr@opencascade.com>
Wed, 22 Jun 2016 17:28:44 +0000 (20:28 +0300)
committervsr <vsr@opencascade.com>
Wed, 22 Jun 2016 17:28:44 +0000 (20:28 +0300)
src/Qtx/QtxComboBox.cxx
src/Qtx/QtxComboBox.h

index c9da713acbe8177eb9b7dd6f7ac84ab5b077c23a..59f27018228aee53739e04bd3bd16d7ba448e10d 100755 (executable)
@@ -241,7 +241,12 @@ void QtxComboBox::onCurrentChanged( int idx )
   if ( idx != -1 )
   {
     resetClear();
+    QVariant ident = id( idx );
     emit activatedId( id( idx ) );
+    if ( ident.type() == QVariant::Int )
+      emit activatedId( ident.toInt() );
+    else if ( ident.type() == QVariant::String )
+      emit activatedId( ident.toString() );
   }
 }
 
@@ -291,7 +296,19 @@ bool QtxComboBox::hasId( const int idx ) const
 }
 
 /*!
-  \fn void QtxComboBox::activatedId( int ident )
+  \fn void QtxComboBox::activatedId( QVariant ident )
   \brief Emitted when item with identificator \a ident is activated.
   \param ident item's identifier
 */
+
+/*!
+  \fn void QtxComboBox::activatedId( int ident )
+  \brief Emitted when item with integer identificator \a ident is activated.
+  \param ident item's identifier
+*/
+
+/*!
+  \fn void QtxComboBox::activatedId( QString ident )
+  \brief Emitted when item with string identificator \a ident is activated.
+  \param ident item's identifier
+*/
index 45cad6740af77b61fb2e44e7634fe673665cc98d..52f1595420dda8868d4d3753b437ed5920e20170 100755 (executable)
@@ -60,6 +60,8 @@ public:
 
 signals:
   void         activatedId( QVariant );
+  void         activatedId( int );
+  void         activatedId( QString );
 
 private slots:
   void         onCurrentChanged( int );