1 |
commit: 33a18042925667eb8c267a441b5cfa8830c3039e |
2 |
Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Sep 28 21:07:42 2016 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 29 11:39:06 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33a18042 |
7 |
|
8 |
kde-frameworks/ktexteditor: Add more fixes from upstream |
9 |
|
10 |
Fixes two regressions since 5.23 and one EOL detection bug. |
11 |
|
12 |
Package-Manager: portage-2.3.0 |
13 |
|
14 |
.../ktexteditor-5.26.0-fix-eol-detection.patch | 27 ++++ |
15 |
.../files/ktexteditor-5.26.0-fix-searchbar.patch | 58 ++++++++ |
16 |
.../files/ktexteditor-5.26.0-runtime-crash1.patch | 149 +++++++++++++++++++++ |
17 |
.../ktexteditor/ktexteditor-5.26.0-r2.ebuild | 60 +++++++++ |
18 |
4 files changed, 294 insertions(+) |
19 |
|
20 |
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 |
21 |
new file mode 100644 |
22 |
index 00000000..7b51ddb |
23 |
--- /dev/null |
24 |
+++ b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-fix-eol-detection.patch |
25 |
@@ -0,0 +1,27 @@ |
26 |
+From: Christoph Cullmann <cullmann@×××.org> |
27 |
+Date: Tue, 06 Sep 2016 20:47:41 +0000 |
28 |
+Subject: fix eol setting in mode lines |
29 |
+X-Git-Url: http://quickgit.kde.org/?p=ktexteditor.git&a=commitdiff&h=07b003e5a87b44d4618204bbcff257c59a446025 |
30 |
+--- |
31 |
+fix eol setting in mode lines |
32 |
+turn off auto-detection if set |
33 |
+BUG: 365705 |
34 |
+--- |
35 |
+ |
36 |
+ |
37 |
+--- a/src/document/katedocument.cpp |
38 |
++++ b/src/document/katedocument.cpp |
39 |
+@@ -4578,7 +4578,12 @@ |
40 |
+ QStringList l; |
41 |
+ l << QStringLiteral("unix") << QStringLiteral("dos") << QStringLiteral("mac"); |
42 |
+ if ((n = l.indexOf(val.toLower())) != -1) { |
43 |
++ /** |
44 |
++ * set eol + avoid that it is overwritten by auto-detection again! |
45 |
++ * this fixes e.g. .kateconfig files with // kate: eol dos; to work, bug 365705 |
46 |
++ */ |
47 |
+ m_config->setEol(n); |
48 |
++ m_config->setAllowEolDetection(false); |
49 |
+ } |
50 |
+ } else if (var == QLatin1String("bom") || var == QLatin1String("byte-order-marker")) { |
51 |
+ if (checkBoolValue(val, &state)) { |
52 |
+ |
53 |
|
54 |
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 |
55 |
new file mode 100644 |
56 |
index 00000000..22b3e0f |
57 |
--- /dev/null |
58 |
+++ b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-fix-searchbar.patch |
59 |
@@ -0,0 +1,58 @@ |
60 |
+From: Roman Gilg <subdiff@×××××.com> |
61 |
+Date: Thu, 08 Sep 2016 10:51:51 +0000 |
62 |
+Subject: KateNormalInputMode needs to rerun SearchBar enter methods |
63 |
+X-Git-Url: http://quickgit.kde.org/?p=ktexteditor.git&a=commitdiff&h=2c4feeb0c9107732399f8ae3dacea3124572f345 |
64 |
+--- |
65 |
+KateNormalInputMode needs to rerun SearchBar enter methods |
66 |
+ |
67 |
+This is a fix for a regression resulting from commit |
68 |
+9223ac51c9453017c9b11718eed858050697cfbd. |
69 |
+ |
70 |
+REVIEW: 128859 |
71 |
+--- |
72 |
+ |
73 |
+ |
74 |
+--- a/src/inputmode/katenormalinputmode.cpp |
75 |
++++ b/src/inputmode/katenormalinputmode.cpp |
76 |
+@@ -184,7 +184,7 @@ |
77 |
+ const bool wantPowerMode = (mode == PowerSearchBar); |
78 |
+ |
79 |
+ /** |
80 |
+- * create search bar as not there? use right mode |
81 |
++ * create search bar is not there? use right mode |
82 |
+ */ |
83 |
+ if (!m_searchBar) { |
84 |
+ m_searchBar = new KateSearchBar(wantPowerMode, view(), KateViewConfig::global()); |
85 |
+@@ -193,11 +193,12 @@ |
86 |
+ /** |
87 |
+ * else: switch mode if needed! |
88 |
+ */ |
89 |
+- else if ((mode != IncrementalSearchBarOrKeepMode) && (wantPowerMode != m_searchBar->isPower())) { |
90 |
+- if (wantPowerMode) |
91 |
++ else if (mode != IncrementalSearchBarOrKeepMode) { |
92 |
++ if (wantPowerMode) { |
93 |
+ m_searchBar->enterPowerMode(); |
94 |
+- else |
95 |
++ } else { |
96 |
+ m_searchBar->enterIncrementalMode(); |
97 |
++ } |
98 |
+ } |
99 |
+ |
100 |
+ return m_searchBar; |
101 |
+ |
102 |
+--- a/src/inputmode/katenormalinputmode.h |
103 |
++++ b/src/inputmode/katenormalinputmode.h |
104 |
+@@ -78,9 +78,9 @@ |
105 |
+ private: |
106 |
+ /** |
107 |
+ * Search bar mode: |
108 |
+- * - Incremental mode |
109 |
+- * - Power mode, aka find & replace |
110 |
+- * - Incremental mode, but don't change mode if already there |
111 |
++ * - Setup Incremental mode, among other things: potential new search pattern |
112 |
++ * - Setup Power mode, aka find & replace: Also potential new search pattern |
113 |
++ * - Use current mode and current search pattern or if no Search bar exists, launch Incremental mode |
114 |
+ */ |
115 |
+ enum SearchBarMode { |
116 |
+ IncrementalSearchBar, |
117 |
+ |
118 |
|
119 |
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 |
120 |
new file mode 100644 |
121 |
index 00000000..e28fc7e |
122 |
--- /dev/null |
123 |
+++ b/kde-frameworks/ktexteditor/files/ktexteditor-5.26.0-runtime-crash1.patch |
124 |
@@ -0,0 +1,149 @@ |
125 |
+From: Dominik Haumann <dhaumann@×××.org> |
126 |
+Date: Wed, 07 Sep 2016 10:27:00 +0000 |
127 |
+Subject: Fix crash when showing top or bottom messages mutliple times |
128 |
+X-Git-Url: http://quickgit.kde.org/?p=ktexteditor.git&a=commitdiff&h=86f1dde943389bbf211ec1cde3f27c9681351d3f |
129 |
+--- |
130 |
+Fix crash when showing top or bottom messages mutliple times |
131 |
+ |
132 |
+Unfortunately, this regression was introduced in KF 5.24-5.26. |
133 |
+Will be fixed with KF 5.27. |
134 |
+--- |
135 |
+ |
136 |
+ |
137 |
+--- a/autotests/src/messagetest.cpp |
138 |
++++ b/autotests/src/messagetest.cpp |
139 |
+@@ -66,7 +66,7 @@ |
140 |
+ QVERIFY(message != 0); |
141 |
+ delete message; |
142 |
+ QTest::qWait(600); // fadeout animation takes 500 ms |
143 |
+- QVERIFY(!view->messageWidget()); |
144 |
++ QVERIFY(!view->messageWidget()->isVisible()); |
145 |
+ } |
146 |
+ |
147 |
+ void MessageTest::testAutoHide() |
148 |
+@@ -98,7 +98,7 @@ |
149 |
+ |
150 |
+ // message widget should be hidden after 2 seconds |
151 |
+ QTest::qWait(500); |
152 |
+- QVERIFY(!view->messageWidget()); |
153 |
++ QVERIFY(!view->messageWidget()->isVisible()); |
154 |
+ } |
155 |
+ |
156 |
+ void MessageTest::testAutoHideAfterUserInteraction() |
157 |
+@@ -142,7 +142,7 @@ |
158 |
+ |
159 |
+ // after a total of 3.6 seconds, widget should be hidden |
160 |
+ QTest::qWait(500); |
161 |
+- QVERIFY(!view->messageWidget()); |
162 |
++ QVERIFY(!view->messageWidget()->isVisible()); |
163 |
+ } |
164 |
+ |
165 |
+ void MessageTest::testMessageQueue() |
166 |
+@@ -200,7 +200,7 @@ |
167 |
+ |
168 |
+ // after a total of 3.1s, animation is finished and widget is hidden |
169 |
+ QTest::qWait(500); |
170 |
+- QVERIFY(!view->messageWidget()); |
171 |
++ QVERIFY(!view->messageWidget()->isVisible()); |
172 |
+ } |
173 |
+ |
174 |
+ void MessageTest::testPriority() |
175 |
+@@ -305,8 +305,8 @@ |
176 |
+ // delete message, then check after fadeout time 0f 0.5s whether message is gone |
177 |
+ delete m1; |
178 |
+ QTest::qWait(600); |
179 |
+- QVERIFY(!v1->messageWidget()); |
180 |
+- QVERIFY(!v2->messageWidget()); |
181 |
++ QVERIFY(!v1->messageWidget()->isVisible()); |
182 |
++ QVERIFY(!v2->messageWidget()->isVisible()); |
183 |
+ } |
184 |
+ |
185 |
+ void MessageTest::testHideView() |
186 |
+@@ -353,7 +353,7 @@ |
187 |
+ // wait another 0.5s, then message widget should be hidden |
188 |
+ QTest::qWait(500); |
189 |
+ QVERIFY(message.data() == 0); |
190 |
+- QVERIFY(!view->messageWidget()); |
191 |
++ QVERIFY(!view->messageWidget()->isVisible()); |
192 |
+ } |
193 |
+ |
194 |
+ void MessageTest::testHideViewAfterUserInteraction() |
195 |
+@@ -414,6 +414,6 @@ |
196 |
+ |
197 |
+ // another 0.5s, and the message widget should be hidden |
198 |
+ QTest::qWait(600); |
199 |
+- QVERIFY(!view->messageWidget()); |
200 |
++ QVERIFY(!view->messageWidget()->isVisible()); |
201 |
+ } |
202 |
+ |
203 |
+- |
204 |
+ |
205 |
+--- a/src/view/katemessagewidget.cpp |
206 |
++++ b/src/view/katemessagewidget.cpp |
207 |
+@@ -78,7 +78,6 @@ |
208 |
+ // if not message to show, just stop |
209 |
+ if (m_messageQueue.size() == 0) { |
210 |
+ hide(); |
211 |
+- deleteLater(); |
212 |
+ return; |
213 |
+ } |
214 |
+ |
215 |
+--- a/src/view/kateview.cpp |
216 |
++++ b/src/view/kateview.cpp |
217 |
+@@ -51,6 +51,7 @@ |
218 |
+ #include "script/katescriptmanager.h" |
219 |
+ #include "script/katescriptaction.h" |
220 |
+ #include "export/exporter.h" |
221 |
++#include "katemessagewidget.h" |
222 |
+ #include "katetemplatehandler.h" |
223 |
+ #include "katepartdebug.h" |
224 |
+ #include "printing/kateprinter.h" |
225 |
+--- a/src/view/kateview.h |
226 |
++++ b/src/view/kateview.h |
227 |
+@@ -38,7 +38,6 @@ |
228 |
+ #include "katetextrange.h" |
229 |
+ #include "katetextfolding.h" |
230 |
+ #include "katerenderer.h" |
231 |
+-#include "katemessagewidget.h" |
232 |
+ |
233 |
+ namespace KTextEditor |
234 |
+ { |
235 |
+@@ -58,6 +57,7 @@ |
236 |
+ class KateGotoBar; |
237 |
+ class KateDictionaryBar; |
238 |
+ class KateSpellingMenu; |
239 |
++class KateMessageWidget; |
240 |
+ class KateIconBorder; |
241 |
+ class KateStatusBar; |
242 |
+ class KateViewEncodingAction; |
243 |
+@@ -873,13 +873,13 @@ |
244 |
+ |
245 |
+ private: |
246 |
+ /** Message widget showing KTextEditor::Messages above the View. */ |
247 |
+- QPointer<KateMessageWidget> m_topMessageWidget; |
248 |
++ KateMessageWidget *m_topMessageWidget; |
249 |
+ /** Message widget showing KTextEditor::Messages below the View. */ |
250 |
+- QPointer<KateMessageWidget> m_bottomMessageWidget; |
251 |
++ KateMessageWidget *m_bottomMessageWidget; |
252 |
+ /** Message widget showing KTextEditor::Messages as view overlay in top right corner. */ |
253 |
+- QPointer<KateMessageWidget> m_floatTopMessageWidget; |
254 |
++ KateMessageWidget *m_floatTopMessageWidget; |
255 |
+ /** Message widget showing KTextEditor::Messages as view overlay in bottom left corner. */ |
256 |
+- QPointer<KateMessageWidget> m_floatBottomMessageWidget; |
257 |
++ KateMessageWidget *m_floatBottomMessageWidget; |
258 |
+ /** Layout for floating notifications */ |
259 |
+ QVBoxLayout *m_notificationLayout; |
260 |
+ |
261 |
+--- a/src/view/kateviewinternal.cpp |
262 |
++++ b/src/view/kateviewinternal.cpp |
263 |
+@@ -484,7 +484,9 @@ |
264 |
+ if (!calledExternally && qAbs(viewLinesScrolled) < lines && |
265 |
+ // NOTE: on some machines we must update if the floating widget is visible |
266 |
+ // otherwise strange painting bugs may occur during scrolling... |
267 |
+- !(m_view->m_floatTopMessageWidget || m_view->m_bottomMessageWidget)) |
268 |
++ !((m_view->m_floatTopMessageWidget && m_view->m_floatTopMessageWidget->isVisible()) || |
269 |
++ (m_view->m_floatBottomMessageWidget && m_view->m_floatBottomMessageWidget->isVisible())) |
270 |
++ ) |
271 |
+ { |
272 |
+ updateView(false, viewLinesScrolled); |
273 |
+ |
274 |
|
275 |
diff --git a/kde-frameworks/ktexteditor/ktexteditor-5.26.0-r2.ebuild b/kde-frameworks/ktexteditor/ktexteditor-5.26.0-r2.ebuild |
276 |
new file mode 100644 |
277 |
index 00000000..a1001a7 |
278 |
--- /dev/null |
279 |
+++ b/kde-frameworks/ktexteditor/ktexteditor-5.26.0-r2.ebuild |
280 |
@@ -0,0 +1,60 @@ |
281 |
+# Copyright 1999-2016 Gentoo Foundation |
282 |
+# Distributed under the terms of the GNU General Public License v2 |
283 |
+# $Id$ |
284 |
+ |
285 |
+EAPI=6 |
286 |
+ |
287 |
+VIRTUALX_REQUIRED="test" |
288 |
+inherit kde5 |
289 |
+ |
290 |
+DESCRIPTION="Framework providing a full text editor component" |
291 |
+LICENSE="LGPL-2+" |
292 |
+KEYWORDS="~amd64 ~arm ~x86" |
293 |
+IUSE="git" |
294 |
+ |
295 |
+RDEPEND=" |
296 |
+ $(add_frameworks_dep karchive) |
297 |
+ $(add_frameworks_dep kcodecs) |
298 |
+ $(add_frameworks_dep kcompletion) |
299 |
+ $(add_frameworks_dep kconfig) |
300 |
+ $(add_frameworks_dep kconfigwidgets) |
301 |
+ $(add_frameworks_dep kcoreaddons) |
302 |
+ $(add_frameworks_dep kguiaddons) |
303 |
+ $(add_frameworks_dep ki18n) |
304 |
+ $(add_frameworks_dep kiconthemes) |
305 |
+ $(add_frameworks_dep kio) |
306 |
+ $(add_frameworks_dep kitemviews) |
307 |
+ $(add_frameworks_dep kjobwidgets) |
308 |
+ $(add_frameworks_dep kparts) |
309 |
+ $(add_frameworks_dep ktextwidgets) |
310 |
+ $(add_frameworks_dep kwidgetsaddons) |
311 |
+ $(add_frameworks_dep kxmlgui) |
312 |
+ $(add_frameworks_dep sonnet) |
313 |
+ $(add_qt_dep qtgui) |
314 |
+ $(add_qt_dep qtprintsupport) |
315 |
+ $(add_qt_dep qtscript) |
316 |
+ $(add_qt_dep qtwidgets) |
317 |
+ $(add_qt_dep qtxml) |
318 |
+ git? ( dev-libs/libgit2:= ) |
319 |
+" |
320 |
+DEPEND="${RDEPEND} |
321 |
+ $(add_qt_dep qtxmlpatterns) |
322 |
+ test? ( $(add_frameworks_dep kservice) ) |
323 |
+" |
324 |
+ |
325 |
+RESTRICT+=" test" |
326 |
+ |
327 |
+PATCHES=( |
328 |
+ "${FILESDIR}/${P}-fix-eol-detection.patch" |
329 |
+ "${FILESDIR}/${P}-fix-searchbar.patch" |
330 |
+ "${FILESDIR}/${P}-runtime-crash.patch" |
331 |
+ "${FILESDIR}/${P}-runtime-crash1.patch" |
332 |
+) |
333 |
+ |
334 |
+src_configure() { |
335 |
+ local mycmakeargs=( |
336 |
+ $(cmake-utils_use_find_package git LibGit2) |
337 |
+ ) |
338 |
+ |
339 |
+ kde5_src_configure |
340 |
+} |