author | mickeyl <mickeyl> | 2003-03-30 02:54:37 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-03-30 02:54:37 (UTC) |
commit | 15ee85466704072173296ff4f0f446cd8fe81d1e (patch) (unidiff) | |
tree | d497cb855ee8ee6533f2efd5b064cef4dc2bb16b /libopie2/qt3/opieui/ocombobox.cpp | |
parent | 1d5a00fa8db662c4a5f6490d26d4e2ef1836f118 (diff) | |
download | opie-15ee85466704072173296ff4f0f446cd8fe81d1e.zip opie-15ee85466704072173296ff4f0f446cd8fe81d1e.tar.gz opie-15ee85466704072173296ff4f0f446cd8fe81d1e.tar.bz2 |
convert dynamic_cast<> to using QObject::inherits
Diffstat (limited to 'libopie2/qt3/opieui/ocombobox.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/qt3/opieui/ocombobox.cpp | 5 |
1 files changed, 4 insertions, 1 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 | |||
@@ -311,25 +311,28 @@ OCompletionBox * OComboBox::completionBox( bool create ) | |||
311 | 311 | ||
312 | // QWidget::create() turns off mouse-Tracking which would break auto-hiding | 312 | // QWidget::create() turns off mouse-Tracking which would break auto-hiding |
313 | void OComboBox::create( WId id, bool initializeWindow, bool destroyOldWindow ) | 313 | void OComboBox::create( WId id, bool initializeWindow, bool destroyOldWindow ) |
314 | { | 314 | { |
315 | QComboBox::create( id, initializeWindow, destroyOldWindow ); | 315 | QComboBox::create( id, initializeWindow, destroyOldWindow ); |
316 | //OCursor::setAutoHideCursor( lineEdit(), true, true ); | 316 | //OCursor::setAutoHideCursor( lineEdit(), true, true ); |
317 | } | 317 | } |
318 | 318 | ||
319 | void OComboBox::setLineEdit( OLineEdit *edit ) | 319 | 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. |
327 | if ( d->olineEdit ) { | 330 | if ( d->olineEdit ) { |
328 | connect( d->olineEdit, SIGNAL( completion( const QString& )), | 331 | connect( d->olineEdit, SIGNAL( completion( const QString& )), |
329 | SIGNAL( completion( const QString& )) ); | 332 | SIGNAL( completion( const QString& )) ); |
330 | connect( d->olineEdit, SIGNAL( substringCompletion( const QString& )), | 333 | connect( d->olineEdit, SIGNAL( substringCompletion( const QString& )), |
331 | SIGNAL( substringCompletion( const QString& )) ); | 334 | SIGNAL( substringCompletion( const QString& )) ); |
332 | connect( d->olineEdit, | 335 | connect( d->olineEdit, |
333 | SIGNAL( textRotation( OCompletionBase::KeyBindingType )), | 336 | SIGNAL( textRotation( OCompletionBase::KeyBindingType )), |
334 | SIGNAL( textRotation( OCompletionBase::KeyBindingType )) ); | 337 | SIGNAL( textRotation( OCompletionBase::KeyBindingType )) ); |
335 | connect( d->olineEdit, | 338 | connect( d->olineEdit, |