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:
parent
e1e7422166
commit
d707dd3a56
821
gui/main-kf5.qml
821
gui/main-kf5.qml
File diff suppressed because it is too large
Load Diff
|
|
@ -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);
|
||||
|
|
|
|||
Reference in New Issue