m_ghost was parented to the view, so Qt parent-child cleanup could
destroy it when a view was replaced. The raw pointer remained non-null,
causing a double-free on the next viewChanged signal.
Fix by using QPointer<OllieGhostProvider> which auto-nulls on destroy.
Also replace qobject_cast with dynamic_cast for KF5 KTextEditor
interfaces to avoid crashes when qt_metacast accesses uninitialized
KateViewConfig during early view activation.
The GhostOverlay is parented to the view widget and gets destroyed by
Qt child cleanup before ~OllieGhostProvider runs. Stop calling
hideOverlay() in destructor, connect destroyed() signal to null the
pointer.
- Fix parent not passed to InlineNoteProvider causing provider recreation
on every viewChanged signal (killed debounce timer, no completions fired)
- Add view() accessor, use it in setupGhostProvider check
- Null-check focusProxy() to prevent crash during early viewChanged
- Multi-line completions: first line as inline note, continuation lines
rendered via GhostOverlay floating widget
- Guard event filter and signal handlers against active completion popups
- Add suggestion cycling (Meta+O,N / Meta+O,P) with history
- Add Meta+O,C to toggle completions on/off with status bar indicator
- Add Meta+O,D to dismiss current suggestion
- Add Meta+O,Tab to manually trigger a completion
- Add config page for completion backend and model override
- Pass backend/model config via D-Bus Complete context parameter
Adds OllieGhostProvider that renders AI completions as translucent
gray text after the cursor. Uses the new Complete D-Bus method with
500ms debounce. Tab accepts, Escape dismisses, any edit clears.
Works on both KF5 and KF6 builds.