Bring KNewStuffQuick to feature parity with KNewStuff(Widgets)

Authored by leinir on Sep 26 2019, 9:18 AM.

Description

Bring KNewStuffQuick to feature parity with KNewStuff(Widgets)

Summary:
Implement a new set of Qt Quick components, aimed at bringing the KNewStuffQuick submodule up to feature parity with the original QWidget based versions. This also introduces the ability for KNewStuff to handle comments. The principal components are:

  • Button A button which, when clicked, opens up a dialog with a Page as its base. Equivalent to the old Button widget.
  • Dialog A dialog (QtQuick Dialogs based) with a Page as its base. Equivalent to the old DownloadDialog (though the intention in especially Kirigami based applications would be to use a Page directly, rather than opening a dialog).
  • DialogContents The contents of the above dialog. Equivalent to the old DownloadWidget, though the same caveats apply as above.
  • DownloadItemsSheet A sheet (Kirigami.OverlaySheet based) which shows the available installable items in a KNewStuff Entry, for use when there is more than one option.
  • EntryDetails A Page (org.kde.kcm SimpleKCM based) which shows the details for a single Entry. Equivalent to the details view in the old DownloadDialog.
  • Page A Page (org.kde.kcm GridViewKCM based) which allows the management of KNewStuff entries. Functionally equivalent to the old DownloadDialog (and intended to be used directly as a page, rather than through the Dialog, though this also exists for ease of porting and integration).
  • QuestionAsker A component which forwards questions from the engine to the UI. This was supposed to be there from the start, but ended up missing in the initial version of KNewStuffQuick
  • Author A component without visual representation which provides access to named authors on an OCS server. This is intended for ease of using OCS Person information in applications (such as about dialogues and the like).

KNewStuffCore also received a couple of new bits, most importantly the addition of support for comments, and support for additional fields for authors and fetching a specific author by id.

Further, the NewStuffList and NewStuffItem components have received considerable attention and are now much more stable and capable (including the missing QuestionAsker functionality, which resulted in things like "this download file already exists" type situations not being handled, which could yield a hung application. However, as these components were only ever really used by Peruse, it seems like this was less of an issue)


The test tool


The Dialog


Detail view for one entry


The comments display for the entry shown above (using a Discover inspired delegate, with a visualisation of nesting added in, after chatting with members of the VDG about it some)


Another view mode for the entries list


A view mode (designed for highly visual content such as wallpapers) with large screenshots and more of the description


The download items sheet

Note on patch scope and intentions: This does not replace the old QWidget versions, and does not attempt to replace those with the new versions here (as discussed with @ngraham). The intention is to bring the components up to (and past) what the original QWidget versions are able to do, and at a later point switch the implementations of those widgets to using the new components, in a way which causes the least amount of impact.

Test Plan:
Use the new dialog test tool to interact with the KNewStuffQuick components

Once built and installed, this tool can be invoked (for example by pointing it at the look and feel config) by doing so:

QT_LOGGING_RULES="org.kde.knewstuff*=true" ./bin/khotnewstuff-dialog /usr/share/knsrcfiles/lookandfeel.knsrc

You can also simply launch it and then pick a knsrc file using the test tool's file picker.

Reviewers: KNewStuff, VDG, Frameworks, ahiemstra

Reviewed By: ahiemstra

Subscribers: cfeck, davidedmundson, broulik, ahiemstra, anthonyfieroni, pino, ngraham, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D21721

Details

Committed
leinirSep 27 2019, 11:22 AM
Reviewer
ahiemstra
Differential Revision
D21721: Bring KNewStuffQuick to feature parity with KNewStuff(Widgets)
Parents
R304:9a2fe18c0220: GIT_SILENT Upgrade KF5 version to 5.63.0.
Branches
Unknown
Tags
Unknown