forked from qt-creator/qt-creator
KSyntaxHighlighting: Remove unused files
The original patches for switching to KSyntaxHighlighting are no longer used. Remove empty readme file. Change-Id: I6b55b63bf19a04ef16f34b4764ddfc2800959b11 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,392 +0,0 @@
|
|||||||
From c9f4bdaa0902c0fdb5ea750d11935e15777a090d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alessandro Portale <alessandro.portale@qt.io>
|
|
||||||
Date: Tue, 12 Feb 2019 19:45:08 +0100
|
|
||||||
Subject: [PATCH 3/6] Add qmake/Qbs files and files generated by CMake
|
|
||||||
|
|
||||||
---
|
|
||||||
autogenerated/autogenerated.pri | 10 +++
|
|
||||||
.../KSyntaxHighlighting/AbstractHighlighter | 1 +
|
|
||||||
.../include/KSyntaxHighlighting/Definition | 1 +
|
|
||||||
.../include/KSyntaxHighlighting/FoldingRegion | 1 +
|
|
||||||
.../include/KSyntaxHighlighting/Format | 1 +
|
|
||||||
.../include/KSyntaxHighlighting/Repository | 1 +
|
|
||||||
.../include/KSyntaxHighlighting/State | 1 +
|
|
||||||
.../KSyntaxHighlighting/SyntaxHighlighter | 1 +
|
|
||||||
.../include/KSyntaxHighlighting/Theme | 1 +
|
|
||||||
autogenerated/ksyntaxhighlighting_version.h | 12 +++
|
|
||||||
.../src/lib/ksyntaxhighlighting_logging.cpp | 11 +++
|
|
||||||
.../src/lib/ksyntaxhighlighting_logging.h | 11 +++
|
|
||||||
data/data.pro | 11 +++
|
|
||||||
src/lib/ksyntaxhighlighting_export.h | 34 +++++++
|
|
||||||
syntax-highlighting.pro | 55 ++++++++++++
|
|
||||||
syntax-highlighting.qbs | 90 +++++++++++++++++++
|
|
||||||
syntax-highlighting_dependencies.pri | 3 +
|
|
||||||
17 files changed, 245 insertions(+)
|
|
||||||
create mode 100644 autogenerated/autogenerated.pri
|
|
||||||
create mode 100644 autogenerated/include/KSyntaxHighlighting/AbstractHighlighter
|
|
||||||
create mode 100644 autogenerated/include/KSyntaxHighlighting/Definition
|
|
||||||
create mode 100644 autogenerated/include/KSyntaxHighlighting/FoldingRegion
|
|
||||||
create mode 100644 autogenerated/include/KSyntaxHighlighting/Format
|
|
||||||
create mode 100644 autogenerated/include/KSyntaxHighlighting/Repository
|
|
||||||
create mode 100644 autogenerated/include/KSyntaxHighlighting/State
|
|
||||||
create mode 100644 autogenerated/include/KSyntaxHighlighting/SyntaxHighlighter
|
|
||||||
create mode 100644 autogenerated/include/KSyntaxHighlighting/Theme
|
|
||||||
create mode 100644 autogenerated/ksyntaxhighlighting_version.h
|
|
||||||
create mode 100644 autogenerated/src/lib/ksyntaxhighlighting_logging.cpp
|
|
||||||
create mode 100644 autogenerated/src/lib/ksyntaxhighlighting_logging.h
|
|
||||||
create mode 100644 data/data.pro
|
|
||||||
create mode 100644 src/lib/ksyntaxhighlighting_export.h
|
|
||||||
create mode 100644 syntax-highlighting.pro
|
|
||||||
create mode 100644 syntax-highlighting.qbs
|
|
||||||
create mode 100644 syntax-highlighting_dependencies.pri
|
|
||||||
|
|
||||||
diff --git a/autogenerated/autogenerated.pri b/autogenerated/autogenerated.pri
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..4121aaf
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/autogenerated.pri
|
|
||||||
@@ -0,0 +1,10 @@
|
|
||||||
+INCLUDEPATH *= $$PWD/include
|
|
||||||
+INCLUDEPATH *= $$PWD/src/lib
|
|
||||||
+INCLUDEPATH *= $$PWD
|
|
||||||
+
|
|
||||||
+SOURCES += \
|
|
||||||
+ $$PWD/src/lib/ksyntaxhighlighting_logging.cpp
|
|
||||||
+
|
|
||||||
+HEADERS += \
|
|
||||||
+ $$PWD/ksyntaxhighlighting_version.h \
|
|
||||||
+ $$PWD/src/lib/ksyntaxhighlighting_logging.h
|
|
||||||
diff --git a/autogenerated/include/KSyntaxHighlighting/AbstractHighlighter b/autogenerated/include/KSyntaxHighlighting/AbstractHighlighter
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..b787873
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/include/KSyntaxHighlighting/AbstractHighlighter
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+#include "abstracthighlighter.h"
|
|
||||||
diff --git a/autogenerated/include/KSyntaxHighlighting/Definition b/autogenerated/include/KSyntaxHighlighting/Definition
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..2c3241f
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/include/KSyntaxHighlighting/Definition
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+#include "definition.h"
|
|
||||||
diff --git a/autogenerated/include/KSyntaxHighlighting/FoldingRegion b/autogenerated/include/KSyntaxHighlighting/FoldingRegion
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..005b829
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/include/KSyntaxHighlighting/FoldingRegion
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+#include "foldingregion.h"
|
|
||||||
diff --git a/autogenerated/include/KSyntaxHighlighting/Format b/autogenerated/include/KSyntaxHighlighting/Format
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..b0d6a10
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/include/KSyntaxHighlighting/Format
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+#include "format.h"
|
|
||||||
diff --git a/autogenerated/include/KSyntaxHighlighting/Repository b/autogenerated/include/KSyntaxHighlighting/Repository
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..189dbc2
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/include/KSyntaxHighlighting/Repository
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+#include "repository.h"
|
|
||||||
diff --git a/autogenerated/include/KSyntaxHighlighting/State b/autogenerated/include/KSyntaxHighlighting/State
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e148d70
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/include/KSyntaxHighlighting/State
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+#include "state.h"
|
|
||||||
diff --git a/autogenerated/include/KSyntaxHighlighting/SyntaxHighlighter b/autogenerated/include/KSyntaxHighlighting/SyntaxHighlighter
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..b429824
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/include/KSyntaxHighlighting/SyntaxHighlighter
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+#include "syntaxhighlighter.h"
|
|
||||||
diff --git a/autogenerated/include/KSyntaxHighlighting/Theme b/autogenerated/include/KSyntaxHighlighting/Theme
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..34a3e98
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/include/KSyntaxHighlighting/Theme
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+#include "theme.h"
|
|
||||||
diff --git a/autogenerated/ksyntaxhighlighting_version.h b/autogenerated/ksyntaxhighlighting_version.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..4336b19
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/ksyntaxhighlighting_version.h
|
|
||||||
@@ -0,0 +1,12 @@
|
|
||||||
+// This file was generated by ecm_setup_version(): DO NOT EDIT!
|
|
||||||
+
|
|
||||||
+#ifndef SyntaxHighlighting_VERSION_H
|
|
||||||
+#define SyntaxHighlighting_VERSION_H
|
|
||||||
+
|
|
||||||
+#define SyntaxHighlighting_VERSION_STRING "5.90.0"
|
|
||||||
+#define SyntaxHighlighting_VERSION_MAJOR 5
|
|
||||||
+#define SyntaxHighlighting_VERSION_MINOR 90
|
|
||||||
+#define SyntaxHighlighting_VERSION_PATCH 0
|
|
||||||
+#define SyntaxHighlighting_VERSION ((5<<16)|(90<<8)|(0))
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
diff --git a/autogenerated/src/lib/ksyntaxhighlighting_logging.cpp b/autogenerated/src/lib/ksyntaxhighlighting_logging.cpp
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..4082ac4
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/src/lib/ksyntaxhighlighting_logging.cpp
|
|
||||||
@@ -0,0 +1,11 @@
|
|
||||||
+// This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT!
|
|
||||||
+
|
|
||||||
+#include "ksyntaxhighlighting_logging.h"
|
|
||||||
+
|
|
||||||
+ namespace KSyntaxHighlighting {
|
|
||||||
+#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
|
||||||
+Q_LOGGING_CATEGORY(Log, "org.kde.ksyntaxhighlighting", QtInfoMsg)
|
|
||||||
+#else
|
|
||||||
+Q_LOGGING_CATEGORY(Log, "org.kde.ksyntaxhighlighting")
|
|
||||||
+#endif
|
|
||||||
+}
|
|
||||||
diff --git a/autogenerated/src/lib/ksyntaxhighlighting_logging.h b/autogenerated/src/lib/ksyntaxhighlighting_logging.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..c351b2c
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/autogenerated/src/lib/ksyntaxhighlighting_logging.h
|
|
||||||
@@ -0,0 +1,11 @@
|
|
||||||
+// This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT!
|
|
||||||
+
|
|
||||||
+#ifndef ECM_QLOGGINGCATEGORY_KSYNTAXHIGHLIGHTING_LOG_KSYNTAXHIGHLIGHTING_LOGGING_H
|
|
||||||
+#define ECM_QLOGGINGCATEGORY_KSYNTAXHIGHLIGHTING_LOG_KSYNTAXHIGHLIGHTING_LOGGING_H
|
|
||||||
+
|
|
||||||
+#include <QLoggingCategory>
|
|
||||||
+ namespace KSyntaxHighlighting {
|
|
||||||
+Q_DECLARE_LOGGING_CATEGORY(Log)
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
diff --git a/data/data.pro b/data/data.pro
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..1028ea1
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/data/data.pro
|
|
||||||
@@ -0,0 +1,11 @@
|
|
||||||
+TEMPLATE = aux
|
|
||||||
+
|
|
||||||
+include(../../../../../qtcreator.pri)
|
|
||||||
+
|
|
||||||
+STATIC_BASE = $$PWD
|
|
||||||
+STATIC_OUTPUT_BASE = $$IDE_DATA_PATH/generic-highlighter
|
|
||||||
+STATIC_INSTALL_BASE = $$INSTALL_DATA_PATH/generic-highlighter
|
|
||||||
+
|
|
||||||
+STATIC_FILES += $$files($$PWD/syntax/*, true)
|
|
||||||
+
|
|
||||||
+include(../../../../../qtcreatordata.pri)
|
|
||||||
diff --git a/src/lib/ksyntaxhighlighting_export.h b/src/lib/ksyntaxhighlighting_export.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..a39adb5
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/lib/ksyntaxhighlighting_export.h
|
|
||||||
@@ -0,0 +1,34 @@
|
|
||||||
+/****************************************************************************
|
|
||||||
+**
|
|
||||||
+** Copyright (C) 2018 The Qt Company Ltd.
|
|
||||||
+** Contact: https://www.qt.io/licensing/
|
|
||||||
+**
|
|
||||||
+** This file is part of Qt Creator.
|
|
||||||
+**
|
|
||||||
+** Commercial License Usage
|
|
||||||
+** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
+** accordance with the commercial license agreement provided with the
|
|
||||||
+** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
+** a written agreement between you and The Qt Company. For licensing terms
|
|
||||||
+** and conditions see https://www.qt.io/terms-conditions. For further
|
|
||||||
+** information use the contact form at https://www.qt.io/contact-us.
|
|
||||||
+**
|
|
||||||
+** GNU General Public License Usage
|
|
||||||
+** Alternatively, this file may be used under the terms of the GNU
|
|
||||||
+** General Public License version 3 as published by the Free Software
|
|
||||||
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
||||||
+** included in the packaging of this file. Please review the following
|
|
||||||
+** information to ensure the GNU General Public License requirements will
|
|
||||||
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
||||||
+**
|
|
||||||
+****************************************************************************/
|
|
||||||
+
|
|
||||||
+#pragma once
|
|
||||||
+
|
|
||||||
+#include <QtGlobal>
|
|
||||||
+
|
|
||||||
+#if defined(KSYNTAXHIGHLIGHTING_LIBRARY)
|
|
||||||
+# define KSYNTAXHIGHLIGHTING_EXPORT Q_DECL_EXPORT
|
|
||||||
+#else
|
|
||||||
+# define KSYNTAXHIGHLIGHTING_EXPORT Q_DECL_IMPORT
|
|
||||||
+#endif
|
|
||||||
diff --git a/syntax-highlighting.pro b/syntax-highlighting.pro
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..38127e1
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/syntax-highlighting.pro
|
|
||||||
@@ -0,0 +1,55 @@
|
|
||||||
+include(../../../qtcreatorlibrary.pri)
|
|
||||||
+include(autogenerated/autogenerated.pri)
|
|
||||||
+
|
|
||||||
+QT += network
|
|
||||||
+
|
|
||||||
+DEFINES += KSYNTAXHIGHLIGHTING_LIBRARY
|
|
||||||
+
|
|
||||||
+RESOURCES += \
|
|
||||||
+ data/themes/theme-data.qrc
|
|
||||||
+
|
|
||||||
+HEADERS += \
|
|
||||||
+ src/lib/abstracthighlighter.h \
|
|
||||||
+ src/lib/abstracthighlighter_p.h \
|
|
||||||
+ src/lib/context_p.h \
|
|
||||||
+ src/lib/contextswitch_p.h \
|
|
||||||
+ src/lib/definition.h \
|
|
||||||
+ src/lib/definition_p.h \
|
|
||||||
+ src/lib/definitiondownloader.h \
|
|
||||||
+ src/lib/definitionref_p.h \
|
|
||||||
+ src/lib/foldingregion.h \
|
|
||||||
+ src/lib/format.h \
|
|
||||||
+ src/lib/format_p.h \
|
|
||||||
+ src/lib/htmlhighlighter.h \
|
|
||||||
+ src/lib/keywordlist_p.h \
|
|
||||||
+ src/lib/ksyntaxhighlighting_export.h \
|
|
||||||
+ src/lib/matchresult_p.h \
|
|
||||||
+ src/lib/repository.h \
|
|
||||||
+ src/lib/repository_p.h \
|
|
||||||
+ src/lib/rule_p.h \
|
|
||||||
+ src/lib/state.h \
|
|
||||||
+ src/lib/state_p.h \
|
|
||||||
+ src/lib/syntaxhighlighter.h \
|
|
||||||
+ src/lib/textstyledata_p.h \
|
|
||||||
+ src/lib/theme.h \
|
|
||||||
+ src/lib/themedata_p.h \
|
|
||||||
+ src/lib/wildcardmatcher_p.h \
|
|
||||||
+ src/lib/xml_p.h \
|
|
||||||
+
|
|
||||||
+SOURCES += \
|
|
||||||
+ src/lib/abstracthighlighter.cpp \
|
|
||||||
+ src/lib/context.cpp \
|
|
||||||
+ src/lib/contextswitch.cpp \
|
|
||||||
+ src/lib/definition.cpp \
|
|
||||||
+ src/lib/definitiondownloader.cpp \
|
|
||||||
+ src/lib/foldingregion.cpp \
|
|
||||||
+ src/lib/format.cpp \
|
|
||||||
+ src/lib/htmlhighlighter.cpp \
|
|
||||||
+ src/lib/keywordlist.cpp \
|
|
||||||
+ src/lib/repository.cpp \
|
|
||||||
+ src/lib/rule.cpp \
|
|
||||||
+ src/lib/state.cpp \
|
|
||||||
+ src/lib/syntaxhighlighter.cpp \
|
|
||||||
+ src/lib/theme.cpp \
|
|
||||||
+ src/lib/themedata.cpp \
|
|
||||||
+ src/lib/wildcardmatcher.cpp \
|
|
||||||
diff --git a/syntax-highlighting.qbs b/syntax-highlighting.qbs
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..4f6de09
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/syntax-highlighting.qbs
|
|
||||||
@@ -0,0 +1,90 @@
|
|
||||||
+import qbs 1.0
|
|
||||||
+import qbs.File
|
|
||||||
+import qbs.FileInfo
|
|
||||||
+import qbs.Environment
|
|
||||||
+
|
|
||||||
+Project {
|
|
||||||
+ QtcDevHeaders {
|
|
||||||
+ productName: "syntax-highlighting (3rd party)"
|
|
||||||
+ baseDir: sourceDirectory + "/src/lib"
|
|
||||||
+ }
|
|
||||||
+ QtcDevHeaders {
|
|
||||||
+ productName: "syntax-highlighting autogenerated (3rd party)"
|
|
||||||
+ baseDir: sourceDirectory + "/autogenerated/src/lib"
|
|
||||||
+ Group {
|
|
||||||
+ prefix: baseDir + '/'
|
|
||||||
+ files: [
|
|
||||||
+ "AbstractHighlighter",
|
|
||||||
+ "Definition",
|
|
||||||
+ "FoldingRegion",
|
|
||||||
+ "Format",
|
|
||||||
+ "Repository",
|
|
||||||
+ "State",
|
|
||||||
+ "SyntaxHighlighter",
|
|
||||||
+ "Theme"
|
|
||||||
+ ]
|
|
||||||
+ qbs.install: true
|
|
||||||
+ qbs.installDir: qtc.ide_include_path + '/' + FileInfo.fileName(product.sourceDirectory)
|
|
||||||
+ qbs.installSourceBase: baseDir
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ QtcLibrary {
|
|
||||||
+ name: "KSyntaxHighlighting"
|
|
||||||
+
|
|
||||||
+ cpp.defines: base.concat("KSYNTAXHIGHLIGHTING_LIBRARY")
|
|
||||||
+ cpp.includePaths: [
|
|
||||||
+ product.sourceDirectory + "/src/lib/",
|
|
||||||
+ product.sourceDirectory + "/autogenerated/include/",
|
|
||||||
+ product.sourceDirectory + "/autogenerated/src/lib/",
|
|
||||||
+ product.sourceDirectory + "/autogenerated/"
|
|
||||||
+ ]
|
|
||||||
+
|
|
||||||
+ Depends { name: "Qt.gui" }
|
|
||||||
+ Depends { name: "Qt.network" }
|
|
||||||
+
|
|
||||||
+ Group {
|
|
||||||
+ name: "lib"
|
|
||||||
+ prefix: "src/lib/"
|
|
||||||
+ files: [
|
|
||||||
+ "*.h",
|
|
||||||
+ "*.cpp"
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Group {
|
|
||||||
+ name: "KSyntaxHighlighting data"
|
|
||||||
+ qbs.install: true
|
|
||||||
+ qbs.installDir: qtc.ide_data_path + "/generic-highlighter/"
|
|
||||||
+ qbs.installSourceBase: project.ide_source_tree + "/src/libs/3rdparty/syntax-highlighting/data/"
|
|
||||||
+ prefix: project.ide_source_tree + "/src/libs/3rdparty/syntax-highlighting/data/"
|
|
||||||
+ files: [
|
|
||||||
+ "syntax/**/*"
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Group {
|
|
||||||
+ name: "autogenerated lib"
|
|
||||||
+ prefix: "autogenerated/src/lib/"
|
|
||||||
+ files: [
|
|
||||||
+ "*.h",
|
|
||||||
+ "*.cpp"
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Group {
|
|
||||||
+ name: "theme data"
|
|
||||||
+ prefix: "data/themes/"
|
|
||||||
+ files: [ "theme-data.qrc" ]
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Export {
|
|
||||||
+ Depends { name: "cpp" }
|
|
||||||
+ cpp.includePaths: [
|
|
||||||
+ product.sourceDirectory + "/src/lib/",
|
|
||||||
+ product.sourceDirectory + "/autogenerated/include/",
|
|
||||||
+ product.sourceDirectory + "/autogenerated/src/lib/",
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
diff --git a/syntax-highlighting_dependencies.pri b/syntax-highlighting_dependencies.pri
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..f2fd3e6
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/syntax-highlighting_dependencies.pri
|
|
||||||
@@ -0,0 +1,3 @@
|
|
||||||
+QTC_LIB_NAME = KSyntaxHighlighting
|
|
||||||
+INCLUDEPATH *= $$PWD/src/lib
|
|
||||||
+INCLUDEPATH *= $$PWD/autogenerated/src/lib
|
|
||||||
--
|
|
||||||
2.20.1.windows.1
|
|
||||||
|
|
@@ -1,281 +0,0 @@
|
|||||||
From 916af0204a45c91092e53241e6a867cadb9dedec Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alessandro Portale <alessandro.portale@qt.io>
|
|
||||||
Date: Tue, 12 Feb 2019 19:21:57 +0100
|
|
||||||
Subject: [PATCH 4/6] Compile with namespaced Qt
|
|
||||||
|
|
||||||
---
|
|
||||||
src/lib/abstracthighlighter.h | 4 ++++
|
|
||||||
src/lib/abstracthighlighter_p.h | 2 ++
|
|
||||||
src/lib/context_p.h | 2 ++
|
|
||||||
src/lib/definition.h | 4 ++++
|
|
||||||
src/lib/foldingregion.h | 2 ++
|
|
||||||
src/lib/format.h | 5 ++++-
|
|
||||||
src/lib/htmlhighlighter.h | 2 ++
|
|
||||||
src/lib/keywordlist_p.h | 2 ++
|
|
||||||
src/lib/repository.h | 2 ++
|
|
||||||
src/lib/repository_p.h | 2 ++
|
|
||||||
src/lib/rule_p.h | 2 ++
|
|
||||||
src/lib/state.h | 2 ++
|
|
||||||
src/lib/theme.h | 2 ++
|
|
||||||
src/lib/themedata_p.h | 2 ++
|
|
||||||
src/lib/wildcardmatcher.cpp | 2 +-
|
|
||||||
src/lib/wildcardmatcher_p.h | 4 ++++
|
|
||||||
16 files changed, 39 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lib/abstracthighlighter.h b/src/lib/abstracthighlighter.h
|
|
||||||
index 056f65b..2b88729 100644
|
|
||||||
--- a/src/lib/abstracthighlighter.h
|
|
||||||
+++ b/src/lib/abstracthighlighter.h
|
|
||||||
@@ -30,7 +30,9 @@
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QString;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
|
||||||
|
|
||||||
@@ -186,6 +188,8 @@ private:
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
Q_DECLARE_INTERFACE(KSyntaxHighlighting::AbstractHighlighter, "org.kde.SyntaxHighlighting.AbstractHighlighter")
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTERM_H
|
|
||||||
diff --git a/src/lib/abstracthighlighter_p.h b/src/lib/abstracthighlighter_p.h
|
|
||||||
index 1690eb0..bdfdf23 100644
|
|
||||||
--- a/src/lib/abstracthighlighter_p.h
|
|
||||||
+++ b/src/lib/abstracthighlighter_p.h
|
|
||||||
@@ -27,7 +27,9 @@
|
|
||||||
#include "definition.h"
|
|
||||||
#include "theme.h"
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QStringList;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
|
||||||
|
|
||||||
diff --git a/src/lib/context_p.h b/src/lib/context_p.h
|
|
||||||
index 3e3ab97..a034d0e 100644
|
|
||||||
--- a/src/lib/context_p.h
|
|
||||||
+++ b/src/lib/context_p.h
|
|
||||||
@@ -34,7 +34,9 @@
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QXmlStreamReader;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
|
||||||
|
|
||||||
diff --git a/src/lib/definition.h b/src/lib/definition.h
|
|
||||||
index 25996dd..6f0dba9 100644
|
|
||||||
--- a/src/lib/definition.h
|
|
||||||
+++ b/src/lib/definition.h
|
|
||||||
@@ -31,10 +31,12 @@
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QChar;
|
|
||||||
class QString;
|
|
||||||
class QStringList;
|
|
||||||
template <typename T> class QVector;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
|
||||||
|
|
||||||
@@ -391,6 +393,8 @@ private:
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
Q_DECLARE_TYPEINFO(KSyntaxHighlighting::Definition, Q_MOVABLE_TYPE);
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif
|
|
||||||
diff --git a/src/lib/foldingregion.h b/src/lib/foldingregion.h
|
|
||||||
index baf65d1..074b947 100644
|
|
||||||
--- a/src/lib/foldingregion.h
|
|
||||||
+++ b/src/lib/foldingregion.h
|
|
||||||
@@ -101,6 +101,8 @@ private:
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
Q_DECLARE_TYPEINFO(KSyntaxHighlighting::FoldingRegion, Q_PRIMITIVE_TYPE);
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif
|
|
||||||
diff --git a/src/lib/format.h b/src/lib/format.h
|
|
||||||
index ba85f0d..24c58e7 100644
|
|
||||||
--- a/src/lib/format.h
|
|
||||||
+++ b/src/lib/format.h
|
|
||||||
@@ -30,10 +30,11 @@
|
|
||||||
#include <QExplicitlySharedDataPointer>
|
|
||||||
#include <QTypeInfo>
|
|
||||||
|
|
||||||
-
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QColor;
|
|
||||||
class QString;
|
|
||||||
class QXmlStreamReader;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
|
||||||
|
|
||||||
@@ -144,6 +145,8 @@ private:
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
Q_DECLARE_TYPEINFO(KSyntaxHighlighting::Format, Q_MOVABLE_TYPE);
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // KSYNTAXHIGHLIGHTING_FORMAT_H
|
|
||||||
diff --git a/src/lib/htmlhighlighter.h b/src/lib/htmlhighlighter.h
|
|
||||||
index 22d33ad..b7eda02 100644
|
|
||||||
--- a/src/lib/htmlhighlighter.h
|
|
||||||
+++ b/src/lib/htmlhighlighter.h
|
|
||||||
@@ -32,8 +32,10 @@
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QFile;
|
|
||||||
class QTextStream;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
|
||||||
|
|
||||||
diff --git a/src/lib/keywordlist_p.h b/src/lib/keywordlist_p.h
|
|
||||||
index fa70f11..8c41aab 100644
|
|
||||||
--- a/src/lib/keywordlist_p.h
|
|
||||||
+++ b/src/lib/keywordlist_p.h
|
|
||||||
@@ -30,7 +30,9 @@
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QXmlStreamReader;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
|
||||||
|
|
||||||
diff --git a/src/lib/repository.h b/src/lib/repository.h
|
|
||||||
index 2c32d02..c35da5e 100644
|
|
||||||
--- a/src/lib/repository.h
|
|
||||||
+++ b/src/lib/repository.h
|
|
||||||
@@ -29,8 +29,10 @@
|
|
||||||
#include <qglobal.h>
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QString;
|
|
||||||
template <typename T> class QVector;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @namespace KSyntaxHighlighting
|
|
||||||
diff --git a/src/lib/repository_p.h b/src/lib/repository_p.h
|
|
||||||
index da765a2..9db876b 100644
|
|
||||||
--- a/src/lib/repository_p.h
|
|
||||||
+++ b/src/lib/repository_p.h
|
|
||||||
@@ -27,7 +27,9 @@
|
|
||||||
#include <QHash>
|
|
||||||
#include <QVector>
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QString;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
|
||||||
|
|
||||||
diff --git a/src/lib/rule_p.h b/src/lib/rule_p.h
|
|
||||||
index eccf0df..538fded 100644
|
|
||||||
--- a/src/lib/rule_p.h
|
|
||||||
+++ b/src/lib/rule_p.h
|
|
||||||
@@ -38,7 +38,9 @@
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QXmlStreamReader;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
|
||||||
|
|
||||||
diff --git a/src/lib/state.h b/src/lib/state.h
|
|
||||||
index c6e5344..fce4bc7 100644
|
|
||||||
--- a/src/lib/state.h
|
|
||||||
+++ b/src/lib/state.h
|
|
||||||
@@ -79,6 +79,8 @@ private:
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
Q_DECLARE_TYPEINFO(KSyntaxHighlighting::State, Q_MOVABLE_TYPE);
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // KSYNTAXHIGHLIGHTING_STATE_H
|
|
||||||
diff --git a/src/lib/theme.h b/src/lib/theme.h
|
|
||||||
index 5277429..adb8431 100644
|
|
||||||
--- a/src/lib/theme.h
|
|
||||||
+++ b/src/lib/theme.h
|
|
||||||
@@ -371,6 +371,8 @@ private:
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
Q_DECLARE_TYPEINFO(KSyntaxHighlighting::Theme, Q_MOVABLE_TYPE);
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // KSYNTAXHIGHLIGHTING_THEME_H
|
|
||||||
diff --git a/src/lib/themedata_p.h b/src/lib/themedata_p.h
|
|
||||||
index 68cb873..3b5f463 100644
|
|
||||||
--- a/src/lib/themedata_p.h
|
|
||||||
+++ b/src/lib/themedata_p.h
|
|
||||||
@@ -163,6 +163,8 @@ private:
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
Q_DECLARE_TYPEINFO(KSyntaxHighlighting::TextStyleData, Q_MOVABLE_TYPE);
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // KSYNTAXHIGHLIGHTING_THEMEDATA_P_H
|
|
||||||
diff --git a/src/lib/wildcardmatcher.cpp b/src/lib/wildcardmatcher.cpp
|
|
||||||
index 963e78d..167295a 100644
|
|
||||||
--- a/src/lib/wildcardmatcher.cpp
|
|
||||||
+++ b/src/lib/wildcardmatcher.cpp
|
|
||||||
@@ -79,5 +79,5 @@ static bool exactMatch(const QString &candidate, const QString &wildcard, int ca
|
|
||||||
bool WildcardMatcher::exactMatch(const QString &candidate, const QString &wildcard,
|
|
||||||
bool caseSensitive)
|
|
||||||
{
|
|
||||||
- return exactMatch(candidate, wildcard, candidate.length() - 1, wildcard.length() - 1, caseSensitive);
|
|
||||||
+ return ::exactMatch(candidate, wildcard, candidate.length() - 1, wildcard.length() - 1, caseSensitive);
|
|
||||||
}
|
|
||||||
diff --git a/src/lib/wildcardmatcher_p.h b/src/lib/wildcardmatcher_p.h
|
|
||||||
index 823dbd5..016b10f 100644
|
|
||||||
--- a/src/lib/wildcardmatcher_p.h
|
|
||||||
+++ b/src/lib/wildcardmatcher_p.h
|
|
||||||
@@ -24,7 +24,11 @@
|
|
||||||
#ifndef KSYNTAXHIGHLIGHTING_WILDCARDMATCHER_P_H
|
|
||||||
#define KSYNTAXHIGHLIGHTING_WILDCARDMATCHER_P_H
|
|
||||||
|
|
||||||
+#include <QtGlobal>
|
|
||||||
+
|
|
||||||
+QT_BEGIN_NAMESPACE
|
|
||||||
class QString;
|
|
||||||
+QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
|
||||||
|
|
||||||
--
|
|
||||||
2.20.1.windows.1
|
|
||||||
|
|
@@ -1,29 +0,0 @@
|
|||||||
From 3c05e92c71f6675fa2071036dafbc8d337bd2d01 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alessandro Portale <alessandro.portale@qt.io>
|
|
||||||
Date: Tue, 12 Feb 2019 19:27:46 +0100
|
|
||||||
Subject: [PATCH 5/6] Prevent assertion in RegExpr::doLoad
|
|
||||||
|
|
||||||
---
|
|
||||||
src/lib/rule.cpp | 6 +++++-
|
|
||||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/lib/rule.cpp b/src/lib/rule.cpp
|
|
||||||
index a201375..c48753b 100644
|
|
||||||
--- a/src/lib/rule.cpp
|
|
||||||
+++ b/src/lib/rule.cpp
|
|
||||||
@@ -575,7 +575,11 @@ bool RegExpr::doLoad(QXmlStreamReader& reader)
|
|
||||||
}
|
|
||||||
|
|
||||||
// always using m_regexp.isValid() would be better, but parses the regexp and thus is way too expensive for release builds
|
|
||||||
- Q_ASSERT(m_regexp.isValid());
|
|
||||||
+
|
|
||||||
+ if (Log().isDebugEnabled()) {
|
|
||||||
+ if (!m_regexp.isValid())
|
|
||||||
+ qCDebug(Log) << "Invalid regexp:" << m_regexp.pattern();
|
|
||||||
+ }
|
|
||||||
return !m_regexp.pattern().isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.20.1.windows.1
|
|
||||||
|
|
@@ -1,101 +0,0 @@
|
|||||||
From 4b64058fe7d788ac79c16a08b280ce05d500e9fb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alessandro Portale <alessandro.portale@qt.io>
|
|
||||||
Date: Tue, 12 Feb 2019 19:32:54 +0100
|
|
||||||
Subject: [PATCH 6/6] Syntax Highlighter: return all definitions for a file
|
|
||||||
name/mimetype
|
|
||||||
|
|
||||||
Can be used to create user controls to switch between
|
|
||||||
multiple definitions for a file or mime type.
|
|
||||||
|
|
||||||
Change-Id: I5fd3744db1e819d0d6f8448a53adaf9d2c7c168d
|
|
||||||
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
||||||
---
|
|
||||||
src/lib/repository.cpp | 17 +++++++++++++----
|
|
||||||
src/lib/repository.h | 12 ++++++++++++
|
|
||||||
2 files changed, 25 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lib/repository.cpp b/src/lib/repository.cpp
|
|
||||||
index 6b2fabd..922225a 100644
|
|
||||||
--- a/src/lib/repository.cpp
|
|
||||||
+++ b/src/lib/repository.cpp
|
|
||||||
@@ -78,7 +78,7 @@ Definition Repository::definitionForName(const QString& defName) const
|
|
||||||
return d->m_defs.value(defName);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static Definition bestCandidate(QVector<Definition>& candidates)
|
|
||||||
+static Definition bestCandidate(QVector<Definition> &&candidates)
|
|
||||||
{
|
|
||||||
if (candidates.isEmpty())
|
|
||||||
return Definition();
|
|
||||||
@@ -91,6 +91,11 @@ static Definition bestCandidate(QVector<Definition>& candidates)
|
|
||||||
}
|
|
||||||
|
|
||||||
Definition Repository::definitionForFileName(const QString& fileName) const
|
|
||||||
+{
|
|
||||||
+ return bestCandidate(definitionsForFileName(fileName));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+QVector<Definition> Repository::definitionsForFileName(const QString &fileName) const
|
|
||||||
{
|
|
||||||
QFileInfo fi(fileName);
|
|
||||||
const auto name = fi.fileName();
|
|
||||||
@@ -106,10 +111,15 @@ Definition Repository::definitionForFileName(const QString& fileName) const
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- return bestCandidate(candidates);
|
|
||||||
+ return candidates;
|
|
||||||
}
|
|
||||||
|
|
||||||
Definition Repository::definitionForMimeType(const QString& mimeType) const
|
|
||||||
+{
|
|
||||||
+ return bestCandidate(definitionsForMimeType(mimeType));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+QVector<Definition> Repository::definitionsForMimeType(const QString &mimeType) const
|
|
||||||
{
|
|
||||||
QVector<Definition> candidates;
|
|
||||||
for (auto it = d->m_defs.constBegin(); it != d->m_defs.constEnd(); ++it) {
|
|
||||||
@@ -121,8 +131,7 @@ Definition Repository::definitionForMimeType(const QString& mimeType) const
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- return bestCandidate(candidates);
|
|
||||||
+ return candidates;
|
|
||||||
}
|
|
||||||
|
|
||||||
QVector<Definition> Repository::definitions() const
|
|
||||||
diff --git a/src/lib/repository.h b/src/lib/repository.h
|
|
||||||
index c35da5e..e4e9bed 100644
|
|
||||||
--- a/src/lib/repository.h
|
|
||||||
+++ b/src/lib/repository.h
|
|
||||||
@@ -166,6 +166,13 @@ public:
|
|
||||||
*/
|
|
||||||
Definition definitionForFileName(const QString &fileName) const;
|
|
||||||
|
|
||||||
+ /**
|
|
||||||
+ * Returns all Definition%s for the file named @p fileName.
|
|
||||||
+ * The match is performed based on the \e extensions and @e mimetype of
|
|
||||||
+ * the definition files.
|
|
||||||
+ */
|
|
||||||
+ QVector<Definition> definitionsForFileName(const QString &fileName) const;
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* Returns the best matching Definition to the type named @p mimeType
|
|
||||||
*
|
|
||||||
@@ -176,6 +183,11 @@ public:
|
|
||||||
*/
|
|
||||||
Definition definitionForMimeType(const QString &mimeType) const;
|
|
||||||
|
|
||||||
+ /**
|
|
||||||
+ * Returns all Definition%s to the type named @p mimeType
|
|
||||||
+ */
|
|
||||||
+ QVector<Definition> definitionsForMimeType(const QString &mimeType) const;
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* Returns all available Definition%s.
|
|
||||||
* Definition%ss are ordered by translated section and translated names,
|
|
||||||
--
|
|
||||||
2.20.1.windows.1
|
|
||||||
|
|
Reference in New Issue
Block a user