D26903: allow programLogo property to be a QIcon, too

Christoph Cullmann noreply at phabricator.kde.org
Sat Jan 25 16:25:02 GMT 2020


cullmann added a comment.


  Would something like this be ok?
  
  Not sure what to write about sizes, e.g. for the program icon we don't mention anything either.
  
  The QPixmap case was missing in the docs, too, btw.
  
    diff --git a/src/lib/kaboutdata.h b/src/lib/kaboutdata.h
    index 7b317f7..c9f8da0 100644
    --- a/src/lib/kaboutdata.h
    +++ b/src/lib/kaboutdata.h
    @@ -750,8 +750,10 @@ public:
          * Use this if you need to have an application logo
          * in AboutData other than the application icon.
          *
    -     * Because KAboutData is a core class it cannot use QImage directly,
    -     * so this is a QVariant that should contain a QImage.
    +     * Because KAboutData is a core class it cannot use QImage/QPixmap/QIcon directly,
    +     * so this is a QVariant that should contain a QImage/QPixmap/QIcon.
    +     *
    +     * QIcon should be preferred, to be able to properly handle HiDPI scaling.
          *
          * @param image logo image.
          * @see programLogo()
    @@ -964,8 +966,8 @@ public:
         /**
          * Returns the program logo image.
          *
    -     * Because KAboutData is a core class it cannot use QImage directly,
    -     * so this is a QVariant containing a QImage.
    +     * Because KAboutData is a core class it cannot use QImage/QPixmap/QIcon directly,
    +     * so this is a QVariant containing a QImage/QPixmap/QIcon.
          *
          * @return the program logo data, or a null image if there is
          *         no custom application logo defined.

REPOSITORY
  R263 KXmlGui

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

To: cullmann, apol
Cc: kossebau, dhaumann, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200125/db02d09f/attachment.html>


More information about the Kde-frameworks-devel mailing list