Introduce settings page to configure plugins
ClosedPublic

Authored by elvisangelaccio on Dec 17 2016, 2:59 PM.

Details

Summary

New page in the settings dialog where the user can enable/disable plugins. The page contains a QTreeWidget which is not supported by KConfigDialog out of the box, so some glue-code was necessary to properly handle the Apply/Default buttons. ArkSettings stores a list of disabled plugins (by default, all plugins are enabled).

Things missing:

  • Proper metadata in the json files (Name/Description data in the model comes from there)
  • Proper icon the dialog
Test Plan

Enable/disable some plugins, make sure the Default/Apply buttons work as expected.

Diff Detail

Repository
R36 Ark
Lint
Lint Skipped
Unit
Unit Tests Skipped
elvisangelaccio retitled this revision from to Introduce settings page to configure plugins.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
elvisangelaccio set the repository for this revision to R36 Ark.
Restricted Application added a project: Ark. · View Herald TranscriptDec 17 2016, 2:59 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript

@andreaska Why the preferences-plugin icon is colored at this size (see screenshot)?

elvisangelaccio removed R36 Ark as the repository for this revision.

Fixed icon

@andreaska Forget my previous question :)

elvisangelaccio set the repository for this revision to R36 Ark.

We can just use Qt::UserRole (no reason to use Qt::UserRole + 1).

rthomsen accepted this revision.Dec 17 2016, 5:14 PM
rthomsen edited edge metadata.
rthomsen added inline comments.
kerfuffle/ark.kcfg
50

disabledPlugins -> DisabledPlugins, same below...

This revision is now accepted and ready to land.Dec 17 2016, 5:14 PM
rthomsen requested changes to this revision.Dec 17 2016, 5:37 PM
rthomsen edited edge metadata.

There is a bug. Steps to reproduce:

  1. Open Ark and disable any three plugins.
  2. Re-open Ark->the three disabled plugins are still disabled.
  3. Enable one of them.
  4. Close and re-open Ark->All three are enabled now.
This revision now requires changes to proceed.Dec 17 2016, 5:37 PM
elvisangelaccio edited edge metadata.

Fixed initialization bug

elvisangelaccio edited edge metadata.

Disable item if plugin is invalid and add explanation in a tooltip

rthomsen added inline comments.Dec 17 2016, 6:58 PM
kerfuffle/pluginsettingspage.cpp
57

executables -> required executables
Checks -> Check

  • Better tooltip text
  • New hasRequiredExecutables() method, isValid() is not what we want here (disabled plugins are always invalid).
rthomsen accepted this revision.Dec 18 2016, 9:16 AM
rthomsen edited edge metadata.
This revision is now accepted and ready to land.Dec 18 2016, 9:16 AM