D19491: generic config interface

2019-03-17 Thread Christoph Cullmann
cullmann added a comment. See https://cgit.kde.org/ktexteditor.git/commit/?id=b3b4aba3201c48d0160fbb65e520b8bb08830339 REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D19491 To: cullmann, #ktexteditor, dhaumann, loh.tar Cc: kwrite-devel, kde-frameworks-devel,

D19491: generic config interface

2019-03-17 Thread Christoph Cullmann
cullmann added a comment. Yes :=) REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D19491 To: cullmann, #ktexteditor, dhaumann, loh.tar Cc: kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann

D19491: generic config interface

2019-03-17 Thread Dominik Haumann
dhaumann added a comment. Agreed, do you plan to migrate more config options now? REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D19491 To: cullmann, #ktexteditor, dhaumann, loh.tar Cc: kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns,

D19491: generic config interface

2019-03-17 Thread Christoph Cullmann
This revision was automatically updated to reflect the committed changes. Closed by commit R39:d41689757fcb: generic config interface (authored by cullmann). REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D19491?vs=54021&id=54074 REVISION DETAIL https://p

D19491: generic config interface

2019-03-17 Thread Christoph Cullmann
cullmann added a comment. Performance must later be profiled after it is used a lot. Then we can e.g. still switch to a vector indexed with the enum value, that should make lookup fast. REPOSITORY R39 KTextEditor BRANCH arcpatch-D19491_1 REVISION DETAIL https://phabricator.kde.org/D

D19491: generic config interface

2019-03-17 Thread Dominik Haumann
dhaumann accepted this revision. dhaumann added a comment. This revision is now accepted and ready to land. Looks good to me. I see two possible performance issues: 1. Using std::map. ...but the size() is small. 2. See comment. But that needs profiling later. Please push.

D19491: generic config interface

2019-03-16 Thread Christoph Cullmann
cullmann added a comment. I would like to get this in now. The next step would be converting all existing settings to the new style like tabWidth but keeping the accessors as is, to have a minimal large change. If that then is done, one can start to think about using the generic interface

D19491: generic config interface

2019-03-16 Thread Christoph Cullmann
cullmann updated this revision to Diff 54021. cullmann added a comment. add command name, too hide data structure REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D19491?vs=53063&id=54021 BRANCH arcpatch-D19491_1 REVISION DETAIL https://phabricator.

D19491: generic config interface

2019-03-05 Thread Christoph Cullmann
cullmann added a comment. I think breaking the config files is just as bad ;=) After we have converted all things, we might even support exporting/importing the complete document/view/render global config to from other formats like json using the "nice" keys, as we can just write a small

D19491: generic config interface

2019-03-05 Thread loh tar
loh.tar added a comment. Well, when it is important to be compatible, then may that needed. OTH would it be so terrible to break it? Perhaps it may more important to keep the doc variables untouched than the config file keys. So I would adjust the config file keys to fit the doc variabl

D19491: generic config interface

2019-03-05 Thread Christoph Cullmann
cullmann added a comment. I think some extra keys are not avoidable to be compatible with the old stuff. See e.g. // BEGIN ConfigInterface stff QStringList KTextEditor::DocumentPrivate::configKeys() const { static const QStringList keys = { QLatin1String("backup-on-sav

D19491: generic config interface

2019-03-05 Thread loh tar
loh.tar added a comment. > either extra key or "CamlCase" the key we use for the command-line/kate: var line I would avoid any kind of extra key. Just one string used for the config file and these document variables. I guess "Tab Width" is simpler to convert to "set-tab-width" as "TabWi

D19491: generic config interface

2019-03-05 Thread Christoph Cullmann
cullmann added a comment. In D19491#424808 , @dhaumann wrote: > Currently, one cannot 'unset' a value, but I guess that is ok, since we did not have that before > > In general this approach is OK. Some thoughts on this: > > - is it as fas

D19491: generic config interface

2019-03-04 Thread Dominik Haumann
dhaumann added a comment. Currently, one cannot 'unset' a value, but I guess that is ok, since we did not have that before In general this approach is OK. Some thoughts on this: - is it as fast as before, if you start Kate with e.g. 100 documents open? - will this allow easy access

D19491: generic config interface

2019-03-04 Thread Christoph Cullmann
cullmann added a comment. Any input? We could give this a go "after" the next frameworks release is out. REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D19491 To: cullmann, #ktexteditor, dhaumann, loh.tar Cc: kwrite-devel, kde-frameworks-devel, domson, michaelh,

D19491: generic config interface

2019-03-03 Thread Christoph Cullmann
cullmann updated this revision to Diff 53063. cullmann added a comment. better error checking for ::value fix coding style REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D19491?vs=53060&id=53063 BRANCH arcpatch-D19491 REVISION DETAIL https://phabr

D19491: generic config interface

2019-03-03 Thread Christoph Cullmann
cullmann added reviewers: KTextEditor, dhaumann, loh.tar. REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D19491 To: cullmann, #ktexteditor, dhaumann, loh.tar Cc: kwrite-devel, kde-frameworks-devel, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann

D19491: generic config interface

2019-03-03 Thread Christoph Cullmann
cullmann added a comment. Other approach to generic config. Takes the ideas of D18894 with some tweaks. Uses enums for the keys (thought ATM puts that into an int in the interface, one might alter that later with some templatizing of the KateConfig. R

D19491: generic config interface

2019-03-03 Thread Christoph Cullmann
cullmann created this revision. Herald added projects: Kate, Frameworks. Herald added subscribers: kde-frameworks-devel, kwrite-devel. cullmann requested review of this revision. REVISION SUMMARY instead of member per entry, use key/value with QVariant instead of manual local/global config, im