[Nepomuk] Review Request: Fix initialized state querying for instances of resource manager created after service startup.

Christian Mollekopf chrigi_1 at fastmail.fm
Fri Oct 19 15:05:38 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106835/#review20574
-----------------------------------------------------------


I had the same issue in the Nepomuk Feeder and worked around it by calling Nepomuk::ResourceManager::instance()->init(), but I'd welcome this fix.

- Christian Mollekopf


On Oct. 13, 2012, 7:31 p.m., Till Adam wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106835/
> -----------------------------------------------------------
> 
> (Updated Oct. 13, 2012, 7:31 p.m.)
> 
> 
> Review request for Nepomuk and Vishesh Handa.
> 
> 
> Description
> -------
> 
> If one calls ResourceManager::instance()->initialized() in a new process, where instance() is newly created, with the service already properly running, the result is currently false. This is because while the ctor connects to the services initialized signal and reacts to it, it does not call init() if the service is already up. This patch attempts to rectify this by checking via dbus if the service is up in the ctor and if so, initializing proactively.
> 
> 
> Diffs
> -----
> 
>   libnepomukcore/resource/resourcemanager.cpp 2f01e47 
> 
> Diff: http://git.reviewboard.kde.org/r/106835/diff/
> 
> 
> Testing
> -------
> 
> Verify the initialized() method properly returns true in kdepim's contact completion code, which has a fall back for the "nepomuk not running" case which is often hit, atm, due to this issue.
> 
> 
> Thanks,
> 
> Till Adam
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20121019/18c2f79e/attachment.html>


More information about the Nepomuk mailing list