Only one QObject can be registered on a DBus path...but that object can have
multiple adaptors, which is how you've structured it anyway.
It's considerably easier than doing everything manually through a
QDBusVirtualObject
jgrulich |
Plasma |
Only one QObject can be registered on a DBus path...but that object can have
multiple adaptors, which is how you've structured it anyway.
It's considerably easier than doing everything manually through a
QDBusVirtualObject
Checked all ifaces registered in qdbusviewer
Manually ran AddNotification, debug appeared in xdg-desktop-portal and a notification appeared
I haven't actually tested inside flatpak.
No Linters Available |
No Unit Test Coverage |
src/access.h | ||
---|---|---|
32 | explicit (and others) |
I tested it with my test application and it doesn't work. I keep getting following warnings from xdg-desktop-portal:
Terminated
I checked it and all services seems to be registered properly, but don't know why it doesn't work. Reverting this change makes it immediately working. Also please look into Inhibit.cpp where I also register dbus objects, will this still work?
I think I found out why. In documentation [1] all methods starts with capital letter, which in our case they don't. This was obviously working before when I was doing everything manually. Still my question remains about registering additional objects in Inbit.cpp.
Edit: if you decided to rename all methods, you will have to probably rename all classes as well, because some method names are identical to class name so it will be considered as a contructor.
[1] - http://flatpak.org/xdg-desktop-portal/portal-docs.html
Inhibit should be the same as that uses the virtual object from request.cpp which I haven't touched.
Ok, I'll test that later. Can you please rename all portals? I would propose renaming all (Access, AppChooser, FileChooser ....) to (AccessPortal, AppChooserPortal, FileChooserPortal ...) so we can rename all methods to start with a capital letter. Then it should magically work.
Btw. thank you for this change, I had hard times at the very beginning to make all interfaces registered under one dbus path.
Awesome!! I've tested all portals and they do work. Thanks a lot.
Btw. next time if you would like to test portals you can use my test application https://github.com/grulja/flatpak-portal-test-kde. You just need to go to flatpak-build directory and run build.sh. Then import the repo to flatpak and run the app.