KMail: configure plugin fixes for Akonadi instances
ClosedPublic

Authored by winterz on Jul 4 2017, 10:51 PM.

Details

Summary

Now I can load , configure , change and save the akonadi agents properly when using akonadi instance.

also added more description to the debug statements

Diff Detail

Repository
R206 KMail
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
winterz created this revision.Jul 4 2017, 10:51 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptJul 4 2017, 10:51 PM
Restricted Application added a subscriber: KDE PIM. · View Herald Transcript
mlaurent requested changes to this revision.Jul 5 2017, 4:43 AM
mlaurent added inline comments.
src/configuredialog/configureplugins/configurepluginslistwidget.cpp
252

I don't understand you need to add .instanceIdentifier to list of agent ?
so agent doesn't have .instanceIdentifier() ?

So I don't understand.
Why instance doesn't have .instanceIdentifier() ?

could you verify which name have each instance in your system please ?

This revision now requires changes to proceed.Jul 5 2017, 4:43 AM
dvratil requested changes to this revision.Jul 5 2017, 6:50 AM
dvratil added inline comments.
src/configuredialog/configureplugins/configurepluginslistwidget.cpp
252

On l.249 we append the instance identifier to the service variable (which despite its name only contains the agent identifier like akonadi_foo_agent), so we need to append it to the id here too, otherwise the comparison on l.256 would never match.

The question is if we really need to append the instance identifier to the service in the first place. I think we don't and that better fix would be just to remove l.248-l.250, and ideally rename interfaceName to agentIdentifier or something similar. This code has nothing to do with DBus, so I don't see a reason to use DBus terminology here.

winterz added a comment.EditedJul 5 2017, 2:41 PM

when I rollback the changes in createAgentPluginData(), I can no longer configure the agents in the plugin settings dialog. and I see the debug message
"org.kde.pim.kmail: interface does not exist when trying to configure the plugin"

when I say "rollback" I mean back to before Laurent added the initial code for dealing with instances.

Ah, I did not notice that the service is being stored in extraInfo, I presume it's used somewhere for the Dbus service - I think it would be better if only the agent identifier would be stored and the code that uses it as part of Dbus service would append the Akonadi instance identifier, but that is probably out-of-scope for this patch.

what should I do with this patch?

dvratil accepted this revision.Jul 27 2017, 9:00 AM

Laurent, do you object? or can I commit this?

Laurent, I lost this local patch and that broke some things.
Can I commit?

patch doesn't apply cleanly anymore. I'll upload a new patch

winterz updated this revision to Diff 23303.Dec 2 2017, 6:18 PM

updated patch that that

  1. applies cleanly to master
  2. addresses Laurent's concerns
  3. renames the interface variable to agent, as requested by Dan
mlaurent accepted this revision.Dec 3 2017, 7:49 AM
This revision is now accepted and ready to land.Dec 3 2017, 7:49 AM
This revision was automatically updated to reflect the committed changes.