From: vsr Date: Wed, 22 Jun 2016 17:28:44 +0000 (+0300) Subject: Small addition to commit 02eb44be: fix regression related to QtxComboBox's signal... X-Git-Tag: V8_1_0a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e1c3e4b68651a27c60137f1910d5c6ca9fad3c92;p=modules%2Fgui.git Small addition to commit 02eb44be: fix regression related to QtxComboBox's signal activatedId(int). --- diff --git a/src/Qtx/QtxComboBox.cxx b/src/Qtx/QtxComboBox.cxx index c9da713ac..59f270182 100755 --- a/src/Qtx/QtxComboBox.cxx +++ b/src/Qtx/QtxComboBox.cxx @@ -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 +*/ diff --git a/src/Qtx/QtxComboBox.h b/src/Qtx/QtxComboBox.h index 45cad6740..52f159542 100755 --- a/src/Qtx/QtxComboBox.h +++ b/src/Qtx/QtxComboBox.h @@ -60,6 +60,8 @@ public: signals: void activatedId( QVariant ); + void activatedId( int ); + void activatedId( QString ); private slots: void onCurrentChanged( int );