From e8963ac218069133dc35046bd93d4ca6cf19a1f9 Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 10 Jan 2007 10:41:47 +0000 Subject: [PATCH] no message --- src/QDS/QDS_ComboBox.cxx | 11 ++++++++--- src/QDS/QDS_Datum.cxx | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/QDS/QDS_ComboBox.cxx b/src/QDS/QDS_ComboBox.cxx index 478f7187b..bded8fd27 100644 --- a/src/QDS/QDS_ComboBox.cxx +++ b/src/QDS/QDS_ComboBox.cxx @@ -276,7 +276,12 @@ void QDS_ComboBox::reset() int id = -1; QString aDefValue = defaultValue(); if ( !aDefValue.isEmpty() ) - id = aDefValue.toInt(); + { + bool ok = false; + id = aDefValue.toInt( &ok ); + if ( !ok ) + id = -1; + } if ( id == -1 ) id = getId( 0 ); @@ -345,7 +350,7 @@ void QDS_ComboBox::setString( const QString& txt ) else if ( txt.isEmpty() ) { if ( !cb->editable() ) - cb->setCurrentText( txt ); + cb->setCleared( true ); else cb->lineEdit()->setText( txt ); } @@ -551,7 +556,7 @@ void QDS_ComboBox::updateComboBox() cb->updateGeometry(); if ( isClear ) - cb->setCurrentText( "" ); + cb->setCleared( true ); else { if ( getIndex( curId ) != -1 ) diff --git a/src/QDS/QDS_Datum.cxx b/src/QDS/QDS_Datum.cxx index 54fb1a383..f6054509b 100644 --- a/src/QDS/QDS_Datum.cxx +++ b/src/QDS/QDS_Datum.cxx @@ -93,7 +93,7 @@ bool QDS_Datum::Wrapper::eventFilter( QObject* o, QEvent* e ) QApplication::sendEvent( this, e ); return false; - } +} void QDS_Datum::Wrapper::setSizePolicy( QSizePolicy sp ) { -- 2.39.2