[Nepomuk] Nepomuk::File crash

Matthias Fuchs mat69 at gmx.net
Wed Apr 6 17:40:25 CEST 2011


The Nepomuk::File constructor is not correct and crashes as a result.

It is:
File( const KUrl& url = KUrl(), ResourceManager* manager = 0 ) : : Resource( 
url, Nepomuk::Vocabulary::NFO::FileDataObject(), manager ) {}

Yet the Resource(url, nepomukUri, manager) expects the manager to be _not_ 0, 
thus crashing if it is.

Imo this should be either be fixed in Resource by allowing non 0 values or in 
file via modifying the constructor.

Not sure if the later would work in terms of binary concerns.
So I don't know if

- File( const KUrl& url = KUrl(), ResourceManager* manager = 0 );
+ explicit File(const KUrl& url = KUrl());
+ File( const KUrl& url, ResourceManager* manager );

would be binary compatible.



More information about the Nepomuk mailing list