summaryrefslogtreecommitdiff
path: root/libopie2
Unidiff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/qt3/opieui/ocombobox.cpp5
-rw-r--r--libopie2/qt3/opieui/oeditlistbox.cpp5
2 files changed, 7 insertions, 3 deletions
diff --git a/libopie2/qt3/opieui/ocombobox.cpp b/libopie2/qt3/opieui/ocombobox.cpp
index a1dd5f5..8dbda8f 100644
--- a/libopie2/qt3/opieui/ocombobox.cpp
+++ b/libopie2/qt3/opieui/ocombobox.cpp
@@ -320,7 +320,10 @@ void OComboBox::setLineEdit( OLineEdit *edit )
320{ 320{
321 #if QT_VERSION > 290 321 #if QT_VERSION > 290
322 QComboBox::setLineEdit( edit ); 322 QComboBox::setLineEdit( edit );
323 d->olineEdit = dynamic_cast<OLineEdit*>( edit ); 323 if ( !edit->inherits( "OLineEdit" ) )
324 d->olineEdit = 0;
325 else
326 d->olineEdit = static_cast<OLineEdit*>( edit );
324 setDelegate( d->olineEdit ); 327 setDelegate( d->olineEdit );
325 328
326 // forward some signals. We only emit returnPressed() ourselves. 329 // forward some signals. We only emit returnPressed() ourselves.
diff --git a/libopie2/qt3/opieui/oeditlistbox.cpp b/libopie2/qt3/opieui/oeditlistbox.cpp
index 3c53552..0e95274 100644
--- a/libopie2/qt3/opieui/oeditlistbox.cpp
+++ b/libopie2/qt3/opieui/oeditlistbox.cpp
@@ -411,6 +411,7 @@ void OEditListBox::virtual_hook( int, void* )
411OEditListBox::CustomEditor::CustomEditor( OComboBox *combo ) 411OEditListBox::CustomEditor::CustomEditor( OComboBox *combo )
412{ 412{
413 m_representationWidget = combo; 413 m_representationWidget = combo;
414 m_lineEdit = dynamic_cast<OLineEdit*>( combo->lineEdit() ); 414 assert( combo->lineEdit()->inherits( "OLineEdit" ) );
415 assert( m_lineEdit ); 415 m_lineEdit = static_cast<OLineEdit*>( combo->lineEdit() );
416
416} 417}