summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>2016-09-28 23:07:42 +0200
committerMichael Palimaka <kensington@gentoo.org>2016-09-29 21:39:06 +1000
commit33a18042925667eb8c267a441b5cfa8830c3039e (patch)
treed3a592920afb988f06d3ba5828a1621eb462a002
parentkde-frameworks/kio: Fix ABI break and limitation to TLS 1.0 (diff)
downloadgentoo-33a18042925667eb8c267a441b5cfa8830c3039e.tar.gz
gentoo-33a18042925667eb8c267a441b5cfa8830c3039e.tar.bz2
gentoo-33a18042925667eb8c267a441b5cfa8830c3039e.zip
kde-frameworks/ktexteditor: Add more fixes from upstream
Fixes two regressions since 5.23 and one EOL detection bug. Package-Manager: portage-2.3.0
-rw-r--r--kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-fix-eol-detection.patch27
-rw-r--r--kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-fix-searchbar.patch58
-rw-r--r--kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-runtime-crash1.patch149
-rw-r--r--kde-frameworks/ktexteditor/ktexteditor-5.26.0-r2.ebuild60
4 files changed, 294 insertions, 0 deletions
diff --git a/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-fix-eol-detection.patch b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-fix-eol-detection.patch
new file mode 100644
index 000000000000..7b51ddb44883
--- /dev/null
+++ b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-fix-eol-detection.patch
@@ -0,0 +1,27 @@
+From: Christoph Cullmann <cullmann@kde.org>
+Date: Tue, 06 Sep 2016 20:47:41 +0000
+Subject: fix eol setting in mode lines
+X-Git-Url: http://quickgit.kde.org/?p=ktexteditor.git&a=commitdiff&h=07b003e5a87b44d4618204bbcff257c59a446025
+---
+fix eol setting in mode lines
+turn off auto-detection if set
+BUG: 365705
+---
+
+
+--- a/src/document/katedocument.cpp
++++ b/src/document/katedocument.cpp
+@@ -4578,7 +4578,12 @@
+ QStringList l;
+ l << QStringLiteral("unix") << QStringLiteral("dos") << QStringLiteral("mac");
+ if ((n = l.indexOf(val.toLower())) != -1) {
++ /**
++ * set eol + avoid that it is overwritten by auto-detection again!
++ * this fixes e.g. .kateconfig files with // kate: eol dos; to work, bug 365705
++ */
+ m_config->setEol(n);
++ m_config->setAllowEolDetection(false);
+ }
+ } else if (var == QLatin1String("bom") || var == QLatin1String("byte-order-marker")) {
+ if (checkBoolValue(val, &state)) {
+
diff --git a/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-fix-searchbar.patch b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-fix-searchbar.patch
new file mode 100644
index 000000000000..22b3e0f218fa
--- /dev/null
+++ b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-fix-searchbar.patch
@@ -0,0 +1,58 @@
+From: Roman Gilg <subdiff@gmail.com>
+Date: Thu, 08 Sep 2016 10:51:51 +0000
+Subject: KateNormalInputMode needs to rerun SearchBar enter methods
+X-Git-Url: http://quickgit.kde.org/?p=ktexteditor.git&a=commitdiff&h=2c4feeb0c9107732399f8ae3dacea3124572f345
+---
+KateNormalInputMode needs to rerun SearchBar enter methods
+
+This is a fix for a regression resulting from commit
+9223ac51c9453017c9b11718eed858050697cfbd.
+
+REVIEW: 128859
+---
+
+
+--- a/src/inputmode/katenormalinputmode.cpp
++++ b/src/inputmode/katenormalinputmode.cpp
+@@ -184,7 +184,7 @@
+ const bool wantPowerMode = (mode == PowerSearchBar);
+
+ /**
+- * create search bar as not there? use right mode
++ * create search bar is not there? use right mode
+ */
+ if (!m_searchBar) {
+ m_searchBar = new KateSearchBar(wantPowerMode, view(), KateViewConfig::global());
+@@ -193,11 +193,12 @@
+ /**
+ * else: switch mode if needed!
+ */
+- else if ((mode != IncrementalSearchBarOrKeepMode) && (wantPowerMode != m_searchBar->isPower())) {
+- if (wantPowerMode)
++ else if (mode != IncrementalSearchBarOrKeepMode) {
++ if (wantPowerMode) {
+ m_searchBar->enterPowerMode();
+- else
++ } else {
+ m_searchBar->enterIncrementalMode();
++ }
+ }
+
+ return m_searchBar;
+
+--- a/src/inputmode/katenormalinputmode.h
++++ b/src/inputmode/katenormalinputmode.h
+@@ -78,9 +78,9 @@
+ private:
+ /**
+ * Search bar mode:
+- * - Incremental mode
+- * - Power mode, aka find & replace
+- * - Incremental mode, but don't change mode if already there
++ * - Setup Incremental mode, among other things: potential new search pattern
++ * - Setup Power mode, aka find & replace: Also potential new search pattern
++ * - Use current mode and current search pattern or if no Search bar exists, launch Incremental mode
+ */
+ enum SearchBarMode {
+ IncrementalSearchBar,
+
diff --git a/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-runtime-crash1.patch b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-runtime-crash1.patch
new file mode 100644
index 000000000000..e28fc7e2212f
--- /dev/null
+++ b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-runtime-crash1.patch
@@ -0,0 +1,149 @@
+From: Dominik Haumann <dhaumann@kde.org>
+Date: Wed, 07 Sep 2016 10:27:00 +0000
+Subject: Fix crash when showing top or bottom messages mutliple times
+X-Git-Url: http://quickgit.kde.org/?p=ktexteditor.git&a=commitdiff&h=86f1dde943389bbf211ec1cde3f27c9681351d3f
+---
+Fix crash when showing top or bottom messages mutliple times
+
+Unfortunately, this regression was introduced in KF 5.24-5.26.
+Will be fixed with KF 5.27.
+---
+
+
+--- a/autotests/src/messagetest.cpp
++++ b/autotests/src/messagetest.cpp
+@@ -66,7 +66,7 @@
+ QVERIFY(message != 0);
+ delete message;
+ QTest::qWait(600); // fadeout animation takes 500 ms
+- QVERIFY(!view->messageWidget());
++ QVERIFY(!view->messageWidget()->isVisible());
+ }
+
+ void MessageTest::testAutoHide()
+@@ -98,7 +98,7 @@
+
+ // message widget should be hidden after 2 seconds
+ QTest::qWait(500);
+- QVERIFY(!view->messageWidget());
++ QVERIFY(!view->messageWidget()->isVisible());
+ }
+
+ void MessageTest::testAutoHideAfterUserInteraction()
+@@ -142,7 +142,7 @@
+
+ // after a total of 3.6 seconds, widget should be hidden
+ QTest::qWait(500);
+- QVERIFY(!view->messageWidget());
++ QVERIFY(!view->messageWidget()->isVisible());
+ }
+
+ void MessageTest::testMessageQueue()
+@@ -200,7 +200,7 @@
+
+ // after a total of 3.1s, animation is finished and widget is hidden
+ QTest::qWait(500);
+- QVERIFY(!view->messageWidget());
++ QVERIFY(!view->messageWidget()->isVisible());
+ }
+
+ void MessageTest::testPriority()
+@@ -305,8 +305,8 @@
+ // delete message, then check after fadeout time 0f 0.5s whether message is gone
+ delete m1;
+ QTest::qWait(600);
+- QVERIFY(!v1->messageWidget());
+- QVERIFY(!v2->messageWidget());
++ QVERIFY(!v1->messageWidget()->isVisible());
++ QVERIFY(!v2->messageWidget()->isVisible());
+ }
+
+ void MessageTest::testHideView()
+@@ -353,7 +353,7 @@
+ // wait another 0.5s, then message widget should be hidden
+ QTest::qWait(500);
+ QVERIFY(message.data() == 0);
+- QVERIFY(!view->messageWidget());
++ QVERIFY(!view->messageWidget()->isVisible());
+ }
+
+ void MessageTest::testHideViewAfterUserInteraction()
+@@ -414,6 +414,6 @@
+
+ // another 0.5s, and the message widget should be hidden
+ QTest::qWait(600);
+- QVERIFY(!view->messageWidget());
++ QVERIFY(!view->messageWidget()->isVisible());
+ }
+
+-
+
+--- a/src/view/katemessagewidget.cpp
++++ b/src/view/katemessagewidget.cpp
+@@ -78,7 +78,6 @@
+ // if not message to show, just stop
+ if (m_messageQueue.size() == 0) {
+ hide();
+- deleteLater();
+ return;
+ }
+
+--- a/src/view/kateview.cpp
++++ b/src/view/kateview.cpp
+@@ -51,6 +51,7 @@
+ #include "script/katescriptmanager.h"
+ #include "script/katescriptaction.h"
+ #include "export/exporter.h"
++#include "katemessagewidget.h"
+ #include "katetemplatehandler.h"
+ #include "katepartdebug.h"
+ #include "printing/kateprinter.h"
+--- a/src/view/kateview.h
++++ b/src/view/kateview.h
+@@ -38,7 +38,6 @@
+ #include "katetextrange.h"
+ #include "katetextfolding.h"
+ #include "katerenderer.h"
+-#include "katemessagewidget.h"
+
+ namespace KTextEditor
+ {
+@@ -58,6 +57,7 @@
+ class KateGotoBar;
+ class KateDictionaryBar;
+ class KateSpellingMenu;
++class KateMessageWidget;
+ class KateIconBorder;
+ class KateStatusBar;
+ class KateViewEncodingAction;
+@@ -873,13 +873,13 @@
+
+ private:
+ /** Message widget showing KTextEditor::Messages above the View. */
+- QPointer<KateMessageWidget> m_topMessageWidget;
++ KateMessageWidget *m_topMessageWidget;
+ /** Message widget showing KTextEditor::Messages below the View. */
+- QPointer<KateMessageWidget> m_bottomMessageWidget;
++ KateMessageWidget *m_bottomMessageWidget;
+ /** Message widget showing KTextEditor::Messages as view overlay in top right corner. */
+- QPointer<KateMessageWidget> m_floatTopMessageWidget;
++ KateMessageWidget *m_floatTopMessageWidget;
+ /** Message widget showing KTextEditor::Messages as view overlay in bottom left corner. */
+- QPointer<KateMessageWidget> m_floatBottomMessageWidget;
++ KateMessageWidget *m_floatBottomMessageWidget;
+ /** Layout for floating notifications */
+ QVBoxLayout *m_notificationLayout;
+
+--- a/src/view/kateviewinternal.cpp
++++ b/src/view/kateviewinternal.cpp
+@@ -484,7 +484,9 @@
+ if (!calledExternally && qAbs(viewLinesScrolled) < lines &&
+ // NOTE: on some machines we must update if the floating widget is visible
+ // otherwise strange painting bugs may occur during scrolling...
+- !(m_view->m_floatTopMessageWidget || m_view->m_bottomMessageWidget))
++ !((m_view->m_floatTopMessageWidget && m_view->m_floatTopMessageWidget->isVisible()) ||
++ (m_view->m_floatBottomMessageWidget && m_view->m_floatBottomMessageWidget->isVisible()))
++ )
+ {
+ updateView(false, viewLinesScrolled);
+
diff --git a/kde-frameworks/ktexteditor/ktexteditor-5.26.0-r2.ebuild b/kde-frameworks/ktexteditor/ktexteditor-5.26.0-r2.ebuild
new file mode 100644
index 000000000000..a1001a7170cf
--- /dev/null
+++ b/kde-frameworks/ktexteditor/ktexteditor-5.26.0-r2.ebuild
@@ -0,0 +1,60 @@
+# 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}-fix-eol-detection.patch"
+ "${FILESDIR}/${P}-fix-searchbar.patch"
+ "${FILESDIR}/${P}-runtime-crash.patch"
+ "${FILESDIR}/${P}-runtime-crash1.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package git LibGit2)
+ )
+
+ kde5_src_configure
+}