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

Kai Uwe Broulik noreply at phabricator.kde.org
Thu Oct 10 20:04:41 BST 2019


broulik added inline comments.

INLINE COMMENTS

> gtkconfig.cpp:34
> +GtkConfig::GtkConfig(QObject *parent, const QVariantList&) :
> +    KDEDModule(parent), configEditor {new ConfigEditor()}
> +{

We typically don't use braces for initializations, see https://techbase.kde.org/Policies/Frameworks_Coding_Style

> gtkconfig.cpp:36
> +{
> +    QGuiApplication *qapp = static_cast<QGuiApplication *>(QGuiApplication::instance());
> +    connect(qapp, &QGuiApplication::fontChanged, this, &GtkConfig::setFont);

The cast is pointless

> gtkconfig.cpp:38
> +    connect(qapp, &QGuiApplication::fontChanged, this, &GtkConfig::setFont);
> +    qDebug() << "GTK configuration module loaded";
> +}

Remove, or use categorized logging

> gtkconfig.cpp:43
> +{
> +    QString configFontName {getConfigFontName(font)};
> +    configEditor->setGtk2ConfigValue("gtk-font-name", configFontName);

const

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, ZrenBot, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191010/4dc8c4dd/attachment-0001.html>


More information about the Plasma-devel mailing list