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

Kai Uwe Broulik noreply at phabricator.kde.org
Mon Sep 16 15:14:10 BST 2019


broulik added inline comments.

INLINE COMMENTS

> gikari wrote in fonts.cpp:607
> So, I wrote this:
> 
>   GtkConfig::GtkConfig(QObject *parent, const QVariantList&) :
>       KDEDModule(parent), configEditor {new ConfigEditor()}
>   {
>       qDebug() << "Parent: " << parent;
>       QGuiApplication *qapp = static_cast<QGuiApplication *>(parent);
>       qDebug() << "Qapp: " << qapp;
>       connect(qapp, &QGuiApplication::fontChanged, this, [this](const QFont &font) {
>           qDebug() << "Font recieved";
>           qDebug() << font;
>       });
>       qDebug() << "GTK configuration module loaded";
>   }
> 
> And when I save fonts via KCM nothing (Except the "parent", "qapp" and "GTK ..." lines) was printed in konsole, where I run Kded5.  So, it means signal was not send?

Are you sure `parent` is a `QGuiApplication`? I don't think so. Perhaps you want to connect to `QGuiApplication::instance()` instead.

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/20190916/6e456c7a/attachment.html>


More information about the Plasma-devel mailing list