[Development] QFreedesktopApplication

Ilya Fedin fedin-ilja2010 at ya.ru
Sun Apr 24 08:41:31 CEST 2022


Hello, I was asked to write here about QFreedesktopApplication[1]. My
main intention was to get nice GApplication APIs that implement a
number of XDG standarts to be accessble by Qt applications. The main
thing is running the GApplication instance, although I made a number of
wrapping APIs to use org.freedesktop.Application-related APIs without
linking to glib for the application. Handlers for GApplication
constructor/destructor, org.freedesktop.Application handlers, the
control of command line processing by GApplication including its option
parser and single instance. I also made integration with startup
notifications and it's possible to add XDG activation token
integration. What is not covered by these wrappers, but still
interesting is
g_application_send_notification/g_application_withdraw_notification, so
one can easily send notification using
org.freedesktop.Notifications/org.freedesktop.portal.Notification/org.gtk.Notifications
without implementing all the APIs by hand. And, moreover, GNotification
is integrated with GApplication/org.freedesktop.Application and can use
its actions.

I apologize that I send this third time, but I can't find how to switch
my mail client in plain text format... Hope it will be OK this time.

[1] https://codereview.qt-project.org/c/qt/qtbase/+/407263


More information about the Development mailing list