Question regarding KDE PIM resource development

Daniel Vrátil dvratil at kde.org
Mon Aug 17 20:00:33 BST 2020


Hi Shashwat,

On Sunday, 16 August 2020 19:37:30 CEST Shashwat Jolly wrote:
> Hey everyone!
> 
> I have been developing a new resource for natively integrating EteSync
> into KDE PIM. I was mostly focused on feature implementation till now,
> but testing has revealed some shortcomings in the resource. As I am
> quite new to PIM, Akonadi, and KDE in general, I had some questions,
> listed below:
> 
> 1. Does KAddressBook let you add new address books to an existing account?
> For me, both, my resource and the Google resource fail to create new
> address books, and give me a "Duplicate Entry" error from the database
> (Error log - see [0]). Not sure what's wrong.

Looks like KAddressbook adds the same mimetype twice to the new Collection, 
which breaks some constraints in the SQL database when Akonadi tries to create 
the collection. It's a bug in Akonadi, I'll fix it asap [0].

> 2. Adding todos to calendars seems possible in KOrganizer
> When adding a new todo, it offers a list of all the calendars and task
> lists available - it should ideally only show tasks lists, right?
> Again, this is the same case for my resource and the existing Google
> resource.

Looks like a bug in the IncidenceEditor, added to Phabricator [1].

> 3. If something in the itemAdded(), collectionAdded() (and similar
> signals) fails, can we remove the event or collection from showing up?
> Right now, if it fails, the item or collection stays visible there.

As of now, no. There's a known limitation in Akonadi that I'm working on fixing 
for a long time now. Basically when uploading an Item to the backend storage 
(IMAP, Google, EteSync server etc.) fails (and if the Resource calls 
'cancelTask()' instead of 'deferTask()'), Akonadi will never try to do upload 
the Item to the server again and it will only exist on your computer.

Right now, if the error is in any way recoverable, the Resource implementation 
should either try again (without letting anyone know), or it should at least 
deferTask() and try again later.

There's no way to hide the item from the user, since that would mean the data 
that the user has create would be in no way reachable to the user anymore.

I hope to be able to address this issue at some point soon ;)

/Dan 

[0] https://phabricator.kde.org/T13510
[1] https://phabricator.kde.org/T13511

> 
> You can see the code for the new resource here:
> https://invent.kde.org/sjolly/kdepim-runtime/-/tree/etesyncResource/resource
> s/etesync
> 
> [0] https://pastebin.com/0TeWueUm
> 
> Thanks,
> Shashwat Jolly
> IRC: sjolly on Freenode
> www.thejollyblog.tech


-- 
Daniel Vrátil
www.dvratil.cz | dvratil at kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)

GPG Key: 0x4D69557AECB13683
Fingerprint: 0ABD FA55 A4E6 BEA9 9A83 EA97 4D69 557A ECB1 3683
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200817/3cda84a8/attachment.sig>


More information about the kde-pim mailing list