1 |
commit: 4357c66809117a9949500326079556ae84107e33 |
2 |
Author: Johannes Huber <johu <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 1 09:07:33 2014 +0000 |
4 |
Commit: Johannes Huber <johu <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 1 09:07:33 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=4357c668 |
7 |
|
8 |
[kde-base/katepart] Remove unused patch |
9 |
|
10 |
Package-Manager: portage-2.2.10 |
11 |
|
12 |
--- |
13 |
.../katepart/files/katepart-4.12.3-crash-fix.patch | 323 --------------------- |
14 |
1 file changed, 323 deletions(-) |
15 |
|
16 |
diff --git a/kde-base/katepart/files/katepart-4.12.3-crash-fix.patch b/kde-base/katepart/files/katepart-4.12.3-crash-fix.patch |
17 |
deleted file mode 100644 |
18 |
index e6e87da..0000000 |
19 |
--- a/kde-base/katepart/files/katepart-4.12.3-crash-fix.patch |
20 |
+++ /dev/null |
21 |
@@ -1,323 +0,0 @@ |
22 |
-diff --git a/part/completion/katecompletionmodel.cpp b/part/completion/katecompletionmodel.cpp |
23 |
-index 3fa8080..22af495 100644 |
24 |
---- a/part/completion/katecompletionmodel.cpp |
25 |
-+++ b/part/completion/katecompletionmodel.cpp |
26 |
-@@ -504,7 +504,7 @@ QModelIndex KateCompletionModel::indexForGroup( Group * g ) const |
27 |
- return createIndex(row, 0, 0); |
28 |
- } |
29 |
- |
30 |
--void KateCompletionModel::clearGroups( bool shouldReset ) |
31 |
-+void KateCompletionModel::clearGroups() |
32 |
- { |
33 |
- clearExpanding(); |
34 |
- m_ungrouped->clear(); |
35 |
-@@ -536,9 +536,6 @@ void KateCompletionModel::clearGroups( bool shouldReset ) |
36 |
- |
37 |
- m_emptyGroups.append(m_bestMatches); |
38 |
- m_groupHash.insert(BestMatchesProperty, m_bestMatches); |
39 |
-- |
40 |
-- if(shouldReset) |
41 |
-- reset(); |
42 |
- } |
43 |
- |
44 |
- QSet<KateCompletionModel::Group*> KateCompletionModel::createItems(const HierarchicalModelHandler& _handler, const QModelIndex& i, bool notifyModel) { |
45 |
-@@ -577,9 +574,10 @@ QSet<KateCompletionModel::Group*> KateCompletionModel::deleteItems(const QModelI |
46 |
- |
47 |
- void KateCompletionModel::createGroups() |
48 |
- { |
49 |
-+ beginResetModel(); |
50 |
- //After clearing the model, it has to be reset, else we will be in an invalid state while inserting |
51 |
- //new groups. |
52 |
-- clearGroups(true); |
53 |
-+ clearGroups(); |
54 |
- |
55 |
- bool has_groups=false; |
56 |
- foreach (CodeCompletionModel* sourceModel, m_completionModels) { |
57 |
-@@ -600,10 +598,7 @@ void KateCompletionModel::createGroups() |
58 |
- makeGroupItemsUnique(); |
59 |
- |
60 |
- updateBestMatches(); |
61 |
-- |
62 |
-- reset(); |
63 |
-- |
64 |
-- emit contentGeometryChanged(); |
65 |
-+ endResetModel(); |
66 |
- } |
67 |
- |
68 |
- KateCompletionModel::Group* KateCompletionModel::createItem(const HierarchicalModelHandler& handler, const QModelIndex& sourceIndex, bool notifyModel) |
69 |
-@@ -660,9 +655,7 @@ void KateCompletionModel::slotRowsInserted( const QModelIndex & parent, int star |
70 |
- affectedGroups += createItems(handler, parent.isValid() ? parent.child(i, 0) : handler.model()->index(i, 0), true); |
71 |
- |
72 |
- foreach (Group* g, affectedGroups) |
73 |
-- hideOrShowGroup(g); |
74 |
-- |
75 |
-- emit contentGeometryChanged(); |
76 |
-+ hideOrShowGroup(g, true); |
77 |
- } |
78 |
- |
79 |
- void KateCompletionModel::slotRowsRemoved( const QModelIndex & parent, int start, int end ) |
80 |
-@@ -678,9 +671,7 @@ void KateCompletionModel::slotRowsRemoved( const QModelIndex & parent, int start |
81 |
- } |
82 |
- |
83 |
- foreach (Group* g, affectedGroups) |
84 |
-- hideOrShowGroup(g); |
85 |
-- |
86 |
-- emit contentGeometryChanged(); |
87 |
-+ hideOrShowGroup(g, true); |
88 |
- } |
89 |
- |
90 |
- KateCompletionModel::Group* KateCompletionModel::fetchGroup( int attribute, const QString& scope, bool forceGrouping ) |
91 |
-@@ -938,31 +929,32 @@ void KateCompletionModel::setCurrentCompletion( KTextEditor::CodeCompletionModel |
92 |
- |
93 |
- m_currentMatch[model] = completion; |
94 |
- |
95 |
-- bool needsReset = false; |
96 |
-+ const bool resetModel = (changeType != Narrow); |
97 |
-+ if (resetModel) { |
98 |
-+ beginResetModel(); |
99 |
-+ } |
100 |
- |
101 |
- if (!hasGroups()) { |
102 |
-- needsReset |= changeCompletions(m_ungrouped, changeType); |
103 |
-+ changeCompletions(m_ungrouped, changeType, !resetModel); |
104 |
- } else { |
105 |
- foreach (Group* g, m_rowTable) { |
106 |
- if(g != m_argumentHints) |
107 |
-- needsReset |= changeCompletions(g, changeType); |
108 |
-+ changeCompletions(g, changeType, !resetModel); |
109 |
- } |
110 |
- foreach (Group* g, m_emptyGroups) { |
111 |
- if(g != m_argumentHints) |
112 |
-- needsReset |= changeCompletions(g, changeType); |
113 |
-+ changeCompletions(g, changeType, !resetModel); |
114 |
- } |
115 |
- } |
116 |
- |
117 |
- // NOTE: best matches are also updated in resort |
118 |
- resort(); |
119 |
- |
120 |
-- kDebug()<<"needsReset"<<needsReset; |
121 |
-- if(needsReset) |
122 |
-- reset(); |
123 |
-+ if (resetModel) { |
124 |
-+ endResetModel(); |
125 |
-+ } |
126 |
- |
127 |
- clearExpanding(); //We need to do this, or be aware of expanding-widgets while filtering. |
128 |
-- emit contentGeometryChanged(); |
129 |
-- kDebug(); |
130 |
- } |
131 |
- |
132 |
- QString KateCompletionModel::commonPrefixInternal(const QString &forcePrefix) const |
133 |
-@@ -1024,15 +1016,14 @@ QString KateCompletionModel::commonPrefix(QModelIndex selectedIndex) const |
134 |
- return commonPrefix; |
135 |
- } |
136 |
- |
137 |
--bool KateCompletionModel::changeCompletions( Group * g, changeTypes changeType ) |
138 |
-+void KateCompletionModel::changeCompletions( Group * g, changeTypes changeType, bool notifyModel ) |
139 |
- { |
140 |
-- bool notifyModel = true; |
141 |
- if(changeType != Narrow) { |
142 |
-- notifyModel = false; |
143 |
- g->filtered = g->prefilter; |
144 |
- //In the "Broaden" or "Change" case, just re-filter everything, |
145 |
- //and don't notify the model. The model is notified afterwards through a reset(). |
146 |
- } |
147 |
-+ |
148 |
- //This code determines what of the filtered items still fit, and computes the ranges that were removed, giving |
149 |
- //them to beginRemoveRows(..) in batches |
150 |
- |
151 |
-@@ -1054,14 +1045,13 @@ bool KateCompletionModel::changeCompletions( Group * g, changeTypes changeType ) |
152 |
- } |
153 |
- } |
154 |
- |
155 |
-- if(deleteUntil != -1) { |
156 |
-+ if(deleteUntil != -1 && notifyModel) { |
157 |
- beginRemoveRows(indexForGroup(g), 0, deleteUntil); |
158 |
- endRemoveRows(); |
159 |
- } |
160 |
- |
161 |
- g->filtered = newFiltered; |
162 |
- hideOrShowGroup(g, notifyModel); |
163 |
-- return !notifyModel; |
164 |
- } |
165 |
- |
166 |
- int KateCompletionModel::Group::orderNumber() const { |
167 |
-@@ -1193,7 +1183,9 @@ void KateCompletionModel::setSortingEnabled( bool enable ) |
168 |
- { |
169 |
- if (m_sortingEnabled != enable) { |
170 |
- m_sortingEnabled = enable; |
171 |
-+ beginResetModel(); |
172 |
- resort(); |
173 |
-+ endResetModel(); |
174 |
- } |
175 |
- } |
176 |
- |
177 |
-@@ -1256,8 +1248,9 @@ const QList< QList < int > > & KateCompletionModel::columnMerges( ) const |
178 |
- |
179 |
- void KateCompletionModel::setColumnMerges( const QList< QList < int > > & columnMerges ) |
180 |
- { |
181 |
-+ beginResetModel(); |
182 |
- m_columnMerges = columnMerges; |
183 |
-- reset(); |
184 |
-+ endResetModel(); |
185 |
- } |
186 |
- |
187 |
- int KateCompletionModel::translateColumn( int sourceColumn ) const |
188 |
-@@ -1557,7 +1550,9 @@ void KateCompletionModel::setSortingAlphabetical( bool alphabetical ) |
189 |
- { |
190 |
- if (m_sortingAlphabetical != alphabetical) { |
191 |
- m_sortingAlphabetical = alphabetical; |
192 |
-+ beginResetModel(); |
193 |
- resort(); |
194 |
-+ endResetModel(); |
195 |
- } |
196 |
- } |
197 |
- |
198 |
-@@ -1571,11 +1566,13 @@ void KateCompletionModel::setSortingCaseSensitivity( Qt::CaseSensitivity cs ) |
199 |
- { |
200 |
- if (m_sortingCaseSensitivity != cs) { |
201 |
- m_sortingCaseSensitivity = cs; |
202 |
-+ beginResetModel(); |
203 |
- resort(); |
204 |
-+ endResetModel(); |
205 |
- } |
206 |
- } |
207 |
- |
208 |
--void KateCompletionModel::resort( ) |
209 |
-+void KateCompletionModel::resort() |
210 |
- { |
211 |
- foreach (Group* g, m_rowTable) |
212 |
- g->resort(); |
213 |
-@@ -1585,7 +1582,6 @@ void KateCompletionModel::resort( ) |
214 |
- |
215 |
- // call updateBestMatches here, so they are moved to the top again. |
216 |
- updateBestMatches(); |
217 |
-- emit contentGeometryChanged(); |
218 |
- } |
219 |
- |
220 |
- bool KateCompletionModel::Item::isValid( ) const |
221 |
-@@ -1654,6 +1650,7 @@ void KateCompletionModel::setMaximumInheritanceDepth( int maxDepth ) |
222 |
- |
223 |
- void KateCompletionModel::refilter( ) |
224 |
- { |
225 |
-+ beginResetModel(); |
226 |
- m_ungrouped->refilter(); |
227 |
- |
228 |
- foreach (Group* g, m_rowTable) |
229 |
-@@ -1667,6 +1664,7 @@ void KateCompletionModel::refilter( ) |
230 |
- updateBestMatches(); |
231 |
- |
232 |
- clearExpanding(); //We need to do this, or be aware of expanding-widgets while filtering. |
233 |
-+ endResetModel(); |
234 |
- } |
235 |
- |
236 |
- void KateCompletionModel::Group::refilter( ) |
237 |
-@@ -2048,20 +2046,19 @@ void KateCompletionModel::removeCompletionModel(CodeCompletionModel * model) |
238 |
- if (!model || !m_completionModels.contains(model)) |
239 |
- return; |
240 |
- |
241 |
-+ beginResetModel(); |
242 |
- m_currentMatch.remove(model); |
243 |
- |
244 |
-- clearGroups(false); |
245 |
-+ clearGroups(); |
246 |
- |
247 |
- model->disconnect(this); |
248 |
- |
249 |
- m_completionModels.removeAll(model); |
250 |
-+ endResetModel(); |
251 |
- |
252 |
- if (!m_completionModels.isEmpty()) { |
253 |
- // This performs the reset |
254 |
- createGroups(); |
255 |
-- }else{ |
256 |
-- emit contentGeometryChanged(); |
257 |
-- reset(); |
258 |
- } |
259 |
- } |
260 |
- |
261 |
-@@ -2252,6 +2249,10 @@ void KateCompletionModel::rowSelected(const QModelIndex& row) { |
262 |
- |
263 |
- void KateCompletionModel::clearCompletionModels() |
264 |
- { |
265 |
-+ if (m_completionModels.isEmpty()) |
266 |
-+ return; |
267 |
-+ |
268 |
-+ beginResetModel(); |
269 |
- foreach (CodeCompletionModel * model, m_completionModels) |
270 |
- model->disconnect(this); |
271 |
- |
272 |
-@@ -2260,6 +2261,7 @@ void KateCompletionModel::clearCompletionModels() |
273 |
- m_currentMatch.clear(); |
274 |
- |
275 |
- clearGroups(); |
276 |
-+ endResetModel(); |
277 |
- } |
278 |
- |
279 |
- #include "katecompletionmodel.moc" |
280 |
-diff --git a/part/completion/katecompletionmodel.h b/part/completion/katecompletionmodel.h |
281 |
-index 5fedbcc..a10a533 100644 |
282 |
---- a/part/completion/katecompletionmodel.h |
283 |
-+++ b/part/completion/katecompletionmodel.h |
284 |
-@@ -183,7 +183,6 @@ class KATEPART_TESTS_EXPORT KateCompletionModel : public ExpandingWidgetModel |
285 |
- void expandIndex(const QModelIndex& index); |
286 |
- //Emitted whenever something has changed about the group of argument-hints |
287 |
- void argumentHintsChanged(); |
288 |
-- void contentGeometryChanged(); |
289 |
- |
290 |
- public Q_SLOTS: |
291 |
- void setSortingEnabled(bool enable); |
292 |
-@@ -311,6 +310,7 @@ class KATEPART_TESTS_EXPORT KateCompletionModel : public ExpandingWidgetModel |
293 |
- |
294 |
- private: |
295 |
- QString commonPrefixInternal(const QString &forcePrefix) const; |
296 |
-+ /// @note performs model reset |
297 |
- void createGroups(); |
298 |
- ///Creates all sub-items of index i, or the item corresponding to index i. Returns the affected groups. |
299 |
- ///i must be an index in the source model |
300 |
-@@ -319,8 +319,9 @@ class KATEPART_TESTS_EXPORT KateCompletionModel : public ExpandingWidgetModel |
301 |
- ///i must be an index in the source model |
302 |
- QSet<Group*> deleteItems(const QModelIndex& i); |
303 |
- Group* createItem(const HierarchicalModelHandler&, const QModelIndex& i, bool notifyModel = false); |
304 |
-- void clearGroups(bool reset = true); |
305 |
-- void hideOrShowGroup(Group* g, bool notifyModel = true); |
306 |
-+ /// @note Make sure you're in a {begin,end}ResetModel block when calling this! |
307 |
-+ void clearGroups(); |
308 |
-+ void hideOrShowGroup(Group* g, bool notifyModel = false); |
309 |
- /// When forceGrouping is enabled, all given attributes will be used for grouping, regardless of the completion settings. |
310 |
- Group* fetchGroup(int attribute, const QString& scope = QString(), bool forceGrouping = false); |
311 |
- //If this returns nonzero on an index, the index is the header of the returned group |
312 |
-@@ -336,7 +337,7 @@ class KATEPART_TESTS_EXPORT KateCompletionModel : public ExpandingWidgetModel |
313 |
- }; |
314 |
- |
315 |
- //Returns whether the model needs to be reset |
316 |
-- bool changeCompletions(Group* g, changeTypes changeType); |
317 |
-+ void changeCompletions(Group* g, changeTypes changeType, bool notifyModel); |
318 |
- |
319 |
- bool hasCompletionModel() const; |
320 |
- |
321 |
-diff --git a/part/completion/katecompletionwidget.cpp b/part/completion/katecompletionwidget.cpp |
322 |
-index 64fa4ec..6dc63a0 100644 |
323 |
---- a/part/completion/katecompletionwidget.cpp |
324 |
-+++ b/part/completion/katecompletionwidget.cpp |
325 |
-@@ -325,7 +325,8 @@ void KateCompletionWidget::startCompletion(const KTextEditor::Range& word, const |
326 |
- |
327 |
- m_lastInvocationType = invocationType; |
328 |
- |
329 |
-- disconnect(this->model(), SIGNAL(contentGeometryChanged()), this, SLOT(modelContentChanged())); |
330 |
-+ disconnect(this->model(), SIGNAL(layoutChanged()), this, SLOT(modelContentChanged())); |
331 |
-+ disconnect(this->model(), SIGNAL(modelReset()), this, SLOT(modelContentChanged())); |
332 |
- |
333 |
- m_dontShowArgumentHints = true; |
334 |
- |
335 |
-@@ -412,7 +413,8 @@ void KateCompletionWidget::startCompletion(const KTextEditor::Range& word, const |
336 |
- cursorPositionChanged(); |
337 |
- |
338 |
- if (!m_completionRanges.isEmpty()) { |
339 |
-- connect(this->model(), SIGNAL(contentGeometryChanged()), this, SLOT(modelContentChanged())); |
340 |
-+ connect(this->model(), SIGNAL(layoutChanged()), this, SLOT(modelContentChanged())); |
341 |
-+ connect(this->model(), SIGNAL(modelReset()), this, SLOT(modelContentChanged())); |
342 |
- //Now that all models have been notified, check whether the widget should be displayed instantly |
343 |
- modelContentChanged(); |
344 |
- } |
345 |
\ No newline at end of file |