Editor: update ksyntaxhighlighting engine to v5.95.0

Task-number: QTCREATORBUG-22558
Change-Id: I475730f342e7cc822fecdf7c9db64dc47baea83a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2022-06-29 12:02:47 +02:00
parent 5edbf915a4
commit 56faa204bd
27 changed files with 845 additions and 72 deletions

View File

@@ -1,4 +1,5 @@
# clang-format
56ed6f3f5f505eb0dbffc630729d67c3fb510546
ba947348217c468a0cea117289f3a3fc43bb66e6
#clang-tidy
0960472cc3f57831a97697a4ae0cd139e2cc5551

View File

@@ -3,3 +3,8 @@
include:
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android-qt6.yml

View File

@@ -5,3 +5,8 @@ Dependencies:
Options:
test-before-installing: True
require-passing-tests-on: [ 'Linux', 'FreeBSD', 'Windows' ]
# exclude stuff from cppcheck that takes too long
cppcheck-ignore-files:
- 'src/lib/abstracthighlighter.cpp'

View File

@@ -1,8 +1,8 @@
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(Qt5Core @REQUIRED_QT_VERSION@)
find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)
find_dependency(Qt@QT_MAJOR_VERSION@Core @REQUIRED_QT_VERSION@)
find_dependency(Qt@QT_MAJOR_VERSION@Gui @REQUIRED_QT_VERSION@)
include("${CMAKE_CURRENT_LIST_DIR}/KF5SyntaxHighlightingTargets.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@

View File

@@ -3,10 +3,10 @@
#ifndef SyntaxHighlighting_VERSION_H
#define SyntaxHighlighting_VERSION_H
#define SyntaxHighlighting_VERSION_STRING "5.90.0"
#define SyntaxHighlighting_VERSION_STRING "5.95.0"
#define SyntaxHighlighting_VERSION_MAJOR 5
#define SyntaxHighlighting_VERSION_MINOR 90
#define SyntaxHighlighting_VERSION_MINOR 95
#define SyntaxHighlighting_VERSION_PATCH 0
#define SyntaxHighlighting_VERSION ((5<<16)|(90<<8)|(0))
#define SyntaxHighlighting_VERSION ((5<<16)|(95<<8)|(0))
#endif

View File

@@ -88,7 +88,7 @@
#define KSYNTAXHIGHLIGHTING_BUILD_DEPRECATED_SINCE(major, minor) 1
#ifdef KSYNTAXHIGHLIGHTING_NO_DEPRECATED
# define KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT 0x55a00
# define KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT 0x55f00
#endif
#ifdef KSYNTAXHIGHLIGHTING_NO_DEPRECATED_WARNINGS
# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0
@@ -98,7 +98,7 @@
# ifdef KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT
# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT
# else
# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0x55a00
# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0x55f00
# endif
#endif
@@ -178,7 +178,7 @@
#define KSYNTAXHIGHLIGHTING_BUILD_DEPRECATED_SINCE(major, minor) 1
#ifdef KSYNTAXHIGHLIGHTING_NO_DEPRECATED
# define KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT 0x55a00
# define KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT 0x55f00
#endif
#ifdef KSYNTAXHIGHLIGHTING_NO_DEPRECATED_WARNINGS
# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0
@@ -188,7 +188,7 @@
# ifdef KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT
# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT
# else
# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0x55a00
# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0x55f00
# endif
#endif

View File

@@ -3,9 +3,5 @@
#include "ksyntaxhighlighting_logging.h"
namespace KSyntaxHighlighting {
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
Q_LOGGING_CATEGORY(Log, "kf.syntaxhighlighting", QtInfoMsg)
#else
Q_LOGGING_CATEGORY(Log, "kf.syntaxhighlighting")
#endif
}

View File

@@ -0,0 +1 @@
Pipfile.lock

View File

@@ -0,0 +1,11 @@
# kate: hl toml;
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
click = "~= 8.0"
jinja2 = "~= 3.0"
PyYAML = "*"

View File

@@ -1,4 +1,4 @@
version: 37
version: 38
global-properties:
- ALLOW_DUPLICATE_CUSTOM_TARGETS
@@ -168,6 +168,7 @@ target-properties:
- DEPLOYMENT_REMOTE_DIRECTORY
- DEPRECATION # Since 3.17
- DISABLE_PRECOMPILE_HEADERS # Since 3.16
- DOTNET_SDK # Since 3.23
- DOTNET_TARGET_FRAMEWORK # Since 3.17
- DOTNET_TARGET_FRAMEWORK_VERSION # Since 3.12
- EchoString
@@ -188,6 +189,15 @@ target-properties:
- GENERATOR_FILE_NAME
- GNUtoMS
- HAS_CXX
- HEADER_DIRS # Since 3.23
- HEADER_DIRS_<NAME> # Since 3.23
- HEADER_SET # Since 3.23
- HEADER_SET_<NAME> # Since 3.23
- HEADER_SETS # Since 3.23
- HIP_ARCHITECTURES # Since 3.21
- HIP_EXTENSIONS # Since 3.21
- HIP_STANDARD # Since 3.21
- HIP_STANDARD_REQUIRED # Since 3.21
- IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
- IMPORTED_COMMON_LANGUAGE_RUNTIME # Since 3.12
- IMPORTED_CONFIGURATIONS
@@ -208,6 +218,7 @@ target-properties:
- IMPORTED_LOCATION
- IMPORTED_NO_SONAME_<CONFIG>
- IMPORTED_NO_SONAME
- IMPORTED_NO_SYSTEM # Since 3.23
- IMPORTED_OBJECTS_<CONFIG>
- IMPORTED_OBJECTS
- IMPORTED
@@ -224,6 +235,7 @@ target-properties:
- INTERFACE_COMPILE_DEFINITIONS
- INTERFACE_COMPILE_FEATURES
- INTERFACE_COMPILE_OPTIONS
- INTERFACE_HEADER_SETS # Since 3.23
- INTERFACE_INCLUDE_DIRECTORIES
- INTERFACE_LINK_DEPENDS # Since 3.13
- INTERFACE_LINK_DIRECTORIES # Since 3.13
@@ -264,6 +276,7 @@ target-properties:
- LINK_INTERFACE_MULTIPLICITY_<CONFIG>
- LINK_INTERFACE_MULTIPLICITY
- LINK_LIBRARIES
- LINK_LIBRARIES_ONLY_TARGETS # Since 3.23
- LINK_OPTIONS # Since 3.13
- LINK_SEARCH_END_STATIC
- LINK_SEARCH_START_STATIC
@@ -390,6 +403,7 @@ target-properties:
- XCODE_SCHEME_ARGUMENTS # Since 3.13
- XCODE_SCHEME_DEBUG_AS_ROOT # Since 3.15
- XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING # Since 3.16
- XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE # Since 3.23
- XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER # Since 3.13
- XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE # Since 3.13
- XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS # Since 3.13
@@ -622,6 +636,7 @@ variables:
- CMAKE_CURRENT_SOURCE_DIR
- CMAKE_DIRECTORY_LABELS # Since 3.10
- CMAKE_DL_LIBS
- CMAKE_DOTNET_SDK # Since 3.23
- CMAKE_DOTNET_TARGET_FRAMEWORK # Since 3.17
- CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION # Since 3.12
- CMAKE_EDIT_COMMAND
@@ -690,6 +705,7 @@ variables:
- CMAKE_VS_DEVENV_COMMAND
- CMAKE_VS_MSBUILD_COMMAND
- CMAKE_VS_NsightTegra_VERSION
- CMAKE_VS_NUGET_PACKAGE_RESTORE # Since 3.23
- CMAKE_VS_PLATFORM_NAME
- CMAKE_VS_PLATFORM_TOOLSET
- CMAKE_VS_PLATFORM_TOOLSET_CUDA
@@ -771,6 +787,7 @@ variables:
- CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY # Since 3.16
- CMAKE_FRAMEWORK_PATH
- CMAKE_IGNORE_PATH
- CMAKE_IGNORE_PREFIX_PATH # Since 3.23
- CMAKE_INCLUDE_DIRECTORIES_BEFORE
- CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE
- CMAKE_INCLUDE_PATH
@@ -781,6 +798,7 @@ variables:
- CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
- CMAKE_LIBRARY_PATH
- CMAKE_LINK_DIRECTORIES_BEFORE # Since 3.13
- CMAKE_LINK_LIBRARIES_ONLY_TARGETS # Since 3.23
- CMAKE_MAXIMUM_RECURSION_DEPTH # Since 3.14
- CMAKE_MFC_FLAG
- CMAKE_MODULE_PATH
@@ -803,6 +821,7 @@ variables:
- CMAKE_SYSTEM_APPBUNDLE_PATH
- CMAKE_SYSTEM_FRAMEWORK_PATH
- CMAKE_SYSTEM_IGNORE_PATH
- CMAKE_SYSTEM_IGNORE_PREFIX_PATH # Since 3.23
- CMAKE_SYSTEM_INCLUDE_PATH
- CMAKE_SYSTEM_LIBRARY_PATH
- CMAKE_SYSTEM_PREFIX_PATH
@@ -817,6 +836,7 @@ variables:
- CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN # Since 3.13
- CMAKE_XCODE_SCHEME_WORKING_DIRECTORY # Since 3.17
- CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING # Since 3.16
- CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE # Since 3.23
- CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER # Since 3.13
- CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE # Since 3.13
- CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS # Since 3.13
@@ -1186,6 +1206,7 @@ variables:
- CTEST_RUN_CURRENT_SCRIPT # Since 3.11
- CTEST_SCP_COMMAND
- CTEST_SITE
- CTEST_SUBMIT_INACTIVITY_TIMEOUT # Since 3.23
- CTEST_SUBMIT_URL # Since 3.14
- CTEST_SOURCE_DIRECTORY
- CTEST_SVN_COMMAND
@@ -1313,6 +1334,15 @@ variables:
- CMAKE_C_LINK_NO_PIE_SUPPORTED
- CMAKE_CXX_LINK_NO_PIE_SUPPORTED
- CMAKE_Fortran_LINK_NO_PIE_SUPPORTED
# Since 3.23
- CMAKE_OBJC_LINK_PIE_SUPPORTED
- CMAKE_OBJC_LINK_NO_PIE_SUPPORTED
- CMAKE_OBJCXX_LINK_PIE_SUPPORTED
- CMAKE_OBJCXX_LINK_NO_PIE_SUPPORTED
- CMAKE_CUDA_LINK_PIE_SUPPORTED
- CMAKE_CUDA_LINK_NO_PIE_SUPPORTED
- CMAKE_HIP_LINK_PIE_SUPPORTED
- CMAKE_HIP_LINK_NO_PIE_SUPPORTED
# - CheckPrototypeDefinition
# - CheckStructHasMember
# - CheckSymbolExists
@@ -1475,11 +1505,19 @@ variables:
- CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE
- CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS
- CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH
- CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE # Since 3.23
- CPACK_IFW_PACKAGE_CONTROL_SCRIPT
- CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR # Since 3.11
- CPACK_IFW_PACKAGE_RESOURCES
- CPACK_IFW_REPOSITORIES_ALL
- CPACK_IFW_DOWNLOAD_ALL
- CPACK_IFW_PACKAGE_PRODUCT_IMAGES # Since 3.23
- CPACK_IFW_PACKAGE_RUN_PROGRAM # Since 3.23
- CPACK_IFW_PACKAGE_RUN_PROGRAM_ARGUMENTS # Since 3.23
- CPACK_IFW_PACKAGE_RUN_PROGRAM_DESCRIPTION # Since 3.23
- CPACK_IFW_PACKAGE_SIGNING_IDENTITY # Since 3.23
- CPACK_IFW_ARCHIVE_FORMAT # Since 3.23
- CPACK_IFW_ARCHIVE_COMPRESSION # Since 3.23
- CPACK_IFW_RESOLVE_DUPLICATE_NAMES
- CPACK_IFW_PACKAGES_DIRECTORIES
- CPACK_IFW_FRAMEWORK_VERSION
@@ -1567,6 +1605,7 @@ variables:
# - CPackPackageMaker is deprecated and gonna be removed in next versions of CPack
# - CPackProductBuild
- CPACK_COMMAND_PRODUCTBUILD
- CPACK_PRODUCTBUILD_IDENTIFIER # Since 3.23
- CPACK_PRODUCTBUILD_IDENTITY_NAME
- CPACK_PRODUCTBUILD_KEYCHAIN_PATH
- CPACK_COMMAND_PKGBUILD
@@ -1575,6 +1614,10 @@ variables:
- CPACK_PREFLIGHT_<COMP>_SCRIPT # Since 3.1?
- CPACK_POSTFLIGHT_<COMP>_SCRIPT # Since 3.1?
- CPACK_PRODUCTBUILD_RESOURCES_DIR
- CPACK_PRODUCTBUILD_DOMAINS # Since 3.23
- CPACK_PRODUCTBUILD_DOMAINS_ANYWHERE # Since 3.23
- CPACK_PRODUCTBUILD_DOMAINS_USER # Since 3.23
- CPACK_PRODUCTBUILD_DOMAINS_ROOT # Since 3.23
- CPACK_PRODUCTBUILD_BACKGROUND # Since 3.17
- CPACK_PRODUCTBUILD_BACKGROUND_ALIGNMENT # Since 3.17
- CPACK_PRODUCTBUILD_BACKGROUND_SCALING # Since 3.17
@@ -1750,6 +1793,7 @@ variables:
- CPACK_WIX_ROOT_FOLDER_ID
- CPACK_WIX_ROOT
- CPACK_WIX_CUSTOM_XMLNS # Since 3.19
- CPACK_WIX_SKIP_WIX_UI_EXTENSION # Since 3.23
# - CTest
# - Dart
- BUILD_TESTING
@@ -2535,6 +2579,8 @@ environment-variables:
- CMAKE_FRAMEWORK_PATH
- CMAKE_APPBUNDLE_PATH
- PATH
# Environment Variables recognized by some standard modules
- QTIFWDIR
scripting-commands:
-
@@ -3389,7 +3435,20 @@ project-commands:
named-args: [EXTRA_INCLUDE, FUNCTION]
-
name: define_property
named-args: [GLOBAL, DIRECTORY, DIRECTORY, SOURCE, TEST, VARIABLE, CACHED_VARIABLE, PROPERTY, INHERITED, BRIEF_DOCS, FULL_DOCS]
named-args: [
GLOBAL
, DIRECTORY
, DIRECTORY
, SOURCE
, TEST
, VARIABLE
, CACHED_VARIABLE
, PROPERTY
, INHERITED
, BRIEF_DOCS
, FULL_DOCS
, INITIALIZE_FROM_VARIABLE # Since 3.23
]
property-args: *get-property
-
name: enable_language
@@ -3468,6 +3527,7 @@ project-commands:
, PRIVATE_HEADER
, PUBLIC_HEADER
, RESOURCE
, FILE_SET # Since 3.23
, INCLUDES
, NAMELINK_ONLY
, NAMELINK_SKIP
@@ -3707,7 +3767,16 @@ project-commands:
first-arg-is-target?: true
-
name: target_sources
named-args: *target_compile_definitions
named-args: [
INTERFACE
, PUBLIC
, PRIVATE
# Since 3.23
, FILE_SET
, TYPE
, BASE_DIRS
, FILES
]
first-arg-is-target?: true
-
name: try_compile
@@ -4230,7 +4299,11 @@ standard-module-commands:
-
name: check_pie_supported
named-args: [OUTPUT_VARIABLE, LANGUAGES]
special-args: *ccxxf
special-args: [
C, CXX, Fortran,
# Since 3.23
OBJC, OBJCXX, CUDA, HIP
]
# CheckPrototypeDefinition
- name: check_prototype_definition
# CheckSourceCompiles
@@ -4536,6 +4609,7 @@ standard-module-commands:
- LOG_OUTPUT_ON_FAILURE
- USES_TERMINAL_DOWNLOAD
- USES_TERMINAL_UPDATE
- USES_TERMINAL_PATCH # Since 3.23
- USES_TERMINAL_CONFIGURE
- USES_TERMINAL_BUILD
- USES_TERMINAL_INSTALL

View File

@@ -39,7 +39,7 @@
<!ENTITY arithmetic_as_subshell "\(((?:[^`'&quot;()$]++|\$\{[^`'&quot;(){}$]+\}|\$(?=[^{`'&quot;()])|`[^`]*+`|\((?1)(?:[)]|(?=['&quot;])))++)(?:[)](?=$|[^)])|[&quot;'])">
]>
<language name="Bash" version="34" kateversion="5.79" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.exlib;*.exheres-0;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<language name="Bash" version="39" kateversion="5.79" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.exlib;*.exheres-0;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl)
Changes by Matthew Woehlke (mw_triad@users.sourceforge.net)
@@ -553,6 +553,8 @@
<AnyChar attribute="Error" context="#stay" String=")}"/>
<LineContinue attribute="Escape" context="#stay"/>
<Detect2Chars attribute="Expression" context="#stay" char="!" char1=" "/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="MaybeBracketExpression" fallthroughContext="#pop!Command">
<!-- start expression in double brackets -->
@@ -785,16 +787,30 @@
<!-- FindPathThenPopInAlternateValue consumes path in ${xx:here}-->
<context attribute="Normal Text" lineEndContext="#pop" name="FindPathThenPopInAlternateValue">
<IncludeRules context="FindExtGlobAndPopInAlternateValue"/>
<AnyChar attribute="Glob" context="PathThenPopInAlternateValue" String="?*"/>
<RegExpr attribute="Path" context="PathThenPopInAlternateValue" String="&pathpart_alt;"/>
<Detect2Chars context="#pop!PathThenPopInAlternateValue" char="?" char1="(" lookAhead="1"/>
<Detect2Chars context="#pop!PathThenPopInAlternateValue" char="*" char1="(" lookAhead="1"/>
<Detect2Chars context="#pop!PathThenPopInAlternateValue" char="+" char1="(" lookAhead="1"/>
<Detect2Chars context="#pop!PathThenPopInAlternateValue" char="@" char1="(" lookAhead="1"/>
<Detect2Chars context="#pop!PathThenPopInAlternateValue" char="!" char1="(" lookAhead="1"/>
<AnyChar attribute="Glob" context="#pop!PathThenPopInAlternateValue" String="?*"/>
<RegExpr attribute="Path" context="#pop!PathThenPopInAlternateValue" String="&pathpart_alt;"/>
</context>
<context attribute="Path" lineEndContext="#stay" name="FindExtGlobAndPopInAlternateValue">
<context attribute="Path" lineEndContext="#pop#pop" name="PathThenPopInAlternateValue">
<DetectChar attribute="Parameter Expansion" context="#pop" char="}"/>
<IncludeRules context="FindWord"/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPopInAlternateValue" char="?" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPopInAlternateValue" char="*" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPopInAlternateValue" char="+" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPopInAlternateValue" char="@" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPopInAlternateValue" char="!" char1="("/>
<AnyChar attribute="Glob" context="#stay" String="?*"/>
<RegExpr attribute="Path" context="#stay" String="&path_alt;"/>
</context>
<context attribute="Path" lineEndContext="#stay" name="ExtGlobAndPopInAlternateValue">
<DetectChar attribute="Glob" context="#pop" char=")"/>
<DetectChar attribute="Error" context="#pop#pop" char="}"/>
<IncludeRules context="FindWord"/>
<IncludeRules context="FindExtGlobInAlternateValue"/>
</context>
<context attribute="Path" lineEndContext="#stay" name="FindExtGlobInAlternateValue">
<Detect2Chars attribute="Glob" context="RecursiveExtGlobInAlternateValue" char="?" char1="("/>
@@ -810,19 +826,6 @@
<IncludeRules context="FindWord"/>
<IncludeRules context="FindExtGlobInAlternateValue"/>
</context>
<context attribute="Path" lineEndContext="#stay" name="ExtGlobAndPopInAlternateValue">
<DetectChar attribute="Glob" context="#pop!PathThenPopInAlternateValue" char=")"/>
<DetectChar attribute="Error" context="#pop#pop" char="}"/>
<IncludeRules context="FindWord"/>
<IncludeRules context="FindExtGlobInAlternateValue"/>
</context>
<context attribute="Path" lineEndContext="#pop#pop" name="PathThenPopInAlternateValue">
<DetectChar attribute="Parameter Expansion" context="#pop#pop" char="}"/>
<IncludeRules context="FindWord"/>
<IncludeRules context="FindExtGlobAndPopInAlternateValue"/>
<AnyChar attribute="Glob" context="#stay" String="?*"/>
<RegExpr attribute="Path" context="#stay" String="&path_alt;"/>
</context>
<context attribute="Pattern" lineEndContext="#stay" name="FindPattern">
<Detect2Chars attribute="Glob" context="ExtPattern" char="?" char1="("/>
@@ -1402,6 +1405,7 @@
<!-- ExprDblBracket consumes an expression till ]] -->
<context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracket" fallthroughContext="#pop!ExprDblBracketNot">
<DetectSpaces attribute="Normal Text" context="#stay"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
<IncludeRules context="FindExprDblBracketEnd"/>
</context>
@@ -1415,10 +1419,13 @@
<context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam1" fallthroughContext="ExprDblBracketValue">
<DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketParam2"/>
<DetectChar context="TestMaybeUnary" char="-" lookAhead="1"/>
<DetectChar context="TestMaybeUnary2" char="-" lookAhead="1"/>
<AnyChar attribute="Expression" context="#pop!ExprDblBracketParam3Spe" String="&lt;>"/>
<IncludeRules context="FindExprDblBracketEnd"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeUnary2" fallthroughContext="#pop!ExprDblBracketValue">
<IncludeRules context="TestMaybeUnary"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValue">
<Detect2Chars context="ExprDblBracketDblParentOrSubValue" char="(" char1="(" lookAhead="1"/>
@@ -1465,7 +1472,7 @@
<DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketParam3"/>
</context>
<context attribute="Normal Text" lineEndContext="ExprDblBracketFinal" name="ExprDblBracketParam3" fallthroughContext="ExprDblBracketValue">
<context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam3" fallthroughContext="ExprDblBracketValue">
<DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketFinal"/>
<IncludeRules context="FindExprDblBracketEnd"/>
<AnyChar attribute="Error" context="#stay" String="&lt;>"/>
@@ -1474,6 +1481,7 @@
<context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketFinal" fallthroughContext="ExprDblBracketValue">
<DetectSpaces attribute="Normal Text" context="#stay"/>
<IncludeRules context="FindExprDblBracketEnd"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
<RegExpr attribute="Error" context="#pop" String="(?:[^] &tab;]++|\](?:[^]]|\][^ &tab;]))++" endRegion="expression"/>
</context>
@@ -1489,7 +1497,7 @@
</context>
<context attribute="Pattern" lineEndContext="#stay" name="Regex">
<DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketFinal"/>
<DetectChar attribute="Error" context="#stay" char=")"/>
<DetectChar attribute="Operator" context="#pop" char=")"/>
<Detect2Chars attribute="Operator" context="RegexChar" char="[" char1="^"/>
<DetectChar attribute="Operator" context="RegexChar" char="["/>
<IncludeRules context="FindRegex"/>

