Add KAboutPluginDialog, to be used with KPluginMetaData
ClosedPublic

Authored by kossebau on Oct 29 2019, 7:59 PM.

Details

Summary

When showing an About dialog for a plugin, so far a
KAboutApplicationDialog had to be used, by generating an KAboutData object
from the KPluginMetaData object.
Using KAboutApplicationDialog has those disadvantages:

  • the icon shown in the title widget is the one of the application, not the plugin
  • the "Libraries" tab does not make much sense with a plugin, as it is the same as the shell application
  • the name KAboutApplicationDialog is a mismatch when used with a plugin
Test Plan

About application dialog works as before in applications, the new about
plugin dialog works with KDevelop's Loaded Plugins dialog as well as
KPluginSelector.

Diff Detail

Repository
R263 KXmlGui
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Oct 29 2019, 7:59 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 29 2019, 7:59 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
kossebau requested review of this revision.Oct 29 2019, 7:59 PM

Nice work.

src/kaboutplugindialog.cpp
120

(I'm surprised by the explicit '&' in all those labels, doesn't KAcceleratorManager take care of this automatically?)

src/kabstractaboutdialog_p.h
41

Coding style: there should be no space after the *, right?

src/klicensedialog_p.cpp
73

Well, the code calls resize and then adjustSize, which calls resize itself. So at least one issue is that one of those two calls is redundant. Try removing adjustSize?

kossebau marked 3 inline comments as done.Nov 20 2019, 1:16 PM
kossebau added inline comments.
src/kaboutplugindialog.cpp
120

Seems it does. So removing then while moving the code.

src/klicensedialog_p.cpp
73

Thanks for investigating. Seems indeed removing adjustSize brings (back) the intended size :)

kossebau updated this revision to Diff 70052.Nov 20 2019, 1:16 PM
kossebau marked 2 inline comments as done.

Update to first review by @dfaure

dfaure accepted this revision.Nov 23 2019, 7:58 PM
dfaure added inline comments.
src/kaboutapplicationdialog.cpp
70–71

(this line does nothing, dialogs aren't modal by default)

src/kaboutplugindialog.cpp
79

(this line does nothing, dialogs aren't modal by default)

This revision is now accepted and ready to land.Nov 23 2019, 7:58 PM
This revision was automatically updated to reflect the committed changes.
kossebau marked 2 inline comments as done.