Show application window icon on AboutPage
ClosedPublic

Authored by caspermeijn on Aug 18 2019, 10:48 AM.

Details

Summary

With this it is not nessecary to KAboutData::setProgramLogo. If the
QApplication::setWindowIcon is set, then the AboutPage will
automatically use that icon.

Test Plan

Tested with Discover, with only setWindowIcon, only setProgramLogo and
both setWindowIcon and setProgramLogo

Diff Detail

Repository
R169 Kirigami
Branch
about_icon (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15257
Build 15275: arc lint + arc unit
caspermeijn created this revision.Aug 18 2019, 10:48 AM
Restricted Application added a project: Kirigami. · View Herald TranscriptAug 18 2019, 10:48 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
caspermeijn requested review of this revision.Aug 18 2019, 10:48 AM

I am not sure about the version numbers and the return type. Did I choose the correct ones?

ngraham added a subscriber: ngraham.
ngraham added inline comments.
src/settings.h
79

2.10 actually (this is super confusing, I know)

apol added a comment.Aug 18 2019, 10:51 PM

+1 LGTM, please address the @since bit

src/settings.h
81

It could make sense to include the REVISION part:
https://doc.qt.io/qt-5/properties.html

hein accepted this revision.Aug 19 2019, 2:39 AM
This revision is now accepted and ready to land.Aug 19 2019, 2:39 AM
hein added a comment.EditedAug 19 2019, 2:48 AM

I was looking into this recently and added the component name getter, which does the trick for me and is much nicer to use than setting the program logo. So in some sense this is not strictly necessary, and also it would really be better if the window icon was part of the Qt.application upstream API in QML. It's still an okay workaround though. Let's see what Marco thinks.

Fixed since version number

caspermeijn marked an inline comment as done.Aug 24 2019, 7:57 PM
caspermeijn added inline comments.
src/settings.h
81

I have no idea what the value would be for that and Kirigami doesn't have any example.

sitter added a subscriber: sitter.Aug 26 2019, 9:19 AM
sitter added inline comments.
src/settings.h
81

https://doc.qt.io/qt-5/qtqml-cppintegration-definetypes.html#type-revisions-and-versions

tldr:

  • add REVISON 10 to property
  • change krigiamiplugin.cpp to register that revision

I am not sure how that would work for a singletontype though, one always needs all properties since any revision may be used at any time.
@apol are you sure this makes sense for singletons?

This comment was removed by bcooksley.
bcooksley removed a subscriber: fsitter.

Can I do anything for this to get merged?

mart accepted this revision.Dec 11 2019, 10:28 AM

It looks quite weird to have it in something called "Settings", tough.. i' fine (in kf6 should really be renamed to something more sensible)

I agree with Eike that it would be better for it to be in Qt.Application, but i'm fine with it for now

This revision was automatically updated to reflect the committed changes.