View File

@@ -25,7 +25,7 @@
<language
name="CMake"
version="37"
version="38"
kateversion="5.0"
section="Other"
extensions="CMakeLists.txt;*.cmake;*.cmake.in"
@@ -966,6 +966,7 @@
<item>FULL_DOCS</item>
<item>GLOBAL</item>
<item>INHERITED</item>
<item>INITIALIZE_FROM_VARIABLE</item>
<item>PROPERTY</item>
<item>SOURCE</item>
<item>TEST</item>
@@ -1034,6 +1035,7 @@
<item>FILES</item>
<item>FILES_MATCHING</item>
<item>FILE_PERMISSIONS</item>
<item>FILE_SET</item>
<item>FRAMEWORK</item>
<item>IMPORTED_RUNTIME_ARTIFACTS</item>
<item>INCLUDES</item>
@@ -1263,9 +1265,13 @@
<item>REUSE_FROM</item>
</list>
<list name="target_sources_nargs">
<item>BASE_DIRS</item>
<item>FILES</item>
<item>FILE_SET</item>
<item>INTERFACE</item>
<item>PRIVATE</item>
<item>PUBLIC</item>
<item>TYPE</item>
</list>
<list name="try_compile_nargs">
<item>CMAKE_FLAGS</item>
@@ -1470,8 +1476,12 @@
</list>
<list name="check_pie_supported_sargs">
<item>C</item>
<item>CUDA</item>
<item>CXX</item>
<item>Fortran</item>
<item>HIP</item>
<item>OBJC</item>
<item>OBJCXX</item>
</list>
<list name="check_source_compiles_nargs">
<item>FAIL_REGEX</item>
@@ -1729,6 +1739,7 @@
<item>USES_TERMINAL_CONFIGURE</item>
<item>USES_TERMINAL_DOWNLOAD</item>
<item>USES_TERMINAL_INSTALL</item>
<item>USES_TERMINAL_PATCH</item>
<item>USES_TERMINAL_TEST</item>
<item>USES_TERMINAL_UPDATE</item>
</list>
@@ -2256,6 +2267,8 @@
<item>CMAKE_CUDA_COMPILE_FEATURES</item>
<item>CMAKE_CUDA_EXTENSIONS</item>
<item>CMAKE_CUDA_HOST_COMPILER</item>
<item>CMAKE_CUDA_LINK_NO_PIE_SUPPORTED</item>
<item>CMAKE_CUDA_LINK_PIE_SUPPORTED</item>
<item>CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS</item>
<item>CMAKE_CUDA_RUNTIME_LIBRARY</item>
<item>CMAKE_CUDA_SEPARABLE_COMPILATION</item>
@@ -2291,6 +2304,7 @@
<item>CMAKE_DIRECTORY_LABELS</item>
<item>CMAKE_DISABLE_PRECOMPILE_HEADERS</item>
<item>CMAKE_DL_LIBS</item>
<item>CMAKE_DOTNET_SDK</item>
<item>CMAKE_DOTNET_TARGET_FRAMEWORK</item>
<item>CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION</item>
<item>CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES</item>
@@ -2370,6 +2384,8 @@
<item>CMAKE_HAS_ANSI_STRING_STREAM</item>
<item>CMAKE_HIP_ARCHITECTURES</item>
<item>CMAKE_HIP_EXTENSIONS</item>
<item>CMAKE_HIP_LINK_NO_PIE_SUPPORTED</item>
<item>CMAKE_HIP_LINK_PIE_SUPPORTED</item>
<item>CMAKE_HIP_STANDARD</item>
<item>CMAKE_HIP_STANDARD_REQUIRED</item>
<item>CMAKE_HOST_APPLE</item>
@@ -2382,6 +2398,7 @@
<item>CMAKE_HOST_WIN32</item>
<item>CMAKE_HP_PTHREADS_INIT</item>
<item>CMAKE_IGNORE_PATH</item>
<item>CMAKE_IGNORE_PREFIX_PATH</item>
<item>CMAKE_IMPORT_LIBRARY_PREFIX</item>
<item>CMAKE_IMPORT_LIBRARY_SUFFIX</item>
<item>CMAKE_INCLUDE_CURRENT_DIR</item>
@@ -2461,6 +2478,7 @@
<item>CMAKE_LINK_DEPENDS_NO_SHARED</item>
<item>CMAKE_LINK_DIRECTORIES_BEFORE</item>
<item>CMAKE_LINK_INTERFACE_LIBRARIES</item>
<item>CMAKE_LINK_LIBRARIES_ONLY_TARGETS</item>
<item>CMAKE_LINK_LIBRARY_FILE_FLAG</item>
<item>CMAKE_LINK_LIBRARY_FLAG</item>
<item>CMAKE_LINK_LIBRARY_SUFFIX</item>
@@ -2496,9 +2514,13 @@
<item>CMAKE_NO_STD_NAMESPACE</item>
<item>CMAKE_NO_SYSTEM_FROM_IMPORTED</item>
<item>CMAKE_OBJCXX_EXTENSIONS</item>
<item>CMAKE_OBJCXX_LINK_NO_PIE_SUPPORTED</item>
<item>CMAKE_OBJCXX_LINK_PIE_SUPPORTED</item>
<item>CMAKE_OBJCXX_STANDARD</item>
<item>CMAKE_OBJCXX_STANDARD_REQUIRED</item>
<item>CMAKE_OBJC_EXTENSIONS</item>
<item>CMAKE_OBJC_LINK_NO_PIE_SUPPORTED</item>
<item>CMAKE_OBJC_LINK_PIE_SUPPORTED</item>
<item>CMAKE_OBJC_STANDARD</item>
<item>CMAKE_OBJC_STANDARD_REQUIRED</item>
<item>CMAKE_OBJECT_PATH_MAX</item>
@@ -2564,6 +2586,7 @@
<item>CMAKE_SYSTEM_APPBUNDLE_PATH</item>
<item>CMAKE_SYSTEM_FRAMEWORK_PATH</item>
<item>CMAKE_SYSTEM_IGNORE_PATH</item>
<item>CMAKE_SYSTEM_IGNORE_PREFIX_PATH</item>
<item>CMAKE_SYSTEM_INCLUDE_PATH</item>
<item>CMAKE_SYSTEM_LIBRARY_PATH</item>
<item>CMAKE_SYSTEM_NAME</item>
@@ -2596,6 +2619,7 @@
<item>CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD</item>
<item>CMAKE_VS_JUST_MY_CODE_DEBUGGING</item>
<item>CMAKE_VS_MSBUILD_COMMAND</item>
<item>CMAKE_VS_NUGET_PACKAGE_RESTORE</item>
<item>CMAKE_VS_NsightTegra_VERSION</item>
<item>CMAKE_VS_PLATFORM_NAME</item>
<item>CMAKE_VS_PLATFORM_TOOLSET</item>
@@ -2625,6 +2649,7 @@
<item>CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER</item>
<item>CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS</item>
<item>CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE</item>
<item>CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE</item>
<item>CMAKE_XCODE_SCHEME_ENVIRONMENT</item>
<item>CMAKE_XCODE_SCHEME_GUARD_MALLOC</item>
<item>CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP</item>
@@ -2714,6 +2739,8 @@
<item>CPACK_EXTERNAL_REQUESTED_VERSIONS</item>
<item>CPACK_GENERATOR</item>
<item>CPACK_IFW_ADMIN_TARGET_DIRECTORY</item>
<item>CPACK_IFW_ARCHIVE_COMPRESSION</item>
<item>CPACK_IFW_ARCHIVE_FORMAT</item>
<item>CPACK_IFW_BINARYCREATOR_EXECUTABLE</item>
<item>CPACK_IFW_DEVTOOL_EXECUTABLE</item>
<item>CPACK_IFW_DOWNLOAD_ALL</item>
@@ -2725,15 +2752,21 @@
<item>CPACK_IFW_PACKAGE_BACKGROUND</item>
<item>CPACK_IFW_PACKAGE_BANNER</item>
<item>CPACK_IFW_PACKAGE_CONTROL_SCRIPT</item>
<item>CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE</item>
<item>CPACK_IFW_PACKAGE_GROUP</item>
<item>CPACK_IFW_PACKAGE_ICON</item>
<item>CPACK_IFW_PACKAGE_LOGO</item>
<item>CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE</item>
<item>CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME</item>
<item>CPACK_IFW_PACKAGE_NAME</item>
<item>CPACK_IFW_PACKAGE_PRODUCT_IMAGES</item>
<item>CPACK_IFW_PACKAGE_PUBLISHER</item>
<item>CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR</item>
<item>CPACK_IFW_PACKAGE_RESOURCES</item>
<item>CPACK_IFW_PACKAGE_RUN_PROGRAM</item>
<item>CPACK_IFW_PACKAGE_RUN_PROGRAM_ARGUMENTS</item>
<item>CPACK_IFW_PACKAGE_RUN_PROGRAM_DESCRIPTION</item>
<item>CPACK_IFW_PACKAGE_SIGNING_IDENTITY</item>
<item>CPACK_IFW_PACKAGE_START_MENU_DIRECTORY</item>
<item>CPACK_IFW_PACKAGE_STYLE_SHEET</item>
<item>CPACK_IFW_PACKAGE_TITLE</item>
@@ -2846,6 +2879,11 @@
<item>CPACK_PRODUCTBUILD_BACKGROUND_MIME_TYPE</item>
<item>CPACK_PRODUCTBUILD_BACKGROUND_SCALING</item>
<item>CPACK_PRODUCTBUILD_BACKGROUND_UTI</item>
<item>CPACK_PRODUCTBUILD_DOMAINS</item>
<item>CPACK_PRODUCTBUILD_DOMAINS_ANYWHERE</item>
<item>CPACK_PRODUCTBUILD_DOMAINS_ROOT</item>
<item>CPACK_PRODUCTBUILD_DOMAINS_USER</item>
<item>CPACK_PRODUCTBUILD_IDENTIFIER</item>
<item>CPACK_PRODUCTBUILD_IDENTITY_NAME</item>
<item>CPACK_PRODUCTBUILD_KEYCHAIN_PATH</item>
<item>CPACK_PRODUCTBUILD_RESOURCES_DIR</item>
@@ -2944,6 +2982,7 @@
<item>CPACK_WIX_ROOT_FEATURE_TITLE</item>
<item>CPACK_WIX_ROOT_FOLDER_ID</item>
<item>CPACK_WIX_SKIP_PROGRAM_FOLDER</item>
<item>CPACK_WIX_SKIP_WIX_UI_EXTENSION</item>
<item>CPACK_WIX_TEMPLATE</item>
<item>CPACK_WIX_UI_BANNER</item>
<item>CPACK_WIX_UI_DIALOG</item>
@@ -3010,6 +3049,7 @@
<item>CTEST_SCP_COMMAND</item>
<item>CTEST_SITE</item>
<item>CTEST_SOURCE_DIRECTORY</item>
<item>CTEST_SUBMIT_INACTIVITY_TIMEOUT</item>
<item>CTEST_SUBMIT_URL</item>
<item>CTEST_SVN_COMMAND</item>
<item>CTEST_SVN_OPTIONS</item>
@@ -3523,6 +3563,7 @@
<item>LDFLAGS</item>
<item>MACOSX_DEPLOYMENT_TARGET</item>
<item>PATH</item>
<item>QTIFWDIR</item>
<item>RC</item>
<item>RCFLAGS</item>
<item>SWIFTC</item>
@@ -3682,6 +3723,7 @@
<item>DEPLOYMENT_REMOTE_DIRECTORY</item>
<item>DEPRECATION</item>
<item>DISABLE_PRECOMPILE_HEADERS</item>
<item>DOTNET_SDK</item>
<item>DOTNET_TARGET_FRAMEWORK</item>
<item>DOTNET_TARGET_FRAMEWORK_VERSION</item>
<item>ENABLE_EXPORTS</item>
@@ -3700,6 +3742,13 @@
<item>GENERATOR_FILE_NAME</item>
<item>GNUtoMS</item>
<item>HAS_CXX</item>
<item>HEADER_DIRS</item>
<item>HEADER_SET</item>
<item>HEADER_SETS</item>
<item>HIP_ARCHITECTURES</item>
<item>HIP_EXTENSIONS</item>
<item>HIP_STANDARD</item>
<item>HIP_STANDARD_REQUIRED</item>
<item>IMPLICIT_DEPENDS_INCLUDE_TRANSFORM</item>
<item>IMPORTED</item>
<item>IMPORTED_COMMON_LANGUAGE_RUNTIME</item>
@@ -3713,6 +3762,7 @@
<item>IMPORTED_LINK_INTERFACE_MULTIPLICITY</item>
<item>IMPORTED_LOCATION</item>
<item>IMPORTED_NO_SONAME</item>
<item>IMPORTED_NO_SYSTEM</item>
<item>IMPORTED_OBJECTS</item>
<item>IMPORTED_SONAME</item>
<item>IMPORT_PREFIX</item>
@@ -3726,6 +3776,7 @@
<item>INTERFACE_COMPILE_DEFINITIONS</item>
<item>INTERFACE_COMPILE_FEATURES</item>
<item>INTERFACE_COMPILE_OPTIONS</item>
<item>INTERFACE_HEADER_SETS</item>
<item>INTERFACE_INCLUDE_DIRECTORIES</item>
<item>INTERFACE_LINK_DEPENDS</item>
<item>INTERFACE_LINK_DIRECTORIES</item>
@@ -3753,6 +3804,7 @@
<item>LINK_INTERFACE_LIBRARIES</item>
<item>LINK_INTERFACE_MULTIPLICITY</item>
<item>LINK_LIBRARIES</item>
<item>LINK_LIBRARIES_ONLY_TARGETS</item>
<item>LINK_OPTIONS</item>
<item>LINK_SEARCH_END_STATIC</item>
<item>LINK_SEARCH_START_STATIC</item>
@@ -3864,6 +3916,7 @@
<item>XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER</item>
<item>XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS</item>
<item>XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE</item>
<item>XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE</item>
<item>XCODE_SCHEME_ENVIRONMENT</item>
<item>XCODE_SCHEME_EXECUTABLE</item>
<item>XCODE_SCHEME_GUARD_MALLOC</item>
@@ -7284,7 +7337,7 @@
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Detect More target-properties">
<RegExpr attribute="Property" context="#stay" String="\b(?:XCODE_EMBED_&var_ref_re;_REMOVE_HEADERS_ON_COPY|XCODE_EMBED_&var_ref_re;_PATH|XCODE_EMBED_&var_ref_re;_CODE_SIGN_ON_COPY|XCODE_EMBED_&var_ref_re;|XCODE_ATTRIBUTE_&var_ref_re;|VS_SOURCE_SETTINGS_&var_ref_re;|VS_GLOBAL_&var_ref_re;|VS_DOTNET_REFERENCE_&var_ref_re;|VS_DOTNET_REFERENCEPROP_&var_ref_re;_TAG_&var_ref_re;|STATIC_LIBRARY_FLAGS_&var_ref_re;|RUNTIME_OUTPUT_NAME_&var_ref_re;|RUNTIME_OUTPUT_DIRECTORY_&var_ref_re;|PDB_OUTPUT_DIRECTORY_&var_ref_re;|PDB_NAME_&var_ref_re;|OUTPUT_NAME_&var_ref_re;|OSX_ARCHITECTURES_&var_ref_re;|MAP_IMPORTED_CONFIG_&var_ref_re;|LOCATION_&var_ref_re;|LINK_INTERFACE_MULTIPLICITY_&var_ref_re;|LINK_INTERFACE_LIBRARIES_&var_ref_re;|LINK_FLAGS_&var_ref_re;|LIBRARY_OUTPUT_NAME_&var_ref_re;|LIBRARY_OUTPUT_DIRECTORY_&var_ref_re;|INTERPROCEDURAL_OPTIMIZATION_&var_ref_re;|IMPORTED_SONAME_&var_ref_re;|IMPORTED_OBJECTS_&var_ref_re;|IMPORTED_NO_SONAME_&var_ref_re;|IMPORTED_LOCATION_&var_ref_re;|IMPORTED_LINK_INTERFACE_MULTIPLICITY_&var_ref_re;|IMPORTED_LINK_INTERFACE_LIBRARIES_&var_ref_re;|IMPORTED_LINK_INTERFACE_LANGUAGES_&var_ref_re;|IMPORTED_LINK_DEPENDENT_LIBRARIES_&var_ref_re;|IMPORTED_LIBNAME_&var_ref_re;|IMPORTED_IMPLIB_&var_ref_re;|FRAMEWORK_MULTI_CONFIG_POSTFIX_&var_ref_re;|EXCLUDE_FROM_DEFAULT_BUILD_&var_ref_re;|COMPILE_PDB_OUTPUT_DIRECTORY_&var_ref_re;|COMPILE_PDB_NAME_&var_ref_re;|ARCHIVE_OUTPUT_NAME_&var_ref_re;|ARCHIVE_OUTPUT_DIRECTORY_&var_ref_re;|&var_ref_re;_VISIBILITY_PRESET|&var_ref_re;_POSTFIX|&var_ref_re;_OUTPUT_NAME|&var_ref_re;_LINKER_LAUNCHER|&var_ref_re;_INCLUDE_WHAT_YOU_USE|&var_ref_re;_CPPLINT|&var_ref_re;_CPPCHECK|&var_ref_re;_COMPILER_LAUNCHER|&var_ref_re;_CLANG_TIDY)\b" />
<RegExpr attribute="Property" context="#stay" String="\b(?:XCODE_EMBED_&var_ref_re;_REMOVE_HEADERS_ON_COPY|XCODE_EMBED_&var_ref_re;_PATH|XCODE_EMBED_&var_ref_re;_CODE_SIGN_ON_COPY|XCODE_EMBED_&var_ref_re;|XCODE_ATTRIBUTE_&var_ref_re;|VS_SOURCE_SETTINGS_&var_ref_re;|VS_GLOBAL_&var_ref_re;|VS_DOTNET_REFERENCE_&var_ref_re;|VS_DOTNET_REFERENCEPROP_&var_ref_re;_TAG_&var_ref_re;|STATIC_LIBRARY_FLAGS_&var_ref_re;|RUNTIME_OUTPUT_NAME_&var_ref_re;|RUNTIME_OUTPUT_DIRECTORY_&var_ref_re;|PDB_OUTPUT_DIRECTORY_&var_ref_re;|PDB_NAME_&var_ref_re;|OUTPUT_NAME_&var_ref_re;|OSX_ARCHITECTURES_&var_ref_re;|MAP_IMPORTED_CONFIG_&var_ref_re;|LOCATION_&var_ref_re;|LINK_INTERFACE_MULTIPLICITY_&var_ref_re;|LINK_INTERFACE_LIBRARIES_&var_ref_re;|LINK_FLAGS_&var_ref_re;|LIBRARY_OUTPUT_NAME_&var_ref_re;|LIBRARY_OUTPUT_DIRECTORY_&var_ref_re;|INTERPROCEDURAL_OPTIMIZATION_&var_ref_re;|IMPORTED_SONAME_&var_ref_re;|IMPORTED_OBJECTS_&var_ref_re;|IMPORTED_NO_SONAME_&var_ref_re;|IMPORTED_LOCATION_&var_ref_re;|IMPORTED_LINK_INTERFACE_MULTIPLICITY_&var_ref_re;|IMPORTED_LINK_INTERFACE_LIBRARIES_&var_ref_re;|IMPORTED_LINK_INTERFACE_LANGUAGES_&var_ref_re;|IMPORTED_LINK_DEPENDENT_LIBRARIES_&var_ref_re;|IMPORTED_LIBNAME_&var_ref_re;|IMPORTED_IMPLIB_&var_ref_re;|HEADER_SET_&var_ref_re;|HEADER_DIRS_&var_ref_re;|FRAMEWORK_MULTI_CONFIG_POSTFIX_&var_ref_re;|EXCLUDE_FROM_DEFAULT_BUILD_&var_ref_re;|COMPILE_PDB_OUTPUT_DIRECTORY_&var_ref_re;|COMPILE_PDB_NAME_&var_ref_re;|ARCHIVE_OUTPUT_NAME_&var_ref_re;|ARCHIVE_OUTPUT_DIRECTORY_&var_ref_re;|&var_ref_re;_VISIBILITY_PRESET|&var_ref_re;_POSTFIX|&var_ref_re;_OUTPUT_NAME|&var_ref_re;_LINKER_LAUNCHER|&var_ref_re;_INCLUDE_WHAT_YOU_USE|&var_ref_re;_CPPLINT|&var_ref_re;_CPPCHECK|&var_ref_re;_COMPILER_LAUNCHER|&var_ref_re;_CLANG_TIDY)\b" />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Detect More source-properties">

