kf5: fix build error and sync features with KF6

- kate: use KTextEditor::MovingInterface for newMovingRange() on KF5
- gui: rewrite main-kf5.qml with tiling panes, session graph, per-pane
  chat model, drag-to-swap, sloppy focus (matching KF6 ChatPane.qml)
This commit is contained in:
Levi Neely 2026-07-17 09:41:33 +02:00
parent e1e7422166
commit d707dd3a56
2 changed files with 614 additions and 216 deletions

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@
#include <ktexteditor_version.h>
#if KTEXTEDITOR_VERSION_MAJOR < 6
#include <KTextEditor/CodeCompletionInterface>
#include <KTextEditor/MovingInterface>
#endif
#include <QVBoxLayout>
@ -1187,7 +1188,11 @@ void OllieKateView::annotateFileReferences(const QString &chatText)
QRegularExpression::MultilineOption);
auto *doc = view->document();
auto *movingIface = qobject_cast<KTextEditor::Document *>(doc);
#if KTEXTEDITOR_VERSION_MAJOR < 6
auto *movingIface = qobject_cast<KTextEditor::MovingInterface *>(doc);
#else
auto *movingIface = doc;
#endif
if (!movingIface) return;
KTextEditor::Attribute::Ptr attr(new KTextEditor::Attribute());
@ -1209,7 +1214,7 @@ void OllieKateView::annotateFileReferences(const QString &chatText)
annotatedLines.insert(line);
KTextEditor::Range range(line, 0, line, doc->lineLength(line));
auto *movingRange = doc->newMovingRange(range);
auto *movingRange = movingIface->newMovingRange(range);
movingRange->setAttribute(attr);
movingRange->setZDepth(-100.0); // behind text
m_annotations.append(movingRange);