...
 
Commits (3144)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

# general
build
/build*/
*.rej
*.orig
*.out
CMakeLists.txt.user*
.clang-format
# kate
.kateproject.d
*~
*-swp
......@@ -20,3 +21,7 @@ build
# from dolphin
.directory
# LSP Server data
.clangd
.cmake/
kate: space-indent on; indent-width 2; replace-tabs on;
kate: indent-mode cstyle; indent-width 4; replace-tabs on;
{
"name": "Kate"
, "index": true
, "files": [ { "git": 1 } ]
, "build": {
"directory": "build"
, "build": "make all"
, "clean": "make clean"
, "quick": "gcc -Wall -g -o %n %f"
}
}
REVIEWBOARD_URL = "https://git.reviewboard.kde.org"
REPOSITORY = "git://anongit.kde.org/kate"
TARGET_GROUPS = "kate"
BRANCH = "master"
......@@ -9,6 +9,9 @@ about page.
- Christoph Cullmann <cullmann@kde.org>
(Maintainer)
- Dominik Haumann <dhaumann@kde.org>
(core developer)
- Joseph Wenninger <jowenn@kde.org>
(highlight guy + big bug hunter)
......@@ -47,9 +50,6 @@ about page.
- Michael Koch <koch@kde.org>
(port to KParts)
- Dominik Haumann <dhdev@gmx.de>
(developer, highlight wizard)
- Mirko Stocker <me@misto.ch>
(various bugfixes)
......
# Kate project
project (kate)
# 3.1 is required for `target_sources`.
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
# shared libs
set (LIBRARY_TYPE SHARED)
# KDE Applications version, managed by release script.
set(RELEASE_SERVICE_VERSION_MAJOR "20")
set(RELEASE_SERVICE_VERSION_MINOR "07")
set(RELEASE_SERVICE_VERSION_MICRO "70")
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
# search packages used by KDE
find_package(KDE4 4.8.0 REQUIRED)
include (KDE4Defaults)
include (MacroLibrary)
include (CheckFunctionExists)
project(kate VERSION ${RELEASE_SERVICE_VERSION})
# activity feature for Kate/KWrite
macro_optional_find_package(KActivities 6.1.0 NO_MODULE)
macro_log_feature(KActivities_FOUND "KActivities" "Activities interface library" "https://projects.kde.org/projects/kde/kdelibs/kactivities" FALSE "6.1.0" "Required for Activities integration.")
set(QT_MIN_VERSION "5.10.0")
set(KF5_DEP_VERSION "5.40.0")
# no in source builds
macro_ensure_out_of_source_build("kate requires an out of source build. Please create a separate build directory and run 'cmake path_to_kate [options]' there.")
# We need some parts of the ECM CMake helpers.
find_package(ECM ${KF5_DEP_VERSION} QUIET REQUIRED NO_MODULE)
# config.h
if(NOT APPLE)
check_function_exists (fdatasync HAVE_FDATASYNC)
check_function_exists (ctermid HAVE_CTERMID)
endif(NOT APPLE)
# We append to the module path so modules can be overridden from the command line.
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
configure_file (config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# Allow adding Qt resource files with `add_executable` or `target_sources` instead of
# `qt5_add_resources`. See https://cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html#autorcc.
set(CMAKE_AUTORCC ON)
# enforce build of tests
set (KDE4_BUILD_TESTS "ON" CACHE "BOOL" "Enable building of tests" FORCE)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDEInstallDirs)
include(KDECMakeSettings)
# KDE/QT definitions we want
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions (-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DKTEXTEDITOR_NO_DEPRECATED)
include(ECMOptionalAddSubdirectory)
include(ECMAddAppIcon)
include(ECMInstallIcons)
# global include directories
include_directories (${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES} ${KDE4_KIO_INCLUDES} ${KACTIVITIES_INCLUDE_DIRS})
include(FeatureSummary)
# allow to build own ktexteditor
option(BUILD_KTEXTEDITOR "Build KTextEditor interfaces, instead of reusing the system version" OFF)
if (BUILD_KTEXTEDITOR)
# use our own copies of some stuff
set (KDE4_KTEXTEDITOR_LIBS "ktexteditor")
# forbid some old things
add_definitions(-DQT_NO_FOREACH)
# add more includes to let the local ktexteditor stuff be found
include_directories (BEFORE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/includes)
# Required here so that the version comparison below works
find_package(Qt5Widgets ${QT_MIN_VERSION} CONFIG REQUIRED)
# ktexteditor interfaces, copy from kdelibs/interfaces/ktexteditor
macro_optional_add_subdirectory (ktexteditor)
else()
# kdelibs 4.11 is required
if("${KDE_VERSION}" VERSION_LESS 4.10.60)
message(FATAL_ERROR "kdelibs version ${KDE_VERSION}, but 4.11 is required. Set the option BUILD_KTEXTEDITOR to ON to build anyway.")
endif()
endif (BUILD_KTEXTEDITOR)
# Required here so that the ki18n_install/kdoctools_install calls injected by
# the release scripts work.
find_package(KF5 ${KF5_DEP_VERSION}
REQUIRED COMPONENTS
I18n
OPTIONAL_COMPONENTS
DocTools
)
# kate part
macro_optional_add_subdirectory (part)
# Qt 5.13 deprecated QComboBox::currentIndexChanged(QString) and Qt 5.14 undid that...
if (NOT Qt5Widgets_VERSION VERSION_LESS 5.14.0)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
endif()
# kate application
macro_optional_add_subdirectory (kate)
ecm_optional_add_subdirectory(addons)
ecm_optional_add_subdirectory(kwrite)
ecm_optional_add_subdirectory(kate)
ecm_optional_add_subdirectory(doc)
# kwrite
macro_optional_add_subdirectory (kwrite)
feature_summary(INCLUDE_QUIET_PACKAGES WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
# addons, e.g. ktexteditor plugins, kate plugins, plasma applets, ...
macro_optional_add_subdirectory (addons)
# this needs at least ECM 5.64...
if(${ECM_VERSION} VERSION_GREATER "5.63.0")
include(KDEClangFormat)
# docs
macro_optional_add_subdirectory (doc)
# tests
macro_optional_add_subdirectory (tests)
# display features ;)
macro_display_feature_log()
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
endif()
== THIS IS A DRAFT ==
This document is a work in progress, and may be incomplete and / or inaccurate.
Please help improve it!
== About this document ==
So you want to participate in developing kate? Great! The project is always in need of helping hands.
However, trying to help, and being helpful is not always the same thing. Therefore, we would like to ask
you to read through this document, '''before''' you start comitting to this repository. We try to keep
this text short, and limit it to some of the most important pitfalls, only, and we will focus mostly on
issues which are specific to kate, as opposed to generic guidelines. '''Common sense applies.'''
In writing this document, we will assume that you have developer access to the repository. However, if
you don't, the same basic rules apply for sending patches, too.
== General rules ==
# If you have the slightest doubt, '''ask'''!
#* This is probably the most important rule. Communicate, discuss, ask questions.
#* For small technical questions, the fatest way to get an answer is typically IRC (irc://irc.kde.org/kate for the kate specific channel; often irc://irc.kde.org/kde-devel is also a good place to ask).
#* For questions that may need a broader discussion, or some time to think about, the mailing list is generally the best place to ask: kwrite-devel@kde.org . In fact, if you plan to contribute more than just once, it is highly recommended that you subscribe.
#* For feedback on a concrete patch, reviewboard.kde.org is suited, best.
# Understand what you are doing.
#* Do not commit code that you don't understand, even if it appears to fix problems. '''Ask''' instead (see above).
# Test you code.
#* Test your code to make sure it really does what you think it does. Then test that it doesn't break anything. Then test again.
# Respect schedules and agreements.
#* Make sure you are aware of the current [http://techbase.kde.org/Schedules Release Schedules], and the associated freezes in the different branches.
#* Generally it is a good idea to have a look at the last few weeks of the [http://lists.kde.org/?l=kwrite-devel&r=1&w=2 mailing list archive], to see if there may be any reasons against committing certain changes at that time.
#* If in any doubt: Ask.
# Respect coding conventions and style
#* Don't just write in your personal style. Tastes differ, and if we mix all sorts of styles, the code just gets harder to read.
#* In general, please try to follow the coding style of the surrounding code. For more in-depth information, refer to http://techbase.kde.org/Policies/Kdelibs_Coding_Style .
# Respect copyright and licences.
#* In the open source world, a lot of copying and re-use of code is permitted. But please make sure you have checked and understood the applicable terms, in each case.
#* If in any doubt: Ask.
# Use bugs.kde.org
#* If the bug you are about to fix has been annoying you for ages, probably others have noted it before, too. If you think the feature you're about to implement is a must have, then others might have had the same idea. Please be sure to check bugs.kde.org for existing reports / requests. This might contain important considerations that you did not think about, yet. And of course it is important to close the corresponding reports after the bug has been fixed / feature committed, in order to keep bug database managable. Taking some time for bookkeeping is an important part of developing in a community project.
== Kate specific rules ==
The main sub-directories of this repository are "kate", "kwrite", "part", and "ktexteditor". Very
differnt guidelines apply to these, so make sure you understand what is or is not allowed in each sub-project.
=== kate / kwrite ===
These directories hold code that is specific to the stand-alone applications kate and kwrite. As such it is
application code, and this means that, generally, there is no need to care about source or binary compatibility.
Changes in this directory do not affect applications other than kate or kwrite, and thus they are ''relatively''
safe. However, please be aware that both kate and kwrite are productivity tools, used extensively by a large userbase.
Often, these users will use kate/kwrite in ways that you have never even thought about, or use features, which even
core contributors may not be aware of. Please be careful that you don't break existing features and workflows, unless
you have very good reason to do so. If in any doubt: Ask.
When implementing new features, please take a moment to think about whether they be limited to kate, or whether they
should be implemented in the kate part, in order to make them accessible to all applications using katepart. As a
generic rule of thumb: If the feature (or a similar feature) could be useful in kwrite, then it should probably
go into katepart. If the feature might be useful in applications such as kdevelop, kile, quanta, rkward, etc. then it
should probably be implemented in katepart. If in any doubt: Ask.
=== part ===
This directory holds the implementation of the kate "part". We assume that you know what a KPart is (and if you don't,
then please read up on it), but as a short summary: Any KDE application can embed this part, in order to gain advanced
text-editor features in very few lines of code. And many, many applications do, inside and outside of kde.org.
These external applications are not compiled or linked against the katepart. Thus many concerns about source and binary
compatibility do not apply. However, several types of changes in katepart code can potentially have non-obvious
negative side-effects on applications that embed katepart. Thus, please be sure you understand the following issues,
and think twice before doing such changes:
# Shortcuts
#* Embedding applications will typically inherit the complete GUI from katepart, including all shortcuts. More often than not, these applications will also define a considerable number of application-specific shortcuts in addition to that. This has a lot of potential to create clashes between shortcuts in the katepart, and the
embedding application. Thus, please think twice before adding new shortcuts, or changing the default keys for existing shortcuts. Ask yourself: Does this action really need a shortcut ''by default''?
# Action names
#* The names of actions and menus may seem like a fully internal implementation detail, on first glance. But they are not. In fact embedding applications sometimes have the need to hide specific actions, to re-arrange them, or to modify them in other ways (e.g. changing the text to avoid ambiguities, etc.). To do so, they will reference the actions by their id / name (not their text label). So please do not change existing action names without very strong reasons to do so.
#* The same point applies for names of merge points and groups in the ui.rc.
# Syntax highlighting names
#* Similarly, embedding applications may want to set a specific highlighting mode under some circumstances. To do so they will probably use KTextEditor::Document::setHighlightingMode(), which takes the name of the highlighting mode as parameter. Thus, please be very careful when changing names.
# Removing the implementation of KTextEditor Extension interfaces
#* Theoretically, embedding applications may not assume that a certain extension interface (such as KTextEditor::SmartInterface) is implemented by the embedded part. In practice they do. Thus, if you ever have the need to remove a certain interface implementation, be sure you announce this '''very''' visibly, and to allow ample time for embedding applications to adjust to the change.
=== ktexteditor ===
'''This directory is actually part of kdelibs'''. It is synced with kdelibs, regularly, but technically it belongs to kdelibs (at least for KDE 4.x.y). Thus, any changes you do, here, ''must'' follow the kdelibs library code policy: http://techbase.kde.org/Policies/Library_Code_Policy . Before you touch anything, in this directory, please be sure to read and understand that in full. In particular you should have a firm undersanding of API and ABI compatibility issues. '''If in any doubt: Ask'''.
In any case, notify kwrite-devel about changes in that directory.
Whats in kate.git?
ktexteditor/
=> KTextEditor interfaces
includes/
=> KTextEditor camel case include files
part/
=> KatePart
kate/
=> Kate Application
kwrite/
=> KWrite Application
doc/
=> Kate & KWrite manuals
tests/
=> Automated unit tests
examples/
=> Examples for syntax highlighting and co
# Join Us!
So you want to participate in developing kate? Great! The project is always in need of helping hands.
However, before you start comitting to this repository, read
https://techbase.kde.org/Projects/Kate/Commit_Policy
# kate.git content
## kate
Kate Application
For licensing and more see kate/README.md
Kate is using KUserFeedback for telemetry starting with release 20.04.
For details of the opt-in send information, see https://community.kde.org/Telemetry_Use
## kwrite
KWrite Application
## addons
Plugins
## doc
Kate & KWrite manuals
## mac
Documentation and build scripts for Apple Mac OS
# KTextEditor plugins, for the kate part
add_subdirectory (ktexteditor)
# Most plugins will need to link against KF5TextEditor to have access to its plugin interface.
find_package(KF5TextEditor ${KF5_DEP_VERSION} QUIET REQUIRED)
# Kate plugins
add_subdirectory (kate)
# Plasma applets
add_subdirectory (plasma)
ecm_optional_add_subdirectory(backtracebrowser)
ecm_optional_add_subdirectory(close-except-like) # Close all documents except this one (or similar).
ecm_optional_add_subdirectory(externaltools)
ecm_optional_add_subdirectory(filebrowser)
ecm_optional_add_subdirectory(filetree)
ecm_optional_add_subdirectory(gdbplugin)
ecm_optional_add_subdirectory(kate-ctags)
ecm_optional_add_subdirectory(katebuild-plugin)
ecm_optional_add_subdirectory(katesql)
ecm_optional_add_subdirectory(konsole)
ecm_optional_add_subdirectory(lspclient) # Language Server Protocol (LSP) client plugin.
ecm_optional_add_subdirectory(openheader) # Open header matching to current file.
ecm_optional_add_subdirectory(preview) # Live preview of sources in target format.
ecm_optional_add_subdirectory(project) # Small & smart project manager.
ecm_optional_add_subdirectory(replicode)
ecm_optional_add_subdirectory(search)
ecm_optional_add_subdirectory(sessionapplet)
ecm_optional_add_subdirectory(snippets)
ecm_optional_add_subdirectory(symbolviewer) # List symbols and functions in a file.
ecm_optional_add_subdirectory(tabswitcher) # ALT+Tab like tab switcher.
ecm_optional_add_subdirectory(textfilter) # Pipe text through some external command.
ecm_optional_add_subdirectory(xmlcheck) # XML Validation plugin
ecm_optional_add_subdirectory(xmltools) # XML completion
add_library(katebacktracebrowserplugin MODULE "")
target_compile_definitions(katebacktracebrowserplugin PRIVATE TRANSLATION_DOMAIN="katebacktracebrowserplugin")
target_link_libraries(katebacktracebrowserplugin PRIVATE KF5::TextEditor)
ki18n_wrap_ui(UI_SOURCES btbrowserwidget.ui btconfigwidget.ui)
target_sources(katebacktracebrowserplugin PRIVATE ${UI_SOURCES})
target_sources(
katebacktracebrowserplugin
PRIVATE
katebacktracebrowser.cpp
btparser.cpp
btfileindexer.cpp
btdatabase.cpp
)
kcoreaddons_desktop_to_json(katebacktracebrowserplugin katebacktracebrowserplugin.desktop)
install(TARGETS katebacktracebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
include(ECMMarkAsTest)
add_executable(btbrowser_test "")
target_include_directories(btbrowser_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
find_package(Qt5Test ${QT_MIN_VERSION} QUIET REQUIRED)
target_link_libraries(
btbrowser_test
PRIVATE
Qt5::Widgets
Qt5::Test
)
target_sources(btbrowser_test PRIVATE
btbrowsertest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../btparser.cpp
)
add_test(NAME plugin-btbrowser_test COMMAND btbrowser_test)
ecm_mark_as_test(btbrowser_test)
/* This file is part of the KDE project
*
* Copyright 2014 Dominik Haumann <dhaumann@kde.org>
*