Assertion in genericServiceTypePtr() when there is no service type installed

David Faure faure at kde.org
Thu Jun 14 23:13:33 BST 2007


On Thursday 14 June 2007, Jaroslaw Staniek wrote:
> Jarosław Staniek said the following, On 2007-06-14 19:22:
> > kio (KTrader): KMimeTypeTrader::weightedOffers( Kexi/Handler, Application )
>          genericServiceTypePtr = KServiceType::serviceType( genericServiceType );
>          Q_ASSERT( genericServiceTypePtr );
> //^^^^^^^ here ^^^^^^^^^
>      }
> 
> How about removing this assertion (or replacing with a warning), because 
> otherwise default "Application" (#2) argument is a nonsense as if it causes 
> assertion.

Well it's not nonsense; a system without the Application servicetype defined is a very broken
system, given that this servicetype is installed by kdelibs. Most likely you are hitting the ksycoca
bug that I just fixed.

Keep in mind that Q_ASSERT helps developers noticing very serious problems.
The end user won't hit it.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list