D21860: Set a font for gtk applications in the fonts kcm

Kai Uwe Broulik noreply at phabricator.kde.org
Mon Aug 26 15:24:38 BST 2019


broulik added inline comments.

INLINE COMMENTS

> gikari wrote in fonts.cpp:607
> @broulik I do not understand. `KDEDModule` (which is a parent of `GtkConfig`) is `QObject`, not a `QGuiApplication`. Maybe I am missing something? You want me to create a connection with that signal within a module, so I don't have to ask from KCM to change a font via DBus?

kded (the application you're running in) is a `QApplication`, so from the constructor of your kdedmodule you could do

  #include <QApplication>
  connect(qApp, &QGuiApplication::fontChanged, this, [this](this QFont &font) {
      // now check if you have the new fonts
  });

I can't guarantee this will work (accessing `font` from there will actually deadlock :D but I am curious whether that signal is emitted properly, so you dont have to listen to or ask the font kcm to tell you.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D21860

To: gikari, #plasma, apol, davidedmundson
Cc: davidedmundson, nicolasfella, broulik, GB_2, abetts, ngraham, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190826/ba742336/attachment.html>


More information about the Plasma-devel mailing list