D25006: Make sure -dpi value is valid

David Edmundson noreply at phabricator.kde.org
Wed Nov 20 21:19:11 GMT 2019


davidedmundson added a comment.


  Turning a number into a string and back again isn't ideal
  
  I would suggest:
  
    int dpiValue = dpiConfigGroup.readEntry("forceFontDPI", -1);
    
    
    if (dpiValue  > 24) {
         const QString dpiArgument = QStringLiteral("-dpi ") + QString::number(dpiValue);
        args[QStringLiteral("kde_settings.conf/X11/ServerArguments")] = dpiArgument;
    }
  
  Though I'm not sure I fully understand why we have this sort of wrong value in the config anyway?
  
  Also do we want
  
    } else {
            args[QStringLiteral("kde_settings.conf/X11/ServerArguments")] = QString();
    }
  
  so that a broken DPI wipes the old config entry out? Not sure.

REPOSITORY
  R123 SDDM Configuration Panel (KCM)

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

To: gcraciunescu, filipf, #plasma, ngraham, davidedmundson
Cc: davidedmundson, ngraham, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, alexeymin, 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/20191120/f14f63be/attachment.html>


More information about the Plasma-devel mailing list