Commits (3140)

Too many changes to show.

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

# general # general
build /build*/
*.rej *.rej
*.orig *.orig
*.out *.out
# kate # kate
*~ *~
*-swp *-swp
...@@ -20,3 +21,7 @@ build ...@@ -20,3 +21,7 @@ build
# from dolphin # from dolphin
.directory .directory
# LSP Server data
kate: space-indent on; indent-width 2; replace-tabs on; kate: indent-mode cstyle; indent-width 4; replace-tabs on;
{ {
"name": "Kate" "name": "Kate"
, "index": true
, "files": [ { "git": 1 } ] , "files": [ { "git": 1 } ]
, "build": { , "build": {
"directory": "build" "directory": "build"
, "build": "make all" , "build": "make all"
, "clean": "make clean" , "clean": "make clean"
, "quick": "gcc -Wall -g -o %n %f" , "quick": "gcc -Wall -g -o %n %f"
} }
} }
REVIEWBOARD_URL = "https://git.reviewboard.kde.org"
REPOSITORY = "git://anongit.kde.org/kate"
BRANCH = "master"
...@@ -9,6 +9,9 @@ about page. ...@@ -9,6 +9,9 @@ about page.
- Christoph Cullmann <cullmann@kde.org> - Christoph Cullmann <cullmann@kde.org>
(Maintainer) (Maintainer)
- Dominik Haumann <dhaumann@kde.org>
(core developer)
- Joseph Wenninger <jowenn@kde.org> - Joseph Wenninger <jowenn@kde.org>
(highlight guy + big bug hunter) (highlight guy + big bug hunter)
...@@ -47,9 +50,6 @@ about page. ...@@ -47,9 +50,6 @@ about page.
- Michael Koch <koch@kde.org> - Michael Koch <koch@kde.org>
(port to KParts) (port to KParts)
- Dominik Haumann <dhdev@gmx.de>
(developer, highlight wizard)
- Mirko Stocker <me@misto.ch> - Mirko Stocker <me@misto.ch>
(various bugfixes) (various bugfixes)
# Kate project # 3.1 is required for `target_sources`.
project (kate) cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
# shared libs # KDE Applications version, managed by release script.
# search packages used by KDE project(kate VERSION ${RELEASE_SERVICE_VERSION})
find_package(KDE4 4.8.0 REQUIRED)
include (KDE4Defaults)
include (MacroLibrary)
include (CheckFunctionExists)
# activity feature for Kate/KWrite set(QT_MIN_VERSION "5.10.0")
macro_optional_find_package(KActivities 6.1.0 NO_MODULE) set(KF5_DEP_VERSION "5.40.0")
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.")
# no in source builds # We need some parts of the ECM CMake helpers.
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.") find_package(ECM ${KF5_DEP_VERSION} QUIET REQUIRED NO_MODULE)
# config.h # We append to the module path so modules can be overridden from the command line.
check_function_exists (fdatasync HAVE_FDATASYNC)
check_function_exists (ctermid HAVE_CTERMID)
endif(NOT APPLE)
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.
# enforce build of tests include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
set (KDE4_BUILD_TESTS "ON" CACHE "BOOL" "Enable building of tests" FORCE) include(KDEInstallDirs)
# KDE/QT definitions we want include(ECMOptionalAddSubdirectory)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) include(ECMAddAppIcon)
# global include directories include(FeatureSummary)
# allow to build own ktexteditor # forbid some old things
option(BUILD_KTEXTEDITOR "Build KTextEditor interfaces, instead of reusing the system version" OFF) add_definitions(-DQT_NO_FOREACH)
# use our own copies of some stuff
set (KDE4_KTEXTEDITOR_LIBS "ktexteditor")
# add more includes to let the local ktexteditor stuff be found # Required here so that the version comparison below works
include_directories (BEFORE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/includes) find_package(Qt5Widgets ${QT_MIN_VERSION} CONFIG REQUIRED)
# ktexteditor interfaces, copy from kdelibs/interfaces/ktexteditor # Required here so that the ki18n_install/kdoctools_install calls injected by
macro_optional_add_subdirectory (ktexteditor) # the release scripts work.
else() find_package(KF5 ${KF5_DEP_VERSION}
# kdelibs 4.11 is required REQUIRED COMPONENTS
if("${KDE_VERSION}" VERSION_LESS 4.10.60) I18n
message(FATAL_ERROR "kdelibs version ${KDE_VERSION}, but 4.11 is required. Set the option BUILD_KTEXTEDITOR to ON to build anyway.") OPTIONAL_COMPONENTS
endif() DocTools
# kate part # Qt 5.13 deprecated QComboBox::currentIndexChanged(QString) and Qt 5.14 undid that...
macro_optional_add_subdirectory (part) if (NOT Qt5Widgets_VERSION VERSION_LESS 5.14.0)
# kate application ecm_optional_add_subdirectory(addons)
macro_optional_add_subdirectory (kate) ecm_optional_add_subdirectory(kwrite)
macro_optional_add_subdirectory (kwrite)
# addons, e.g. ktexteditor plugins, kate plugins, plasma applets, ... # this needs at least ECM 5.64...
macro_optional_add_subdirectory (addons) if(${ECM_VERSION} VERSION_GREATER "5.63.0")
# docs # add clang-format target for all our real source files
macro_optional_add_subdirectory (doc) file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
# tests endif()
macro_optional_add_subdirectory (tests)
# display features ;)
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 interfaces
=> KTextEditor camel case include files
=> KatePart
=> Kate Application
=> KWrite Application
=> Kate & KWrite manuals
=> Automated unit tests
=> 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
# 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
## doc
Kate & KWrite manuals
## mac
Documentation and build scripts for Apple Mac OS
# KTextEditor plugins, for the kate part # Most plugins will need to link against KF5TextEditor to have access to its plugin interface.
add_subdirectory (ktexteditor) find_package(KF5TextEditor ${KF5_DEP_VERSION} QUIET REQUIRED)
# Kate plugins ecm_optional_add_subdirectory(backtracebrowser)
add_subdirectory (kate) ecm_optional_add_subdirectory(close-except-like) # Close all documents except this one (or similar).
# Plasma applets ecm_optional_add_subdirectory(filebrowser)
add_subdirectory (plasma) ecm_optional_add_subdirectory(filetree)
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(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})
kcoreaddons_desktop_to_json(katebacktracebrowserplugin katebacktracebrowserplugin.desktop)
install(TARGETS katebacktracebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
add_executable(btbrowser_test "")
target_include_directories(btbrowser_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
find_package(Qt5Test ${QT_MIN_VERSION} QUIET REQUIRED)
target_sources(btbrowser_test PRIVATE
add_test(NAME plugin-btbrowser_test COMMAND btbrowser_test)
/* This file is part of the KDE project
* Copyright 2014 Dominik Haumann <dhaumann@kde.org>
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* Library General Public License for more details.
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
#include "btbrowsertest.h"
#include "btparser.h"