View File

@@ -38,7 +38,7 @@ Changelog:
-->
<language name="CSS" version="12" kateversion="5.53" section="Markup" extensions="*.css" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
<language name="CSS" version="13" kateversion="5.53" section="Markup" extensions="*.css" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
<!-- https://www.w3.org/Style/CSS/current-work -->
<highlighting>
@@ -665,6 +665,7 @@ Changelog:
<list name="values">
<item>none</item>
<item>hidden</item>
<item>initial</item>
<item>dotted</item>
<item>dashed</item>
<item>solid</item>
@@ -729,23 +730,9 @@ Changelog:
<item>katakana</item>
<item>hiragana-iroha</item>
<item>katakana-iroha</item>
<item>inline</item>
<item>inline-block</item>
<item>block</item>
<item>list-item</item>
<item>run-in</item>
<item>compact</item>
<item>marker</item>
<item>table</item>
<item>inline-table</item>
<item>table-row-group</item>
<item>table-header-group</item>
<item>table-footer-group</item>
<item>table-row</item>
<item>table-column-group</item>
<item>table-column</item>
<item>table-cell</item>
<item>table-caption</item>
<item>crosshair</item>
<item>default</item>
<item>pointer</item>
@@ -765,15 +752,20 @@ Changelog:
<item>absolute</item>
<item>always</item>
<item>avoid</item>
<item>avoid-page</item>
<item>avoid-column</item>
<item>avoid-region</item>
<item>below</item>
<item>bidi-override</item>
<item>blink</item>
<item>both</item>
<item>break-word</item>
<item>capitalize</item>
<item>caption</item>
<item>clip</item>
<item>close-quote</item>
<item>collapse</item>
<item>column</item>
<item>condensed</item>
<item>crop</item>
<item>cross</item>
@@ -843,6 +835,41 @@ Changelog:
<item>contain</item>
<item>cover</item>
<!-- display -->
<!-- https://developer.mozilla.org/fr/docs/Web/CSS/display -->
<item>block</item>
<item>inline</item>
<item>run-in</item>
<item>flow</item>
<item>flow-root</item>
<item>table</item>
<item>flex</item>
<item>grid</item>
<item>ruby</item>
<item>list-item</item>
<item>table-row-group</item>
<item>table-header-group</item>
<item>table-footer-group</item>
<item>table-row</item>
<item>table-cell</item>
<item>table-column-group</item>
<item>table-column</item>
<item>table-caption</item>
<item>ruby-base</item>
<item>ruby-text</item>
<item>ruby-base-container</item>
<item>ruby-text-container</item>
<item>contents</item>
<item>inline-block</item>
<item>inline-table</item>
<item>inline-flex</item>
<item>inline-grid</item>
<!-- transition and animation -->
<item>all</item>
<item>ease</item>
@@ -991,6 +1018,7 @@ Changelog:
<item>pink</item>
<item>plum</item>
<item>powderblue</item>
<item>rebeccapurple</item>
<item>rosybrown</item>
<item>royalblue</item>
<item>saddlebrown</item>
@@ -1060,6 +1088,22 @@ Changelog:
<item>var</item>
<item>url</item>
<!-- CSS4 -->
<item>min</item>
<item>max</item>
<item>clamp</item>
<item>toggle</item>
<item>hwb</item>
<item>device-cmyk</item>
<item>color</item>
<item>element</item>
<item>image</item>
<item>image-set</item>
<item>conic-gradient</item>
<!-- counter style -->
<item>symbols</item>
<!-- clip -->
<item>rect</item>
@@ -1678,6 +1722,7 @@ Changelog:
<DetectChar attribute="Function" context="#pop#pop" char=")" />
<IncludeRules context="FindComments" />
<IncludeRules context="FindStrings" />
<IncludeRules context="FindFunctions" />
<IncludeRules context="FindValues" />
<DetectChar attribute="Separator Symbol" context="#stay" char="," />
</context>

