On Tue, Jan 22, 2013 at 3:00 PM, David Faure <[email protected]> wrote: > kmail/tagactionmanager.cpp has this code, in > TagActionManager::updateActionStates(), which is called every time the > selected message changes: > > [...] > { > Nepomuk2::Tag tag( it.key() ); > it.value()->setChecked( false ); > it.value()->setEnabled( true ); > it.value()->setText( i18n("Toggle Message Tag %1", tag.label() ) ); > } > [...] > > The call to label() calls Nepomuk2::ResourceData::property() -> > Nepomuk2::ResourceData::load() -> Nepomuk2::ResourceData::addToWatcher() -> > DBus call to "start". > > All this for a resource that is going to be deleted immediately afterwards. > Am I right that this is kind of pointless? > > Could we either: > > 1) not watch resources by default, and let apps toggle it on when wanted? > This wouldn't be "behavior compatible" though, so I suppose it's arguable > if > this should be done in 4.x. However I don't really know in which cases > resources change, so I don't know if most users of a resource care, or > don't > care. What's a resource anyway? Clearly tags are, I suppose emails are, > what > else? >
This behaviour was added in 4.8, and so far hasn't been really used by anyone or advertised. > 2) add a setWatchEnabled(false) method, and sprinkle that over every use of > nepomuk resources that are temporary like the above. > I'd like to do the inverse, and explicitly enable watching. Let me ask the release team. > > -- > David Faure, [email protected], http://www.davidfaure.fr > Working on KDE, in particular KDE Frameworks 5 > > _______________________________________________ > Nepomuk mailing list > [email protected] > https://mail.kde.org/mailman/listinfo/nepomuk > -- Vishesh Handa
_______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
