From kde-commits Mon Mar 27 21:50:10 2006 From: David Faure Date: Mon, 27 Mar 2006 21:50:10 +0000 To: kde-commits Subject: koffice/interfaces Message-Id: <1143496210.783408.3509.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=114349622122323 SVN commit 523319 by dfaure: Don't use inherits(), it's fragile M +5 -3 koChart.cc --- trunk/koffice/interfaces/koChart.cc #523318:523319 @@ -47,9 +47,11 @@ WizardExtension *Part::wizardExtension() { QObjectList::ConstIterator end( QObject::children().end() ); - for (QObjectList::ConstIterator it( QObject::children().begin() ); it != end; ++it ) - if ( (*it)->inherits( "KoChart::WizardExtension" ) ) - return static_cast( *it ); + for (QObjectList::ConstIterator it( QObject::children().begin() ); it != end; ++it ) { + WizardExtension* we = ::qobject_cast( *it ); + if ( we ) + return we; + } return 0; }