[Nepomuk] Disabling the automatic watching of resources

Vishesh Handa me at vhanda.in
Tue Jan 22 11:14:55 UTC 2013


On Tue, Jan 22, 2013 at 3:00 PM, David Faure <faure at kde.org> 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, faure at kde.org, http://www.davidfaure.fr
> Working on KDE, in particular KDE Frameworks 5
>
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk
>



-- 
Vishesh Handa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20130122/0fe1debc/attachment-0001.html>


More information about the Nepomuk mailing list