Revision 52840e5...
Go back to digest for 17th March 2013Optimization in KDE-PIM
Simplify the Nepomuk data extraction Code
Instead of using the Nepomuk property URIs as keys in ContactItem we now
use the roles instead. This simplifies the data extraction part from the
model as we can keep a direct mapping in the query (Binding Name => Role)
Additionally, the ContactItem class could also load the data on its own
by using the Nepomuk Resource class. It now uses the same query as the
PersonsModel and fetches all the data in one go. This is much faster and
simpler. Though, it results in a little bit of code duplication.
And finally, the ResourceWatcher now reloads the contacts which are
modified instead of just changing those specific properties. This is
done because in many cases such as - ImAccounts, Emails, Photos, and
ContactGroups, one needs to query the Nepomuk DB in order to fetch more
information.
REVIEW: 109481
File Changes
- src/contact-item.cpp
- src/contact-item.h
- src/person-item.cpp
- src/persons-model.cpp
- src/resource-watcher-service.cpp
- src/resource-watcher-service.h
- src/tests/duplicatestest.cpp