View File

@@ -52,7 +52,7 @@
<!-- v2.07 add support for %prog and co, see bug 142832 -->
<!-- v2.08 add missing overloaders, new Python 3 statements, builtins, and keywords -->
<!-- v2.29 recognize escape sequenzes correctly -->
<language name="Python" version="22" style="python" indenter="python" kateversion="5.0" section="Scripts" extensions="*.py;*.pyw;SConstruct;SConscript;*.FCMacro" mimetype="application/x-python;text/x-python;text/x-python3" casesensitive="1" author="Michael Bueker" license="">
<language name="Python" version="23" style="python" indenter="python" kateversion="5.0" section="Scripts" extensions="*.py;*.pyw;SConstruct;SConscript;*.FCMacro" mimetype="application/x-python;text/x-python;text/x-python3" casesensitive="1" author="Michael Bueker" license="">
<highlighting>
<list name="import">
<item>import</item>
@@ -408,10 +408,16 @@
<DetectIdentifier attribute="Normal Text"/>
<RegExpr attribute="Decorator" String="@[_a-zA-Z[:^ascii:]][\._a-zA-Z0-9[:^ascii:]]*" firstNonSpace="true"/>
<AnyChar attribute="Operator" String="+*/%\|=;&lt;&gt;!^&amp;~-@" context="#stay"/>
<AnyChar attribute="Operator" String="+*/%|=;&lt;&gt;!^&amp;~-@" context="#stay"/>
<LineContinue attribute="Operator" context="MultiLineExpr"/>
<Int attribute="Error"/>
</context>
<context name="MultiLineExpr" attribute="Normal Text" lineEndContext="#pop" fallthrough="1" fallthroughContext="#pop">
<DetectSpaces attribute="Normal Text"/>
<IncludeRules context="StringVariants" />
</context>
<!-- https://docs.python.org/2/reference/lexical_analysis.html#integer-and-long-integer-literals -->
<!-- https://docs.python.org/3/reference/lexical_analysis.html#integer-literals -->

