Some other things -<br><br><b>4.</b> In <b>ResourceData::resetAll</b> - shouldn't <b>m_cacheDirty = false </b>be equal to true? Considering resetAll is called when the resource is being Removed, it shouldn't make a any difference. Still, just to be on the safer side.<br>
<br><b>5. Error Checking: </b>There is considerable error checking in Nepomuk::ResouceFilterModel where <i>Soprano::Error</i>s are returned, but after that it all stops. Particularly in ResourceData and Resource. We could make the Resource class return Error codes or simply boolean values in functions like SetProperty. <br>
<br>That would mean additional error checking from the users side, and would result in ugly code. This is one of cases where I would love to use exceptions.<br><br><b>6. Destructors: </b>Shouldn't ResourceManagerPrivate have a destructor where it clears out the remaining ResouceData in m_initializedData and other? I know ResourceData::resetAll removes them, but it feels wrong not to check them just in case.<br>
<br><b>7.</b> <b>ResourceManagerPrivate::dataCacheFull()</b>: Why 1000? I think this value should be customizable. <br><br><b>8.</b> <b>ResourceManager::allResourcesWithProperty</b>: They seem to be using a QList internally and using the QList:contains() functions quite frequently. Considering QList isn't sorted, i think it would be quite costly -> O(n). How about using a QSet? The only problem is the added QSet::toList() in the end, which shouldn't be too slow. (Max O(n)). I've provided a patch.<br>
<br>- Vishesh Handa<br>