commit: 6b5543491949477fd42a4076e3f23439e4cce163 Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> AuthorDate: Sun Sep 11 16:37:45 2016 +0000 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> CommitDate: Wed Sep 14 14:13:12 2016 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=6b554349
kde-frameworks/ktexteditor: Fix crash after code folding Package-Manager: portage-2.3.0 .../files/ktexteditor-5.26.0-runtime-crash.patch | 39 +++++++++++++++ .../ktexteditor/ktexteditor-5.26.0-r1.ebuild | 55 ++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-runtime-crash.patch b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-runtime-crash.patch new file mode 100644 index 0000000..36636d4 --- /dev/null +++ b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-runtime-crash.patch @@ -0,0 +1,39 @@ +From: Dominik Haumann <[email protected]> +Date: Thu, 08 Sep 2016 13:32:39 +0000 +Subject: Fix crash: Make sure the display cursor is valid after text folding +X-Git-Url: http://quickgit.kde.org/?p=ktexteditor.git&a=commitdiff&h=09a1e864d54735ebcab6bf31198fdef969b92a67 +--- +Fix crash: Make sure the display cursor is valid after text folding + +This bug existed at least since KDE 4.3 (2009), took a long time to track it down. + +FIXED-IN: KDE Frameworks 5.27 +BUG: 367466 +Differential-Revision: https://phabricator.kde.org/D2709 +--- + + +--- a/src/view/kateviewinternal.cpp ++++ b/src/view/kateviewinternal.cpp +@@ -709,6 +709,10 @@ + + // set cursor to start of folding region + updateCursor(foldingRange.start(), true); ++ } else { ++ // force an update of the cursor, since otherwise the m_displayCursor ++ // line may be below the total amount of visible lines. ++ updateCursor(m_cursor, true); + } + + updateView(); +@@ -1515,6 +1519,9 @@ + m_view->completionWidget()->cursorUp(); + return; + } ++ ++ // assert that the display cursor is in visible lines ++ Q_ASSERT(m_displayCursor.line() < m_view->textFolding().visibleLines()); + + /** + * move cursor to start of line, if we are at first line! + diff --git a/kde-frameworks/ktexteditor/ktexteditor-5.26.0-r1.ebuild b/kde-frameworks/ktexteditor/ktexteditor-5.26.0-r1.ebuild new file mode 100644 index 0000000..41ba421 --- /dev/null +++ b/kde-frameworks/ktexteditor/ktexteditor-5.26.0-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="Framework providing a full text editor component" +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="git" + +RDEPEND=" + $(add_frameworks_dep karchive) + $(add_frameworks_dep kcodecs) + $(add_frameworks_dep kcompletion) + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kconfigwidgets) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep kguiaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kiconthemes) + $(add_frameworks_dep kio) + $(add_frameworks_dep kitemviews) + $(add_frameworks_dep kjobwidgets) + $(add_frameworks_dep kparts) + $(add_frameworks_dep ktextwidgets) + $(add_frameworks_dep kwidgetsaddons) + $(add_frameworks_dep kxmlgui) + $(add_frameworks_dep sonnet) + $(add_qt_dep qtgui) + $(add_qt_dep qtprintsupport) + $(add_qt_dep qtscript) + $(add_qt_dep qtwidgets) + $(add_qt_dep qtxml) + git? ( dev-libs/libgit2:= ) +" +DEPEND="${RDEPEND} + $(add_qt_dep qtxmlpatterns) + test? ( $(add_frameworks_dep kservice) ) +" + +RESTRICT+=" test" + +PATCHES=( "${FILESDIR}/${P}-runtime-crash.patch" ) + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_find_package git LibGit2) + ) + + kde5_src_configure +}
