D25307: kwriteconfig: add delete option

2019-11-14 Thread Eon S. Jeon
esjeon added a comment.


  Thanks all. I hope I can be of help.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck, davidedmundson
Cc: davidedmundson, ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread Nathaniel Graham
ngraham added a comment.


  Thanks very much for the nice patch. May it be the first of many! :)

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck, davidedmundson
Cc: davidedmundson, ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread Nathaniel Graham
This revision was automatically updated to reflect the committed changes.
Closed by commit R237:9b8ef694412c: kwriteconfig: add delete option (authored 
by esjeon, committed by ngraham).

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25307?vs=69754&id=69770

REVISION DETAIL
  https://phabricator.kde.org/D25307

AFFECTED FILES
  src/kreadconfig/kwriteconfig.cpp

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck, davidedmundson
Cc: davidedmundson, ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread Eon S. Jeon
esjeon added a comment.


  > Can you provide your email address
  
  Eon S. Jeon 

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck, davidedmundson
Cc: davidedmundson, ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread Nathaniel Graham
ngraham added a comment.


  Can you provide your email address so we can land this patch with correct 
authorship information?

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck, davidedmundson
Cc: davidedmundson, ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread Eon S. Jeon
esjeon added a comment.


  > Do you have commit access?
  
  I don't think so. I'm a first timer around here.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck, davidedmundson
Cc: davidedmundson, ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread Nathaniel Graham
ngraham added a comment.


  In D25307#562652 , @esjeon wrote:
  
  > Also, I don't see anything wrong with adding this, since it merely exposes 
`deleteEntry` method already in the API. Some projects do rely on it, so why 
should it be kept away from actual human beings?
  
  
  FWIW, I don't disapprove; the above logic is reasonable IMO.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck
Cc: ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread David Edmundson
davidedmundson accepted this revision.
davidedmundson added a comment.
This revision is now accepted and ready to land.


  Shortcuts aside, the patch makes sense.
  
  In general, I want to encourage people to wipe config entries rather than 
write in the current default as it makes several other things work better.
  
  Do you have commit access?

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck, davidedmundson
Cc: davidedmundson, ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread David Redondo
davidre added a comment.


  In D25307#562652 , @esjeon wrote:
  
  > Also, I don't see anything wrong with adding this, since it merely exposes 
`deleteEntry` method already in the API. Some projects do rely on it, so why 
should it be kept away from actual human beings?
  
  
  I am in no way against this. I just wanted to know what the motivation behind 
this is :).

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread Eon S. Jeon
esjeon added a comment.


  In D25307#562618 , @davidre wrote:
  
  > In D25307#562613 , @esjeon wrote:
  >
  > > > What shortcuts had you in mind to delete?
  > >
  > > My specific interest is deleting shortcuts of removed KWin scripts. ( 
e.g. https://github.com/esjeon/krohnkite/issues/31 ) Such shortcuts keep 
appearing on Global Shortcuts dialog unless manually deleted. Also, while 
developing the script, I leave garbage values behind, and having this around 
will be handy.
  >
  >
  > As noted in that issue for removing shortcuts modifying kglobalshortcutsrc 
is not enough as kglobaccel will write back. A reliable way to do that is via 
DBus.
  
  
  Yeah, that sounds like a better approach for the shortcut thing. But I want 
to make clear that I submitted this patch only after verifying that this works 
for my case, for whatever reason.
  
  Also, I don't see anything wrong with adding this, since it merely exposes 
`deleteEntry` method already in the API. Some projects do rely on it, so why 
should it be kept away from actual human beings?

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread David Redondo
davidre added a comment.


  In D25307#562613 , @esjeon wrote:
  
  > > What shortcuts had you in mind to delete?
  >
  > My specific interest is deleting shortcuts of removed KWin scripts. ( e.g. 
https://github.com/esjeon/krohnkite/issues/31 ) Such shortcuts keep appearing 
on Global Shortcuts dialog unless manually deleted. Also, while developing the 
script, I leave garbage values behind, and having this around will be handy.
  
  
  As noted in that issue for removing shortcuts modifying kglobalshortcutsrc is 
not enough as kglobaccel will write back. A reliable way to do that is via DBus.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread Eon S. Jeon
esjeon added a comment.


  > What shortcuts had you in mind to delete?
  
  My specific interest is deleting shortcuts of removed KWin scripts. ( e.g. 
https://github.com/esjeon/krohnkite/issues/31 ) Such shortcuts keep appearing 
on Global Shortcuts dialog unless manually deleted. Also, while developing the 
script, I leave garbage values behind, and having this around will be handy.
  
  > If you delete an entry you will get the default value on the next read.
  
  I believe some people will find such behaviour(?) useful. You can safely 
"reset" configs from CLI without worrying about putting wrong values.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread David Redondo
davidre added a comment.


  I don't think deleting a entry from a config file makes sense. If you delete 
an entry you will get the default value on the next read.
  
  For shortcuts it's a bit more complicated. What shortcuts had you in mind to 
delete?

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread Nathaniel Graham
ngraham added reviewers: Frameworks, davidre, dfaure, meven, cfeck.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

To: esjeon, #frameworks, davidre, dfaure, meven, cfeck
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25307: kwriteconfig: add delete option

2019-11-14 Thread Eon S. Jeon
esjeon created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
esjeon requested review of this revision.

REVISION SUMMARY
  Add a simple delete option to kwriteconfig. A possible usecase of this option 
is to delete unused shortcut bindings.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D25307

AFFECTED FILES
  src/kreadconfig/kwriteconfig.cpp

To: esjeon
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns