[neon/qt/qtcreator/Neon/release] debian: fix KSyntaxHighlighting includes

Pino Toscano null at kde.org
Mon Jan 16 22:09:46 GMT 2023


Git commit 980c061570a77affa9593e92cc7f1b2be289757f by Pino Toscano.
Committed on 25/05/2022 at 18:47.
Pushed by carlosdem into branch 'Neon/release'.

fix KSyntaxHighlighting includes

backport part of upstream commit 4d9215e44d70c10be2c183592e8280c4d7292a83

M  +4    -0    debian/changelog
M  +1    -0    debian/patches/series
A  +79   -0    debian/patches/upstream_Correctly-include-KSyntaxHighlighting-headers.patch

https://invent.kde.org/neon/qt/qtcreator/commit/980c061570a77affa9593e92cc7f1b2be289757f

diff --git a/debian/changelog b/debian/changelog
index b73ded4..6fa43e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
 qtcreator (7.0.2-2) UNRELEASED; urgency=medium
 
+  [ Pino Toscano ]
+  * Backport part of upstream commit 4d9215e44d70c10be2c183592e8280c4d7292a83
+    to fix the includes of KSyntaxHighlighting, so they work also with 5.94.0+;
+    patch upstream_Correctly-include-KSyntaxHighlighting-headers.patch.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Wed, 25 May 2022 20:37:08 +0200
 
diff --git a/debian/patches/series b/debian/patches/series
index 860a57d..df8e902 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
 #Backported patches
+upstream_Correctly-include-KSyntaxHighlighting-headers.patch
 
 # Debian patches.
 debian_paths.diff
diff --git a/debian/patches/upstream_Correctly-include-KSyntaxHighlighting-headers.patch b/debian/patches/upstream_Correctly-include-KSyntaxHighlighting-headers.patch
new file mode 100644
index 0000000..e458be9
--- /dev/null
+++ b/debian/patches/upstream_Correctly-include-KSyntaxHighlighting-headers.patch
@@ -0,0 +1,79 @@
+From 4d9215e44d70c10be2c183592e8280c4d7292a83 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57 at gmail.com>
+Date: Wed, 18 May 2022 18:03:22 +0300
+Subject: [PATCH] Correctly include KSyntaxHighlighting headers
+
+In external KSyntaxHighlighting, these headers now have paths like
+/usr/include/KF5/KSyntaxHighlighting/KSyntaxHighlighting/AbstractHighlighter,
+where /usr/include/KF5/KSyntaxHighlighting is passed to compiler as include
+path.
+
+Old headers which had only one KSyntaxHighlighting fragment in path were
+removed in v5.94.0:
+https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/305
+
+Adjust our vendored version to make the code work with both external and
+vendored versions.
+
+Change-Id: Iadcc668c3c705c563ae359301d227ee19eadca0f
+Reviewed-by: Orgad Shaneh <orgads at gmail.com>
+Reviewed-by: <github-actions-qt-creator at cristianadam.eu>
+Reviewed-by: David Schulz <david.schulz at qt.io>
+---
+ src/plugins/texteditor/highlighter.cpp        |  10 +-
+ src/plugins/texteditor/highlighter.h          |   4 +-
+ src/plugins/texteditor/textdocumentlayout.h   |   2 +-
+ 16 files changed, 72 insertions(+), 66 deletions(-)
+
+diff --git a/src/plugins/texteditor/highlighter.cpp b/src/plugins/texteditor/highlighter.cpp
+index 47204ab890..f8e90f49ab 100644
+--- a/src/plugins/texteditor/highlighter.cpp
++++ b/src/plugins/texteditor/highlighter.cpp
+@@ -38,11 +38,11 @@
+ #include <utils/qtcassert.h>
+ #include <utils/stylehelper.h>
+ 
+-#include <DefinitionDownloader>
+-#include <FoldingRegion>
+-#include <Format>
+-#include <Repository>
+-#include <SyntaxHighlighter>
++#include <KSyntaxHighlighting/DefinitionDownloader>
++#include <KSyntaxHighlighting/FoldingRegion>
++#include <KSyntaxHighlighting/Format>
++#include <KSyntaxHighlighting/Repository>
++#include <KSyntaxHighlighting/SyntaxHighlighter>
+ 
+ #include <QLoggingCategory>
+ #include <QMetaEnum>
+diff --git a/src/plugins/texteditor/highlighter.h b/src/plugins/texteditor/highlighter.h
+index e18a67e8f8..3127589096 100644
+--- a/src/plugins/texteditor/highlighter.h
++++ b/src/plugins/texteditor/highlighter.h
+@@ -29,8 +29,8 @@
+ 
+ #include <utils/fileutils.h>
+ 
+-#include <AbstractHighlighter>
+-#include <Definition>
++#include <KSyntaxHighlighting/AbstractHighlighter>
++#include <KSyntaxHighlighting/Definition>
+ 
+ namespace TextEditor {
+ class TextDocument;
+diff --git a/src/plugins/texteditor/textdocumentlayout.h b/src/plugins/texteditor/textdocumentlayout.h
+index 69034bf765..3bed9f7bc5 100644
+--- a/src/plugins/texteditor/textdocumentlayout.h
++++ b/src/plugins/texteditor/textdocumentlayout.h
+@@ -32,7 +32,7 @@
+ 
+ #include <utils/id.h>
+ 
+-#include <State>
++#include <KSyntaxHighlighting/State>
+ 
+ #include <QTextBlockUserData>
+ #include <QPlainTextDocumentLayout>
+-- 
+2.35.1
+



More information about the Neon-commits mailing list