View File

@@ -0,0 +1,177 @@
{
"custom-styles": {
"Common Lisp": {
"Brackets": {
"selected-text-color": "#904200",
"text-color": "#005f88"
}
}
},
"editor-colors": {
"BackgroundColor": "#f7f3f3",
"BracketMatching": "#fceae2",
"CodeFolding": "#94caef",
"CurrentLine": "#daecf7",
"CurrentLineNumber": "#1e1e1e",
"IconBorder": "#f0f0f0",
"IndentationLine": "#d2d2d2",
"LineNumbers": "#a0a0a0",
"MarkBookmark": "#005275",
"MarkBreakpointActive": "#ff0000",
"MarkBreakpointDisabled": "#ff00ff",
"MarkBreakpointReached": "#ffff00",
"MarkError": "#ff0000",
"MarkExecution": "#a0a0a4",
"MarkWarning": "#00ff00",
"ModifiedLines": "#fdbc4b",
"ReplaceHighlight": "#25d970",
"SavedLines": "#2ecc71",
"SearchHighlight": "#e0af82",
"Separator": "#d5d5d5",
"SpellChecking": "#bf0303",
"TabMarker": "#d2d2d2",
"TemplateBackground": "#d6d2d0",
"TemplateFocusedPlaceholder": "#76da98",
"TemplatePlaceholder": "#baf8ce",
"TemplateReadOnlyPlaceholder": "#f6e6e6",
"TextSelection": "#bcbcbc",
"WordWrapMarker": "#ededed"
},
"metadata": {
"copyright": [
"SPDX-FileCopyrightText: 2021 shenlebantongying <shenlebantongying@gmail.com>"
],
"license": "SPDX-License-Identifier: MIT",
"name": "Homunculus",
"revision": 1
},
"text-styles": {
"Alert": {
"background-color": "#f7e6e6",
"bold": true,
"selected-text-color": "#9c0e0e",
"text-color": "#bf0303"
},
"Annotation": {
"selected-text-color": "#000000",
"text-color": "#ca60ca"
},
"Attribute": {
"selected-text-color": "#000000",
"text-color": "#0057ae"
},
"BaseN": {
"selected-text-color": "#000000",
"text-color": "#b08000"
},
"BuiltIn": {
"selected-text-color": "#000000",
"text-color": "#644a9b"
},
"Char": {
"selected-text-color": "#000000",
"text-color": "#924c9d"
},
"Comment": {
"selected-text-color": "#000000",
"text-color": "#505050"
},
"CommentVar": {
"selected-text-color": "#ffffff",
"text-color": "#0095ff"
},
"Constant": {
"selected-text-color": "#000000",
"text-color": "#aa5500"
},
"ControlFlow": {
"selected-text-color": "#000000",
"text-color": "#005f88"
},
"DataType": {
"selected-text-color": "#000000",
"text-color": "#0057ae"
},
"DecVal": {
"selected-text-color": "#000000",
"text-color": "#b08000"
},
"Documentation": {
"selected-text-color": "#000000",
"text-color": "#2a486a"
},
"Error": {
"selected-text-color": "#9c0e0e",
"text-color": "#bf0303",
"underline": true
},
"Extension": {
"selected-text-color": "#000000",
"text-color": "#0095ff"
},
"Float": {
"selected-text-color": "#000000",
"text-color": "#b08000"
},
"Function": {
"selected-text-color": "#000000",
"text-color": "#721045"
},
"Import": {
"selected-text-color": "#000000",
"text-color": "#813e00"
},
"Information": {
"selected-text-color": "#000000",
"text-color": "#b08000"
},
"Keyword": {
"selected-text-color": "#000000",
"text-color": "#5317ac"
},
"Normal": {
"selected-text-color": "#000000",
"text-color": "#303030"
},
"Operator": {
"selected-text-color": "#000000",
"text-color": "#b455b4"
},
"Others": {
"selected-text-color": "#000000",
"text-color": "#006e28"
},
"Preprocessor": {
"selected-text-color": "#000000",
"text-color": "#006e28"
},
"RegionMarker": {
"selected-text-color": "#000000",
"text-color": "#0057ae"
},
"SpecialChar": {
"selected-text-color": "#000000",
"text-color": "#3daee9"
},
"SpecialString": {
"selected-text-color": "#000000",
"text-color": "#854001"
},
"String": {
"selected-text-color": "#000000",
"text-color": "#2544bb"
},
"Variable": {
"selected-text-color": "#000000",
"text-color": "#0057ae"
},
"VerbatimString": {
"selected-text-color": "#000000",
"text-color": "#2544bb"
},
"Warning": {
"selected-text-color": "#9c0e0e",
"text-color": "#bf0303"
}
}
}

