Add KTextEditor recipe

Reviewers: cordlandwehr

Reviewed By: cordlandwehr

Differential Revision: https://phabricator.kde.org/D7277
This commit is contained in:
Volker Krause
2017-08-12 15:25:50 +02:00
parent 2e2181f7ec
commit 19817e0e4c
3 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
DESCRIPTION = "KTextEditor"
HOMEPAGE = "https://api.kde.org/frameworks/ktexteditor/html/index.html"
LICENSE = "LGPL-2.1"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
PR = "r0"
DEPENDS = " \
qtbase \
karchive \
kconfig \
kguiaddons \
ki18n \
kio \
kparts \
sonnet \
kiconthemes \
ksyntaxhighlighting \
"
SRC_URI = " \
git://anongit.kde.org/ktexteditor;nobranch=1 \
file://0001-no-accessibility.patch \
"
S = "${WORKDIR}/git"
inherit cmake_kf5
inherit gettext
inherit python3native
do_compile_prepend() {
# desktoptojson needs to find installed service type files
export XDG_DATA_DIRS=${STAGING_DATADIR}:$XDG_DATA_DIRS
}
FILES_${PN} += " \
${libdir}/plugins/kf5/parts/katepart.so \
${datadir}/kservices5/*.desktop \
${datadir}/kservicetypes5/*.desktop \
${datadir}/dbus-1/system-services/*.service \
${datadir}/polkit-1/actions/*.policy \
${datadir}/katepart5/script/README.md \
"

View File

@@ -0,0 +1,27 @@
diff --git a/src/view/kateviewinternal.cpp b/src/view/kateviewinternal.cpp
index 55f994ec..b664d5f1 100644
--- a/src/view/kateviewinternal.cpp
+++ b/src/view/kateviewinternal.cpp
@@ -3756,18 +3756,22 @@ void KateViewInternal::flashChar(const KTextEditor::Cursor &pos, KTextEditor::At
void KateViewInternal::documentTextInserted(KTextEditor::Document *document, const KTextEditor::Range &range)
{
+#ifndef QT_NO_ACCESSIBILITY
if (QAccessible::isActive()) {
QAccessibleTextInsertEvent ev(this,
KateViewAccessible::positionFromCursor(this, range.start()), document->text(range));
QAccessible::updateAccessibility(&ev);
}
+#endif
}
void KateViewInternal::documentTextRemoved(KTextEditor::Document * /*document*/, const KTextEditor::Range &range, const QString &oldText)
{
+#ifndef QT_NO_ACCESSIBILITY
if (QAccessible::isActive()) {
QAccessibleTextRemoveEvent ev(this,
KateViewAccessible::positionFromCursor(this, range.start()), oldText);
QAccessible::updateAccessibility(&ev);
}
+#endif
}

View File

@@ -0,0 +1,2 @@
require ${PN}.inc
SRCREV = "v${PV}"