Remove cursor theme option
ClosedPublic

Authored by filipf on Jul 10 2019, 2:22 AM.

Details

Summary

Continuation of D22191 and is built on top of it. Instead of having a niche option for a cursor theme with all the underlying infrastructure having to support it, grab the cursor them from a KDE config file and write it to the SDDM config file.

Diff Detail

Repository
R123 SDDM Configuration Panel (KCM)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
filipf created this revision.Jul 10 2019, 2:22 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 10 2019, 2:22 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.Jul 10 2019, 2:22 AM
filipf edited the summary of this revision. (Show Details)Jul 10 2019, 2:23 AM
filipf added reviewers: ngraham, davidedmundson.
filipf updated this revision to Diff 61940.Jul 17 2019, 10:20 PM

remove CursorTheme entry in config file when resetting theme syncing

filipf planned changes to this revision.Jul 17 2019, 10:21 PM

This should now be completely functional. In order to proceed further, the dependent revision needs to be landed and then this patch rebased on master.

filipf updated this revision to Diff 62074.Jul 19 2019, 7:04 PM

rebase on master

filipf updated this revision to Diff 62075.Jul 19 2019, 7:06 PM

fix one things overlooked when manually fixing up the rebase

davidedmundson added inline comments.Jul 19 2019, 9:11 PM
sddmauthhelper.cpp
119

Task for another day, we don't need to pass this in every time.

We can set this at compile time, using the same values from config.h as the KCM would use

src/advanceconfig.cpp
205

why?

src/ui/advanceconfig.ui
219

that seems odd?

filipf added inline comments.Jul 20 2019, 9:31 AM
sddmauthhelper.cpp
119

+1

src/advanceconfig.cpp
205

I need the identifier to delete the entry in the config file (done in sddmauthhelper.cpp), the value is not important so I just set whatever. Any smarter way of doing this?

src/ui/advanceconfig.ui
219

Definitely does, QtDesigner can be weird. Going to undo that.

filipf updated this revision to Diff 62101.Jul 20 2019, 9:33 AM

remove weird stuff from the .ui file

src/advanceconfig.cpp
205
args[QStringLiteral("kde_settings.conf/Theme/CursorTheme")] = QVariant();

Then in sddmauthhelper, something like

    if (fileName == QLatin1String("kde_settings.conf")) {
            if (iterator.value().isValid()) {
                        sddmConfig->group(groupName).writeEntry(keyName, iterator.value());
            } else {
                               sddmConfig->group(groupName).deleteEntry(keyName);

          }
            sddmOldConfig->group(groupName).deleteEntry(keyName);
}
        }
filipf updated this revision to Diff 62174.Jul 21 2019, 10:20 AM

address review comments

davidedmundson accepted this revision.Jul 21 2019, 1:44 PM
This revision is now accepted and ready to land.Jul 21 2019, 1:44 PM
ngraham accepted this revision.Jul 21 2019, 8:59 PM

So much removed code. 👍 Shipit!

This revision was automatically updated to reflect the committed changes.