D27785: [Fonts KCM] Change setNearestExistingFonts() to set the fonts only when necessary

Ahmad Samir noreply at phabricator.kde.org
Mon Mar 9 10:43:05 GMT 2020


ahmadsamir marked 3 inline comments as done.
ahmadsamir added inline comments.

INLINE COMMENTS

> bport wrote in fonts.cpp:115
> You can use && to have only one if there

OK.

> bport wrote in fonts.cpp:552
> Those change will compare font twice, here and on setters so I will keep old code there

Indeed; looking at the code generated by kconfig compiler in <builddir>/kcms/fonts/fontsettings.h:

  /**
    Set General font
  */
  void setFont( const QFont & v )
  {
    if (v != mFont && !isFontImmutable()) {
      mFont = v;
      Q_EMIT fontChanged();
    }
  }

I will revert. And another point is that the code in fonts.cpp doesn't need to check for immutability since it's checked by the setters.

> bport wrote in fonts.cpp:576
> I will keep that until we have a proper tested fix for https://phabricator.kde.org/D27452
> can prevent bug and ensure apply button is on the good state on all case

OK, fair point, I will revert that bit.

REPOSITORY
  R119 Plasma Desktop

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

To: ahmadsamir, #plasma, davidedmundson, broulik, ervin, meven
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200309/2014e97b/attachment-0001.html>


More information about the Plasma-devel mailing list