[GTK Config] Parameterise GTK config editing
ClosedPublic

Authored by gikari on Feb 2 2020, 1:45 PM.

Details

Summary

This diff is only touches the editing part of the ConfigEditor.

Changes:

  1. Pass config values as the respecting types: int, bool and string. This simplifies config editing in some extent - no more hardcoded options names, that requires quotes around values in gtkrc-2.0 and xsettingsd.conf. Also it simplifies working with GSettings API and helps to transform KDE config options to GTK config options.
  2. Remove redundant \\n symbols, when adding new option in gtkrc-2.0 and xsettingsd.conf
Test Plan
  1. Restart Kded
  2. Test all settings syncing. Specifically boolean ones and enum ones, as the format in configuration files has changed:
  3. Settings.ini uses new booleans (true and false instead of 1 and 0)
  4. Settings.ini, .gtkrc-2.0 and xsettingsd.conf use int value of enum instead of string

Diff Detail

Repository
R99 KDE Gtk Configuration Tool
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gikari created this revision.Feb 2 2020, 1:45 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 2 2020, 1:45 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gikari requested review of this revision.Feb 2 2020, 1:45 PM
gikari retitled this revision from Parameterise GTK config editing to [GTK Config] Parameterise GTK config editing.Feb 25 2020, 3:24 PM
cblack requested changes to this revision.Feb 25 2020, 4:38 PM

There's a lot of string concatenation going on. I would replace a lot of the instances where you concat more than 2 strings with QString's arg function for readability purposes.

Will review more thoroughly when I get the time.

This revision now requires changes to proceed.Feb 25 2020, 4:38 PM
This comment was removed by gikari.
gikari updated this revision to Diff 77185.Mar 7 2020, 9:31 PM

Use arg instead of + + + + + +

gikari updated this revision to Diff 77909.Mar 18 2020, 12:41 PM

Rebase on master

cblack accepted this revision.Apr 1 2020, 8:08 PM

Besides one minor over-verbosity issue, this looks like shipit material to me. Drop the QVariant() wrappers (but don't drop the #include) before landing, please.

kconf_update/gtktheme.cpp
42

You don't need to wrap the QStringLiteral with a QVariant here

55–56

Ditto here

This revision is now accepted and ready to land.Apr 1 2020, 8:08 PM
gikari updated this revision to Diff 79089.Apr 1 2020, 8:23 PM
gikari marked 2 inline comments as done.
  • Remove explicit QVariant wrappers
This revision was automatically updated to reflect the committed changes.