summaryrefslogtreecommitdiff
path: root/libopie2
authormickeyl <mickeyl>2003-03-30 02:54:37 (UTC)
committer mickeyl <mickeyl>2003-03-30 02:54:37 (UTC)
commit15ee85466704072173296ff4f0f446cd8fe81d1e (patch) (side-by-side diff)
treed497cb855ee8ee6533f2efd5b064cef4dc2bb16b /libopie2
parent1d5a00fa8db662c4a5f6490d26d4e2ef1836f118 (diff)
downloadopie-15ee85466704072173296ff4f0f446cd8fe81d1e.zip
opie-15ee85466704072173296ff4f0f446cd8fe81d1e.tar.gz
opie-15ee85466704072173296ff4f0f446cd8fe81d1e.tar.bz2
convert dynamic_cast<> to using QObject::inherits
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
@@ -322,3 +322,6 @@ void OComboBox::setLineEdit( OLineEdit *edit )
QComboBox::setLineEdit( edit );
- d->olineEdit = dynamic_cast<OLineEdit*>( edit );
+ if ( !edit->inherits( "OLineEdit" ) )
+ d->olineEdit = 0;
+ else
+ d->olineEdit = static_cast<OLineEdit*>( edit );
setDelegate( d->olineEdit );
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
@@ -413,4 +413,5 @@ OEditListBox::CustomEditor::CustomEditor( OComboBox *combo )
m_representationWidget = combo;
- m_lineEdit = dynamic_cast<OLineEdit*>( combo->lineEdit() );
- assert( m_lineEdit );
+ assert( combo->lineEdit()->inherits( "OLineEdit" ) );
+ m_lineEdit = static_cast<OLineEdit*>( combo->lineEdit() );
+
}