No need to create it immediately. Saves some cycles on startup.
Details
- Reviewers
dhaumann kfunk cullmann - Group Reviewers
KTextEditor - Commits
- R39:92e21fb03b7f: [KateCompletionWidget] Create configuration interface on demand
Compiles. I didn't find a way to actually trigger the config UI, though
Diff Detail
- Repository
- R39 KTextEditor
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Looks like you don't need the member at all? Otherwise late-init wouldn't work this way.
m_configWidget seems only used in showConfig(). Let's remove the member altogether?
Ah, disregard my comment. If showConfig() is invoked multiple times then my approach would be slower.
Hi! After this commit I don't see a completion dropdown anymore. And after it should be opened and one presses backspace, kate or kwrite crashes. Simple example:
- open empty Kate
- write "aaaa", enter, "aaaa", backspace
I will provide backtrace on demand :). I'm running on kdesrc-build environment, therefore frameworks and KDE applications are built from git. I have stable Qt version 5.10.1. Wayland session.
A backtrace for the crash @martinkostolny mentioned can be found here: https://bugs.kde.org/show_bug.cgi?id=391955
Perhaps one has not thought about the side-effects of the construction of the KateCompletionConfig.
It looks like it does a readConfig and that triggers applyInternal() which in return will configure the m_presentationModel.
I will revert this commit for the time being.
See:
Git commit 7f3d9e774129618dfb9fd871d5d5c8fbb66b4d9a by Christoph Cullmann.
Committed on 18/03/2018 at 12:33.
Pushed by cullmann into branch 'master'.
Revert "[KateCompletionWidget] Create configuration interface on demand"
This reverts commit 92e21fb03b7fd01eab6fd6f4a116b849cb93ef9e.
KateCompletionConfig construction seems to have some side-effects that are necessary
(e.g. initial config loading)
M +1 -5 src/completion/katecompletionwidget.cpp
https://commits.kde.org/ktexteditor/7f3d9e774129618dfb9fd871d5d5c8fbb66b4d9a
If we want that, one needs to take care of the config loading/initial setup of the m_presentationModel in a different way than relying on the config widget to do it.