Add new Account portal
ClosedPublic

Authored by jgrulich on Mar 2 2020, 1:59 PM.

Details

Reviewers
ngraham
Group Reviewers
Plasma
Commits
R838:75a8fa728347: Add new Account portal
Summary

Account portal allows applications to get information from libaccount.

Screenshot of the dialog:

Diff Detail

Repository
R838 Flatpak Support: KDE Portal for XDG Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jgrulich created this revision.Mar 2 2020, 1:59 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 2 2020, 1:59 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
jgrulich requested review of this revision.Mar 2 2020, 1:59 PM
jgrulich edited the summary of this revision. (Show Details)Mar 2 2020, 2:00 PM
jgrulich edited the test plan for this revision. (Show Details)
jgrulich added a reviewer: Plasma.
jgrulich edited the summary of this revision. (Show Details)
jgrulich edited the test plan for this revision. (Show Details)

UserInfoDialog.qml an Item with a Rectangle in it, could you use a Window?

https://doc.qt.io/qt-5/qml-qtquick-window-window.html

UserInfoDialog.qml an Item with a Rectangle in it, could you use a Window?

https://doc.qt.io/qt-5/qml-qtquick-window-window.html

I don't think that would be correct use, in my case it's a QDialog, with a QML content, while Window (qml one) would be used if I don't use QDialog.

How can I test this?

How can I test this?

I don't know if there is any application using this, but I test it with my testing application in libportal.

You can get it here: https://github.com/grulja/libportal/tree/qt-wrapper

You need to clone the repo, go to "qt-wrapper" branch and build it, then in portal-test-qt folder there will be a simple Qt application.

Ok. When trying to compile I get the following:

In file included from ../libportal/portal-qt5.h:20,
                 from libportal-qt/a370903@@LibPortalQt@sha/../../../libportal-qt/portal_p.h:24,
                 from libportal-qt/a370903@@LibPortalQt@sha/../../../libportal-qt/parent_p.h:21,
                 from libportal-qt/a370903@@LibPortalQt@sha/moc_parent_p.cpp:10:
../libportal/portal.h:20:10: fatal error: libportal/portal-enums.h: No such file or directory
   20 | #include <libportal/portal-enums.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~

More generally, what does this thing do? What's it for?

Ok. When trying to compile I get the following:

In file included from ../libportal/portal-qt5.h:20,
                 from libportal-qt/a370903@@LibPortalQt@sha/../../../libportal-qt/portal_p.h:24,
                 from libportal-qt/a370903@@LibPortalQt@sha/../../../libportal-qt/parent_p.h:21,
                 from libportal-qt/a370903@@LibPortalQt@sha/moc_parent_p.cpp:10:
../libportal/portal.h:20:10: fatal error: libportal/portal-enums.h: No such file or directory
   20 | #include <libportal/portal-enums.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~

More generally, what does this thing do? What's it for?

Do you mean libportal or this portal? Libportal is a library for applications to use portal support without need to do all the calls themself over DBus and they can use a much friendly API.

This portal allows application to get user name, user real name and user avatar. Normally applications outside sandbox have DBus access so they can query libaccount themself, but given sandbox restrictions, you have to go through a portal and that's why we show a dialog, asking the user whether he wants to provide information to the sadboxed application. The dialog will always look the same, it will just have different user name, real name and picture and reason why the application needs the access.

ngraham accepted this revision.Mar 23 2020, 4:26 PM

Ah, thanks. LGTM. Would you be okay with me submitting a patch to alter/polish the UI after it lands?

This revision is now accepted and ready to land.Mar 23 2020, 4:26 PM

Ah, thanks. LGTM. Would you be okay with me submitting a patch to alter/polish the UI after it lands?

Absolutely!

This revision was automatically updated to reflect the committed changes.