View File

@@ -19,6 +19,7 @@ elseif(CMAKE_CROSSCOMPILING)
CMAKE_ARGS -DKSYNTAXHIGHLIGHTING_USE_GUI=OFF
-DECM_DIR=${ECM_DIR} -DCMAKE_PREFIX_PATH=${NATIVE_PREFIX}
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}
-DQT_MAJOR_VERSION=${QT_MAJOR_VERSION}
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/native_katehighlightingindexer-prefix/src/native_katehighlightingindexer-build/bin/katehighlightingindexer
)

View File

@@ -47,7 +47,7 @@ set_target_properties(KF5SyntaxHighlighting PROPERTIES
SOVERSION ${SyntaxHighlighting_SOVERSION}
EXPORT_NAME SyntaxHighlighting
)
target_include_directories(KF5SyntaxHighlighting INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KSyntaxHighlighting;${KDE_INSTALL_INCLUDEDIR_KF}>")
target_include_directories(KF5SyntaxHighlighting INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KSyntaxHighlighting>")
target_include_directories(KF5SyntaxHighlighting PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR};>")
target_link_libraries(KF5SyntaxHighlighting
PUBLIC
@@ -56,26 +56,38 @@ target_link_libraries(KF5SyntaxHighlighting
Qt${QT_MAJOR_VERSION}::Network
)
ecm_generate_headers(SyntaxHighlighting_HEADERS
HEADER_NAMES
AbstractHighlighter
Definition
DefinitionDownloader
FoldingRegion
Format
Repository
State
SyntaxHighlighter
Theme
WildcardMatcher
set(Forwarding_Header_Names
AbstractHighlighter
Definition
DefinitionDownloader
FoldingRegion
Format
Repository
State
SyntaxHighlighter
Theme
WildcardMatcher
)
ecm_generate_headers(CamelCase_HEADERS
HEADER_NAMES ${Forwarding_Header_Names}
REQUIRED_HEADERS SyntaxHighlighting_HEADERS
# Avoid unprefixed headers in build dir (which is part of library's build interface include directories)
# and thus visible to anything linking it in the same build, incl. when used with CMake's FetchContent.
# E.g. there can be look-up clashes on case-insensitive filesystems with C++20's <format> file and
# the library's generated "Format" file.
# See BUG: 453759
OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/camelcaseheaders
)
install(TARGETS KF5SyntaxHighlighting EXPORT KF5SyntaxHighlightingTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES
${CamelCase_HEADERS}
${SyntaxHighlighting_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/ksyntaxhighlighting_export.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KSyntaxHighlighting)
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KSyntaxHighlighting/KSyntaxHighlighting
)
if(BUILD_QCH)
ecm_add_qch(

View File

@@ -9,9 +9,9 @@
#include "ksyntaxhighlighting_export.h"
#include <QVector>
#include <memory>
#include <qglobal.h>
#include <qvector.h>
QT_BEGIN_NAMESPACE
class QString;

View File

@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: 2018 Eike Hein <hein@kde.org>
# SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
# SPDX-License-Identifier: BSD-3-Clause
add_library(kquicksyntaxhighlightingplugin)
target_sources(kquicksyntaxhighlightingplugin PRIVATE
kquicksyntaxhighlightingplugin.cpp
kquicksyntaxhighlighter.cpp
repositorywrapper.cpp
)
target_link_libraries(kquicksyntaxhighlightingplugin PRIVATE
KF5SyntaxHighlighting
Qt${QT_MAJOR_VERSION}::Quick
)
install(TARGETS kquicksyntaxhighlightingplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/syntaxhighlighting)
install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/syntaxhighlighting)

View File

@@ -0,0 +1,112 @@
/*
SPDX-FileCopyrightText: 2018 Eike Hein <hein@kde.org>
SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
SPDX-License-Identifier: MIT
*/
#include "kquicksyntaxhighlighter.h"
#include <repository.h>
#include <syntaxhighlighter.h>
#include <QGuiApplication>
#include <QPalette>
#include <QQuickTextDocument>
#include <QTextDocument>
using namespace KSyntaxHighlighting;
extern Repository *defaultRepository();
KQuickSyntaxHighlighter::KQuickSyntaxHighlighter(QObject *parent)
: QObject(parent)
, m_textEdit(nullptr)
, m_highlighter(new KSyntaxHighlighting::SyntaxHighlighter(this))
{
}
KQuickSyntaxHighlighter::~KQuickSyntaxHighlighter() = default;
QObject *KQuickSyntaxHighlighter::textEdit() const
{
return m_textEdit;
}
void KQuickSyntaxHighlighter::setTextEdit(QObject *textEdit)
{
if (m_textEdit != textEdit) {
m_textEdit = textEdit;
m_highlighter->setDocument(m_textEdit->property("textDocument").value<QQuickTextDocument *>()->textDocument());
}
}
QVariant KQuickSyntaxHighlighter::definition() const
{
return QVariant::fromValue(m_definition);
}
void KQuickSyntaxHighlighter::setDefinition(const QVariant &definition)
{
Definition def;
if (definition.type() == QVariant::String) {
def = unwrappedRepository()->definitionForName(definition.toString());
} else {
def = definition.value<Definition>();
}
if (m_definition != def) {
m_definition = def;
m_highlighter->setTheme(m_theme.isValid() ? m_theme : unwrappedRepository()->themeForPalette(QGuiApplication::palette()));
m_highlighter->setDefinition(def);
Q_EMIT definitionChanged();
}
}
QVariant KQuickSyntaxHighlighter::theme() const
{
return QVariant::fromValue(m_theme);
}
void KQuickSyntaxHighlighter::setTheme(const QVariant &theme)
{
Theme t;
if (theme.type() == QVariant::String) {
t = unwrappedRepository()->theme(theme.toString());
} else if (theme.type() == QVariant::Int) {
t = unwrappedRepository()->defaultTheme(static_cast<Repository::DefaultTheme>(theme.toInt()));
} else {
t = theme.value<Theme>();
}
if (m_theme.name() != t.name()) {
m_theme = t;
m_highlighter->setTheme(m_theme);
m_highlighter->rehighlight();
Q_EMIT themeChanged();
}
}
RepositoryWrapper *KQuickSyntaxHighlighter::repository() const
{
return m_repository;
}
void KQuickSyntaxHighlighter::setRepository(RepositoryWrapper *repository)
{
if (m_repository == repository) {
return;
}
m_repository = repository;
Q_EMIT repositoryChanged();
}
Repository *KQuickSyntaxHighlighter::unwrappedRepository() const
{
if (m_repository) {
return m_repository->m_repository;
}
return defaultRepository();
}

View File

@@ -0,0 +1,66 @@
/*
SPDX-FileCopyrightText: 2018 Eike Hein <hein@kde.org>
SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
SPDX-License-Identifier: MIT
*/
#ifndef KQUICKSYNTAXHIGHLIGHTER_H
#define KQUICKSYNTAXHIGHLIGHTER_H
#include "repositorywrapper.h"
#include <definition.h>
#include <theme.h>
#include <QObject>
#include <QVariant>
namespace KSyntaxHighlighting
{
class Repository;
class SyntaxHighlighter;
}
class KQuickSyntaxHighlighter : public QObject
{
Q_OBJECT
Q_PROPERTY(QObject *textEdit READ textEdit WRITE setTextEdit NOTIFY textEditChanged)
Q_PROPERTY(QVariant definition READ definition WRITE setDefinition NOTIFY definitionChanged)
Q_PROPERTY(QVariant theme READ theme WRITE setTheme NOTIFY themeChanged)
Q_PROPERTY(RepositoryWrapper *repository READ repository WRITE setRepository NOTIFY repositoryChanged)
public:
explicit KQuickSyntaxHighlighter(QObject *parent = nullptr);
~KQuickSyntaxHighlighter() override;
QObject *textEdit() const;
void setTextEdit(QObject *textEdit);
QVariant definition() const;
void setDefinition(const QVariant &definition);
QVariant theme() const;
void setTheme(const QVariant &theme);
RepositoryWrapper *repository() const;
void setRepository(RepositoryWrapper *repository);
Q_SIGNALS:
void textEditChanged() const;
void definitionChanged() const;
void themeChanged();
void repositoryChanged();
private:
KSyntaxHighlighting::Repository *unwrappedRepository() const;
QObject *m_textEdit;
KSyntaxHighlighting::Definition m_definition;
KSyntaxHighlighting::Theme m_theme;
RepositoryWrapper *m_repository = nullptr;
KSyntaxHighlighting::SyntaxHighlighter *m_highlighter = nullptr;
};
#endif // KQUICKSYNTAXHIGHLIGHTER_H

View File

@@ -0,0 +1,47 @@
/*
SPDX-FileCopyrightText: 2018 Eike Hein <hein@kde.org>
SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
SPDX-License-Identifier: MIT
*/
#include "kquicksyntaxhighlightingplugin.h"
#include "kquicksyntaxhighlighter.h"
#include "repositorywrapper.h"
#include <definition.h>
#include <repository.h>
#include <theme.h>
#include <memory>
using namespace KSyntaxHighlighting;
Repository *defaultRepository()
{
static std::unique_ptr<Repository> s_instance;
if (!s_instance) {
s_instance = std::make_unique<Repository>();
}
return s_instance.get();
}
void KQuickSyntaxHighlightingPlugin::registerTypes(const char *uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.syntaxhighlighting"));
qRegisterMetaType<Definition>();
qRegisterMetaType<QVector<Definition>>();
qRegisterMetaType<Theme>();
qRegisterMetaType<QVector<Theme>>();
qmlRegisterType<KQuickSyntaxHighlighter>(uri, 1, 0, "SyntaxHighlighter");
qmlRegisterUncreatableType<Definition>(uri, 1, 0, "Definition", {});
qmlRegisterUncreatableType<Theme>(uri, 1, 0, "Theme", {});
qmlRegisterSingletonType<RepositoryWrapper>(uri, 1, 0, "Repository", [](auto engine, auto scriptEngine) {
(void)engine;
(void)scriptEngine;
auto repo = new RepositoryWrapper;
repo->m_repository = defaultRepository();
return repo;
});
}

View File

@@ -0,0 +1,22 @@
/*
SPDX-FileCopyrightText: 2018 Eike Hein <hein@kde.org>
SPDX-License-Identifier: MIT
*/
#ifndef KQUICKSYNTAXHIGHLIGHTINGPLUGIN_H
#define KQUICKSYNTAXHIGHLIGHTINGPLUGIN_H
#include <QQmlEngine>
#include <QQmlExtensionPlugin>
class KQuickSyntaxHighlightingPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
void registerTypes(const char *uri) override;
};
#endif // KQUICKSYNTAXHIGHLIGHTINGPLUGIN_H

View File

@@ -0,0 +1,2 @@
module org.kde.syntaxhighlighting
plugin kquicksyntaxhighlightingplugin

View File

@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2018 Eike Hein <hein@kde.org>
SPDX-License-Identifier: CC0-1.0

View File

@@ -0,0 +1,65 @@
/*
SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
SPDX-License-Identifier: MIT
*/
#include "repositorywrapper.h"
#include <definition.h>
#include <repository.h>
#include <theme.h>
using namespace KSyntaxHighlighting;
RepositoryWrapper::RepositoryWrapper(QObject *parent)
: QObject(parent)
{
}
Definition RepositoryWrapper::definitionForName(const QString &defName) const
{
return m_repository->definitionForName(defName);
}
Definition RepositoryWrapper::definitionForFileName(const QString &fileName) const
{
return m_repository->definitionForFileName(fileName);
}
QVector<Definition> RepositoryWrapper::definitionsForFileName(const QString &fileName) const
{
return m_repository->definitionsForFileName(fileName);
}
Definition RepositoryWrapper::definitionForMimeType(const QString &mimeType) const
{
return m_repository->definitionForMimeType(mimeType);
}
QVector<Definition> RepositoryWrapper::definitionsForMimeType(const QString &mimeType) const
{
return m_repository->definitionsForMimeType(mimeType);
}
QVector<Definition> RepositoryWrapper::definitions() const
{
return m_repository->definitions();
}
QVector<Theme> RepositoryWrapper::themes() const
{
return m_repository->themes();
}
Theme RepositoryWrapper::theme(const QString &themeName) const
{
return m_repository->theme(themeName);
}
Theme RepositoryWrapper::defaultTheme(DefaultTheme t) const
{
return m_repository->defaultTheme(static_cast<Repository::DefaultTheme>(t));
}
#include "moc_repositorywrapper.cpp"

View File

@@ -0,0 +1,45 @@
/*
SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
SPDX-License-Identifier: MIT
*/
#ifndef REPOSITORYWRAPPER_H
#define REPOSITORYWRAPPER_H
#include <QObject>
namespace KSyntaxHighlighting
{
class Definition;
class Repository;
class Theme;
}
// TODO KF6: merge this into KSyntaxHighlighting::Repository
class RepositoryWrapper : public QObject
{
Q_OBJECT
// TODO KF6: NOTIFY on reload
Q_PROPERTY(QVector<KSyntaxHighlighting::Definition> definitions READ definitions CONSTANT)
Q_PROPERTY(QVector<KSyntaxHighlighting::Theme> themes READ themes CONSTANT)
public:
explicit RepositoryWrapper(QObject *parent = nullptr);
Q_INVOKABLE KSyntaxHighlighting::Definition definitionForName(const QString &defName) const;
Q_INVOKABLE KSyntaxHighlighting::Definition definitionForFileName(const QString &fileName) const;
Q_INVOKABLE QVector<KSyntaxHighlighting::Definition> definitionsForFileName(const QString &fileName) const;
Q_INVOKABLE KSyntaxHighlighting::Definition definitionForMimeType(const QString &mimeType) const;
Q_INVOKABLE QVector<KSyntaxHighlighting::Definition> definitionsForMimeType(const QString &mimeType) const;
QVector<KSyntaxHighlighting::Definition> definitions() const;
QVector<KSyntaxHighlighting::Theme> themes() const;
Q_INVOKABLE KSyntaxHighlighting::Theme theme(const QString &themeName) const;
enum DefaultTheme { LightTheme, DarkTheme };
Q_ENUM(DefaultTheme)
Q_INVOKABLE KSyntaxHighlighting::Theme defaultTheme(DefaultTheme t = LightTheme) const;
KSyntaxHighlighting::Repository *m_repository = nullptr;
};
#endif // REPOSITORYWRAPPER_H