[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/interfaces
From: David Faure <faure () kde ! org>
Date: 2006-03-27 21:50:10
Message-ID: 1143496210.783408.3509.nullmailer () svn ! kde ! org
[Download RAW message or body]
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<WizardExtension *>( *it );
+ for (QObjectList::ConstIterator it( QObject::children().begin() ); it != end; ++it ) {
+ WizardExtension* we = ::qobject_cast<WizardExtension *>( *it );
+ if ( we )
+ return we;
+ }
return 0;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic