Improve KNotification API docs
Needs ReviewPublic

Authored by nicolasfella on Jan 25 2020, 3:26 PM.

Details

Summary

Various improvements. Better examples, updated coding style for the examples, removed some obsolete things.

There's room for more improvements, but this is a first step

Diff Detail

Branch
arcpatch-D26918
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 27171
Build 27189: arc lint + arc unit
nicolasfella created this revision.Jan 25 2020, 3:26 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 25 2020, 3:26 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
nicolasfella requested review of this revision.Jan 25 2020, 3:26 PM
apol added a subscriber: apol.Feb 16 2020, 4:04 PM

+1 on improving the documentation, it does read dated. Thanks!

src/knotification.h
36–37

This entirely changes the semantics. Might still be correct but it could make sense to make sure that's the case?
At least, for an action the user triggers should still be a feedback event, right?

36–37

persistence is not about being important. It's because it stays relevant over time, which ironically the battery example kind of feels weird because over time the laptop will just run out of juice.

36–37

It could make sense to specify the cmake syntax to do that?

install(FILES appname.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})

nicolasfella added inline comments.Feb 16 2020, 7:32 PM
src/knotification.h
36–37

I feel like the whole paragraph should link to the HIG instead
https://hig.kde.org/platform/notification.html

O - Add a dedicated main page and link to the HIG from there

nicolasfella added inline comments.Feb 16 2020, 8:27 PM
src/knotification.h
36–37

Don't we have that already below?

  • Move most content to main page
apol added a subscriber: class.Feb 17 2020, 12:13 AM

Let's do this. +1

Mainpage.dox
10

@class so we create a link.

jucato added inline comments.Feb 17 2020, 3:46 AM
src/knotification.h
96

Maybe we should keep this part that the icon name, especially that it has to be one that can be found by KIconLoader.

apol added inline comments.Feb 17 2020, 2:44 PM
src/knotification.h
96

Since Qt5 KIconLoader is an implementation detail. Even our apps and frameworks use QIcon::fromTheme, I haven't looked at what KNotifications does but pretty sure it's using QIcon.

broulik added inline comments.Feb 17 2020, 2:45 PM
src/knotification.h
96

It actually sends out the icon name as a string and plasmashell then looks it up.

apol added inline comments.Feb 17 2020, 2:47 PM
src/knotification.h
96

With QIcon?

nicolasfella added inline comments.Mar 24 2020, 11:39 PM
Mainpage.dox
10

Doxygen should do that automatically
http://www.doxygen.nl/manual/autolink.html

nicolasfella updated this revision to Diff 78416.EditedMar 24 2020, 11:43 PM
  • Fix code example
  • Drop user config file description since it's an implementation detail
cblack requested changes to this revision.Apr 13 2020, 11:05 PM
cblack added a subscriber: cblack.
cblack added inline comments.
Mainpage.dox
14

Use @c

16

Ditto

20

Bad documentation style: warning block should be entirely self-contained in what it's conveying.

26

Use markdown syntax, not inline HTML.

34

@code and @endcode or use markdown

47

Ditto

62

Ditto

111

Use docs/Doxyfile.local for configuration overrides. Examples exclude is unnecessary because it's set as Doxygen's example path.

This revision now requires changes to proceed.Apr 13 2020, 11:05 PM
nicolasfella marked 8 inline comments as done.
  • Address comments