Port general settings and save setting to ui files
ClosedPublic

Authored by davidre on Feb 13 2020, 3:58 PM.

Details

Summary

Next step after porting the settings to KConfigXT. I recreated the layout as it
was before. Additionaly the KUrlRequester for the default save location now
only accepts folders.

Test Plan

Works as before

Diff Detail

Repository
R166 Spectacle
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidre created this revision.Feb 13 2020, 3:58 PM
Restricted Application added a project: Spectacle. · View Herald TranscriptFeb 13 2020, 3:58 PM
davidre requested review of this revision.Feb 13 2020, 3:58 PM
davidre updated this revision to Diff 75620.Feb 13 2020, 4:08 PM

remove unused variable

ngraham accepted this revision.Feb 14 2020, 5:20 AM
This revision is now accepted and ready to land.Feb 14 2020, 5:20 AM

Couple of nitpicks, feel free to ignore

src/Gui/SettingsDialog/GeneralOptionsPage.h
35

Nitpick, feel free to ignore: you can spare this if you go for using QScopedPointer in m_ui

src/Gui/SettingsDialog/SaveOptionsPage.cpp
68

There is an extra space after the opening parenthesis which probably shouldn't be here

davidre added inline comments.Feb 21 2020, 7:49 AM
src/Gui/SettingsDialog/GeneralOptionsPage.h
35

How would I do that with an incomplete type?

ervin added inline comments.Feb 24 2020, 12:42 PM
src/Gui/SettingsDialog/GeneralOptionsPage.h
35

Oh right, QScopedPointer needs the type to be complete... Well you could at least use "= default" in the cpp for the dtor. So it'd still be declared but you wouldn't have to bother providing an implementation yourself.

davidre added inline comments.Feb 24 2020, 1:10 PM
src/Gui/SettingsDialog/GeneralOptionsPage.h
35

Does that free *m_ui?

ervin added inline comments.Feb 24 2020, 1:47 PM
src/Gui/SettingsDialog/GeneralOptionsPage.h
35

Well, if it's a QScopedPointer yes. ;-)

This avoids the problem with incomplete types you mentioned earlier.

davidre updated this revision to Diff 76290.Feb 24 2020, 1:53 PM

Use qscopedpointer

ervin accepted this revision.Feb 24 2020, 3:26 PM
This revision was automatically updated to reflect the committed changes.