1 |
commit: 040f3e11669ec6f7154588421cff00c1d6990578 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 29 02:35:38 2016 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 30 00:24:36 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=040f3e11 |
7 |
|
8 |
app-office/calligra: Fix configure, remove file collisions, crash fixes |
9 |
|
10 |
Gentoo-bug: 603584, 603772 |
11 |
|
12 |
Package-Manager: portage-2.3.0 |
13 |
|
14 |
app-office/calligra/calligra-3.0.0-r1.ebuild | 248 +++++++++++++++++++++ |
15 |
.../files/calligra-3.0.0-optionaldeps.patch | 20 ++ |
16 |
.../calligra/files/calligra-3.0.0-plan-crash.patch | 199 +++++++++++++++++ |
17 |
.../files/calligra-3.0.0-words-crash.patch | 75 +++++++ |
18 |
4 files changed, 542 insertions(+) |
19 |
|
20 |
diff --git a/app-office/calligra/calligra-3.0.0-r1.ebuild b/app-office/calligra/calligra-3.0.0-r1.ebuild |
21 |
new file mode 100644 |
22 |
index 00000000..a7247a7 |
23 |
--- /dev/null |
24 |
+++ b/app-office/calligra/calligra-3.0.0-r1.ebuild |
25 |
@@ -0,0 +1,248 @@ |
26 |
+# Copyright 1999-2016 Gentoo Foundation |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+# $Id$ |
29 |
+ |
30 |
+EAPI=6 |
31 |
+ |
32 |
+CHECKREQS_DISK_BUILD="4G" |
33 |
+KDE_HANDBOOK="forceoptional" |
34 |
+KDE_TEST="forceoptional" |
35 |
+inherit check-reqs kde5 versionator |
36 |
+ |
37 |
+DESCRIPTION="KDE Office Suite" |
38 |
+HOMEPAGE="http://www.calligra.org/" |
39 |
+ |
40 |
+case ${PV} in |
41 |
+ 3.[0123456789].[789]?) |
42 |
+ # beta or rc releases |
43 |
+ SRC_URI="mirror://kde/unstable/${P}/${P}.tar.gz" ;; |
44 |
+ 3.[0123456789].?) |
45 |
+ # stable releases |
46 |
+ SRC_URI="mirror://kde/stable/${P}/${P}.tar.gz" |
47 |
+esac |
48 |
+ |
49 |
+LICENSE="GPL-2" |
50 |
+ |
51 |
+[[ ${KDE_BUILD_TYPE} == release ]] && \ |
52 |
+KEYWORDS="~amd64 ~x86" |
53 |
+ |
54 |
+CAL_FTS=( karbon plan sheets words ) |
55 |
+CAL_EXP_FTS=( braindump stage ) |
56 |
+ |
57 |
+IUSE="activities +crypt +eigen +fontconfig gsl import-filter +lcms pim marble okular |
58 |
+ openexr +pdf spacenav +truetype vc +xml X $(printf 'calligra_features_%s ' ${CAL_FTS[@]}) |
59 |
+ $(printf 'calligra_experimental_features_%s ' ${CAL_EXP_FTS[@]})" |
60 |
+ |
61 |
+REQUIRED_USE="calligra_features_sheets? ( eigen )" |
62 |
+ |
63 |
+# TODO: Not packaged: Cauchy (https://bitbucket.org/cyrille/cauchy) |
64 |
+# Required for the matlab/octave formula tool |
65 |
+# drop qtcore subslot operator when QT_MINIMAL >= 5.7.0 |
66 |
+COMMON_DEPEND=" |
67 |
+ $(add_frameworks_dep karchive) |
68 |
+ $(add_frameworks_dep kcmutils) |
69 |
+ $(add_frameworks_dep kcodecs) |
70 |
+ $(add_frameworks_dep kcompletion) |
71 |
+ $(add_frameworks_dep kconfig) |
72 |
+ $(add_frameworks_dep kconfigwidgets) |
73 |
+ $(add_frameworks_dep kcoreaddons) |
74 |
+ $(add_frameworks_dep kdelibs4support) |
75 |
+ $(add_frameworks_dep kemoticons) |
76 |
+ $(add_frameworks_dep kglobalaccel) |
77 |
+ $(add_frameworks_dep kguiaddons) |
78 |
+ $(add_frameworks_dep ki18n) |
79 |
+ $(add_frameworks_dep kiconthemes) |
80 |
+ $(add_frameworks_dep kio) |
81 |
+ $(add_frameworks_dep kitemmodels) |
82 |
+ $(add_frameworks_dep kitemviews) |
83 |
+ $(add_frameworks_dep knotifications) |
84 |
+ $(add_frameworks_dep knotifyconfig) |
85 |
+ $(add_frameworks_dep kparts) |
86 |
+ $(add_frameworks_dep kross) |
87 |
+ $(add_frameworks_dep ktexteditor) |
88 |
+ $(add_frameworks_dep ktextwidgets) |
89 |
+ $(add_frameworks_dep kwallet) |
90 |
+ $(add_frameworks_dep kwidgetsaddons) |
91 |
+ $(add_frameworks_dep kwindowsystem) |
92 |
+ $(add_frameworks_dep kxmlgui) |
93 |
+ $(add_frameworks_dep sonnet) |
94 |
+ $(add_frameworks_dep threadweaver) |
95 |
+ $(add_qt_dep designer) |
96 |
+ $(add_qt_dep qtconcurrent) |
97 |
+ $(add_qt_dep qtdbus) |
98 |
+ $(add_qt_dep qtdeclarative) |
99 |
+ $(add_qt_dep qtgui) |
100 |
+ $(add_qt_dep qtnetwork) |
101 |
+ $(add_qt_dep qtprintsupport) |
102 |
+ $(add_qt_dep qtscript) |
103 |
+ $(add_qt_dep qtsvg) |
104 |
+ $(add_qt_dep qtwidgets) |
105 |
+ $(add_qt_dep qtxml) |
106 |
+ dev-lang/perl |
107 |
+ dev-libs/boost |
108 |
+ media-libs/libpng:0 |
109 |
+ sys-libs/zlib |
110 |
+ virtual/libiconv |
111 |
+ activities? ( $(add_frameworks_dep kactivities) ) |
112 |
+ crypt? ( app-crypt/qca:2[qt5] ) |
113 |
+ eigen? ( dev-cpp/eigen:3 ) |
114 |
+ fontconfig? ( media-libs/fontconfig ) |
115 |
+ gsl? ( sci-libs/gsl ) |
116 |
+ import-filter? ( |
117 |
+ $(add_frameworks_dep khtml) |
118 |
+ app-text/libetonyek |
119 |
+ app-text/libodfgen |
120 |
+ app-text/libwpd:* |
121 |
+ app-text/libwpg:* |
122 |
+ >=app-text/libwps-0.4 |
123 |
+ dev-libs/librevenge |
124 |
+ media-libs/libvisio |
125 |
+ ) |
126 |
+ lcms? ( media-libs/lcms:2 ) |
127 |
+ marble? ( $(add_kdeapps_dep marble) ) |
128 |
+ openexr? ( media-libs/openexr ) |
129 |
+ pdf? ( app-text/poppler:=[qt5] ) |
130 |
+ spacenav? ( dev-libs/libspnav ) |
131 |
+ truetype? ( media-libs/freetype:2 ) |
132 |
+ X? ( |
133 |
+ $(add_qt_dep qtx11extras) |
134 |
+ x11-libs/libX11 |
135 |
+ ) |
136 |
+ calligra_experimental_features_braindump? ( $(add_qt_dep qtwebkit) ) |
137 |
+ calligra_experimental_features_stage? ( |
138 |
+ $(add_qt_dep qtwebkit) |
139 |
+ okular? ( $(add_kdeapps_dep okular) ) |
140 |
+ ) |
141 |
+ calligra_features_plan? ( |
142 |
+ $(add_frameworks_dep khtml) |
143 |
+ $(add_qt_dep qtcore '' '' '5=') |
144 |
+ dev-libs/kdiagram:5 |
145 |
+ dev-libs/kproperty:5 |
146 |
+ dev-libs/kreport:5 |
147 |
+ pim? ( |
148 |
+ $(add_kdeapps_dep akonadi) |
149 |
+ $(add_kdeapps_dep akonadi-contacts) |
150 |
+ $(add_kdeapps_dep kcalcore) |
151 |
+ $(add_kdeapps_dep kcontacts) |
152 |
+ ) |
153 |
+ ) |
154 |
+ calligra_features_words? ( |
155 |
+ dev-libs/libxslt |
156 |
+ okular? ( $(add_kdeapps_dep okular) ) |
157 |
+ ) |
158 |
+" |
159 |
+DEPEND="${COMMON_DEPEND} |
160 |
+ sys-devel/gettext |
161 |
+ x11-misc/shared-mime-info |
162 |
+ vc? ( >=dev-libs/vc-1.1.0 ) |
163 |
+" |
164 |
+RDEPEND="${COMMON_DEPEND} |
165 |
+ calligra_features_karbon? ( media-gfx/pstoedit[plotutils] ) |
166 |
+ !app-office/calligra:4 |
167 |
+" |
168 |
+RESTRICT+=" test" |
169 |
+ |
170 |
+PATCHES=( |
171 |
+ "${FILESDIR}/${P}-no-arch-detection.patch" |
172 |
+ "${FILESDIR}/${P}-optionaldeps.patch" |
173 |
+ "${FILESDIR}/${P}-words-crash.patch" |
174 |
+ "${FILESDIR}/${P}-plan-crash.patch" |
175 |
+) |
176 |
+ |
177 |
+pkg_pretend() { |
178 |
+ check-reqs_pkg_pretend |
179 |
+} |
180 |
+ |
181 |
+pkg_setup() { |
182 |
+ kde5_pkg_setup |
183 |
+ check-reqs_pkg_setup |
184 |
+} |
185 |
+ |
186 |
+src_prepare() { |
187 |
+ kde5_src_prepare |
188 |
+ |
189 |
+ # Unconditionally disable deprecated deps (required by QtQuick1) |
190 |
+ punt_bogus_dep Qt5 Declarative |
191 |
+ punt_bogus_dep Qt5 OpenGL |
192 |
+ |
193 |
+ if ! use calligra_experimental_features_stage && \ |
194 |
+ ! use calligra_experimental_features_braindump; then |
195 |
+ punt_bogus_dep Qt5 WebKitWidgets |
196 |
+ punt_bogus_dep Qt5 WebKit |
197 |
+ fi |
198 |
+ |
199 |
+ # Hack around the excessive use of CMake macros |
200 |
+ if use okular && ! use calligra_features_words; then |
201 |
+ sed -i -e "/add_subdirectory( *okularodtgenerator *)/ s/^/#DONT/" \ |
202 |
+ extras/CMakeLists.txt || die "Failed to disable OKULAR_GENERATOR_ODT" |
203 |
+ fi |
204 |
+ |
205 |
+ if use okular && ! use calligra_experimental_features_stage; then |
206 |
+ sed -i -e "/add_subdirectory( *okularodpgenerator *)/ s/^/#DONT/" \ |
207 |
+ extras/CMakeLists.txt || die "Failed to disable OKULAR_GENERATOR_ODP" |
208 |
+ fi |
209 |
+ |
210 |
+ rm -f po/*/*kexi*po || die |
211 |
+ rm -f po/*/*krita*po || die |
212 |
+} |
213 |
+ |
214 |
+src_configure() { |
215 |
+ local cal_ft myproducts experimental=OFF |
216 |
+ |
217 |
+ # applications |
218 |
+ for cal_ft in ${CAL_FTS[@]}; do |
219 |
+ if use calligra_features_${cal_ft} ; then |
220 |
+ myproducts+=( "${cal_ft^^}" ) |
221 |
+ fi |
222 |
+ done |
223 |
+ # experimental/unmaintained applications |
224 |
+ for cal_ft in ${CAL_EXP_FTS[@]}; do |
225 |
+ if use calligra_experimental_features_${cal_ft} ; then |
226 |
+ experimental=ON |
227 |
+ myproducts+=( "${cal_ft^^}" ) |
228 |
+ fi |
229 |
+ done |
230 |
+ |
231 |
+ local mycmakeargs=( -DPRODUCTSET="${myproducts[*]}" ) |
232 |
+ |
233 |
+ if [[ ${KDE_BUILD_TYPE} == release ]] ; then |
234 |
+ mycmakeargs+=( |
235 |
+ -DRELEASE_BUILD=ON |
236 |
+ -DBUILD_UNMAINTAINED=${experimental} |
237 |
+ ) |
238 |
+ fi |
239 |
+ |
240 |
+ mycmakeargs+=( |
241 |
+ -DPACKAGERS_BUILD=OFF |
242 |
+ -DWITH_Iconv=ON |
243 |
+ $(cmake-utils_use_find_package activities KF5Activities) |
244 |
+ -DWITH_Qca-qt5=$(usex crypt) |
245 |
+ -DWITH_Eigen3=$(usex eigen) |
246 |
+ -DWITH_Fontconfig=$(usex fontconfig) |
247 |
+ -DWITH_GSL=$(usex gsl) |
248 |
+ -DWITH_LibEtonyek=$(usex import-filter) |
249 |
+ -DWITH_LibOdfGen=$(usex import-filter) |
250 |
+ -DWITH_LibRevenge=$(usex import-filter) |
251 |
+ -DWITH_LibVisio=$(usex import-filter) |
252 |
+ -DWITH_LibWpd=$(usex import-filter) |
253 |
+ -DWITH_LibWpg=$(usex import-filter) |
254 |
+ -DWITH_LibWps=$(usex import-filter) |
255 |
+ $(cmake-utils_use_find_package pim KF5Akonadi) |
256 |
+ $(cmake-utils_use_find_package pim KF5AkonadiContact) |
257 |
+ $(cmake-utils_use_find_package pim KF5CalendarCore) |
258 |
+ $(cmake-utils_use_find_package pim KF5Contacts) |
259 |
+ -DWITH_LCMS2=$(usex lcms) |
260 |
+ $(cmake-utils_use_find_package marble Marble) |
261 |
+ -DWITH_Okular5=$(usex okular) |
262 |
+ -DWITH_OpenEXR=$(usex openexr) |
263 |
+ -DWITH_Poppler=$(usex pdf) |
264 |
+ $(cmake-utils_use_find_package spacenav Spnav) |
265 |
+ -ENABLE_CSTESTER_TESTING=$(usex test) |
266 |
+ -DWITH_Freetype=$(usex truetype) |
267 |
+ -DWITH_Vc=$(usex vc) |
268 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Libgit2=ON |
269 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Libqgit2=ON |
270 |
+ ) |
271 |
+ |
272 |
+ kde5_src_configure |
273 |
+} |
274 |
|
275 |
diff --git a/app-office/calligra/files/calligra-3.0.0-optionaldeps.patch b/app-office/calligra/files/calligra-3.0.0-optionaldeps.patch |
276 |
new file mode 100644 |
277 |
index 00000000..a36edee |
278 |
--- /dev/null |
279 |
+++ b/app-office/calligra/files/calligra-3.0.0-optionaldeps.patch |
280 |
@@ -0,0 +1,20 @@ |
281 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
282 |
+index 0394af4..e11d998 100644 |
283 |
+--- a/CMakeLists.txt |
284 |
++++ b/CMakeLists.txt |
285 |
+@@ -223,11 +223,10 @@ find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED |
286 |
+ Notifications |
287 |
+ KCMUtils |
288 |
+ ) |
289 |
+-find_package(KF5 ${REQUIRED_KF5_VERSION} QUIET |
290 |
+- OPTIONAL_COMPONENTS |
291 |
+- Activities |
292 |
+- KHtml |
293 |
+-) |
294 |
++ |
295 |
++find_package(KF5Activities) |
296 |
++find_package(KF5KHtml) |
297 |
++ |
298 |
+ set_package_properties(KF5Activities PROPERTIES |
299 |
+ TYPE OPTIONAL |
300 |
+ ) |
301 |
|
302 |
diff --git a/app-office/calligra/files/calligra-3.0.0-plan-crash.patch b/app-office/calligra/files/calligra-3.0.0-plan-crash.patch |
303 |
new file mode 100644 |
304 |
index 00000000..3e1073f |
305 |
--- /dev/null |
306 |
+++ b/app-office/calligra/files/calligra-3.0.0-plan-crash.patch |
307 |
@@ -0,0 +1,199 @@ |
308 |
+From dd2cb16ab43d21ee25ba6ebfb36cd68ec9879c4f Mon Sep 17 00:00:00 2001 |
309 |
+From: Dag Andersen <danders@×××××××.dk> |
310 |
+Date: Mon, 12 Dec 2016 10:07:38 +0100 |
311 |
+Subject: Plan: Fix crash on close |
312 |
+ |
313 |
+Due to accessing project node during delete |
314 |
+ |
315 |
+BUG: 373527 |
316 |
+FIXED-IN: 3.0.0 |
317 |
+--- |
318 |
+ plan/libs/kernel/kptnode.cpp | 14 ++++++++++++-- |
319 |
+ plan/libs/kernel/kptnode.h | 5 ++++- |
320 |
+ plan/libs/kernel/kptproject.cpp | 11 ++++++++++- |
321 |
+ plan/libs/kernel/kptresource.cpp | 20 ++++++++++++++++---- |
322 |
+ plan/libs/kernel/kptresource.h | 7 ++++++- |
323 |
+ 5 files changed, 48 insertions(+), 9 deletions(-) |
324 |
+ |
325 |
+diff --git a/plan/libs/kernel/kptnode.cpp b/plan/libs/kernel/kptnode.cpp |
326 |
+index d8b0e6b..e55f9ca 100644 |
327 |
+--- a/plan/libs/kernel/kptnode.cpp |
328 |
++++ b/plan/libs/kernel/kptnode.cpp |
329 |
+@@ -40,7 +40,8 @@ namespace KPlato |
330 |
+ Node::Node(Node *parent) |
331 |
+ : QObject( 0 ), // We don't use qobjects parent |
332 |
+ m_nodes(), m_dependChildNodes(), m_dependParentNodes(), |
333 |
+- m_estimate( 0 ) |
334 |
++ m_estimate( 0 ), |
335 |
++ m_blockChanged(false) |
336 |
+ { |
337 |
+ //debugPlan<<"("<<this<<")"; |
338 |
+ m_parent = parent; |
339 |
+@@ -53,7 +54,8 @@ Node::Node(const Node &node, Node *parent) |
340 |
+ m_nodes(), |
341 |
+ m_dependChildNodes(), |
342 |
+ m_dependParentNodes(), |
343 |
+- m_estimate( 0 ) |
344 |
++ m_estimate( 0 ), |
345 |
++ m_blockChanged(false) |
346 |
+ { |
347 |
+ //debugPlan<<"("<<this<<")"; |
348 |
+ m_parent = parent; |
349 |
+@@ -1225,7 +1227,15 @@ void Node::setRunningAccount(Account *acc) |
350 |
+ changed(); |
351 |
+ } |
352 |
+ |
353 |
++void Node::blockChanged(bool on) |
354 |
++{ |
355 |
++ m_blockChanged = on; |
356 |
++} |
357 |
++ |
358 |
+ void Node::changed(Node *node, int property) { |
359 |
++ if (m_blockChanged) { |
360 |
++ return; |
361 |
++ } |
362 |
+ switch ( property) { |
363 |
+ case Type: |
364 |
+ case StartupCost: |
365 |
+diff --git a/plan/libs/kernel/kptnode.h b/plan/libs/kernel/kptnode.h |
366 |
+index cfcbd3e..4c98acc 100644 |
367 |
+--- a/plan/libs/kernel/kptnode.h |
368 |
++++ b/plan/libs/kernel/kptnode.h |
369 |
+@@ -528,6 +528,8 @@ public: |
370 |
+ virtual void emitDocumentRemoved( Node *node, Document *doc, int idx ); |
371 |
+ virtual void emitDocumentChanged( Node *node, Document *doc, int idx ); |
372 |
+ |
373 |
++ void blockChanged(bool on = true); |
374 |
++ |
375 |
+ public: |
376 |
+ // These shouldn't be available to other than those who inherits |
377 |
+ /// Calculate the critical path |
378 |
+@@ -673,7 +675,8 @@ protected: |
379 |
+ ResourceRequestCollection m_requests; |
380 |
+ |
381 |
+ private: |
382 |
+- void init(); |
383 |
++ void init(); |
384 |
++ bool m_blockChanged; |
385 |
+ }; |
386 |
+ |
387 |
+ //////////////////////////////// Estimate //////////////////////////////// |
388 |
+diff --git a/plan/libs/kernel/kptproject.cpp b/plan/libs/kernel/kptproject.cpp |
389 |
+index 30cd450..d2fafb5 100644 |
390 |
+--- a/plan/libs/kernel/kptproject.cpp |
391 |
++++ b/plan/libs/kernel/kptproject.cpp |
392 |
+@@ -94,7 +94,16 @@ void Project::deref() |
393 |
+ Project::~Project() |
394 |
+ { |
395 |
+ debugPlan; |
396 |
+- disconnect(); // NOTE: may be a problem if somebody uses the destroyd() signal |
397 |
++ disconnect(); |
398 |
++ for(Node *n : nodeIdDict) { |
399 |
++ n->blockChanged(); |
400 |
++ } |
401 |
++ for (Resource *r : resourceIdDict) { |
402 |
++ r->blockChanged(); |
403 |
++ } |
404 |
++ for (ResourceGroup *g : resourceGroupIdDict) { |
405 |
++ g->blockChanged(); |
406 |
++ } |
407 |
+ delete m_standardWorktime; |
408 |
+ while ( !m_resourceGroups.isEmpty() ) |
409 |
+ delete m_resourceGroups.takeFirst(); |
410 |
+diff --git a/plan/libs/kernel/kptresource.cpp b/plan/libs/kernel/kptresource.cpp |
411 |
+index 8a3d55e..b32d4e7 100644 |
412 |
+--- a/plan/libs/kernel/kptresource.cpp |
413 |
++++ b/plan/libs/kernel/kptresource.cpp |
414 |
+@@ -44,7 +44,8 @@ namespace KPlato |
415 |
+ { |
416 |
+ |
417 |
+ ResourceGroup::ResourceGroup() |
418 |
+- : QObject( 0 ) |
419 |
++ : QObject( 0 ), |
420 |
++ m_blockChanged(false) |
421 |
+ { |
422 |
+ m_project = 0; |
423 |
+ m_type = Type_Work; |
424 |
+@@ -80,8 +81,13 @@ void ResourceGroup::copy( const ResourceGroup *group ) |
425 |
+ m_name = group->m_name; |
426 |
+ } |
427 |
+ |
428 |
++void ResourceGroup::blockChanged(bool on) |
429 |
++{ |
430 |
++ m_blockChanged = on; |
431 |
++} |
432 |
++ |
433 |
+ void ResourceGroup::changed() { |
434 |
+- if ( m_project ) { |
435 |
++ if (m_project && !m_blockChanged) { |
436 |
+ m_project->changed( this ); |
437 |
+ } |
438 |
+ } |
439 |
+@@ -319,7 +325,8 @@ Resource::Resource() |
440 |
+ m_project(0), |
441 |
+ m_parent( 0 ), |
442 |
+ m_autoAllocate( false ), |
443 |
+- m_currentSchedule( 0 ) |
444 |
++ m_currentSchedule( 0 ), |
445 |
++ m_blockChanged(false) |
446 |
+ { |
447 |
+ m_type = Type_Work; |
448 |
+ m_units = 100; // % |
449 |
+@@ -409,9 +416,14 @@ void Resource::copy(Resource *resource) { |
450 |
+ //m_externalNames = resource->m_externalNames; |
451 |
+ } |
452 |
+ |
453 |
++void Resource::blockChanged(bool on) |
454 |
++{ |
455 |
++ m_blockChanged = on; |
456 |
++} |
457 |
++ |
458 |
+ void Resource::changed() |
459 |
+ { |
460 |
+- if ( m_project ) { |
461 |
++ if (m_project && !m_blockChanged) { |
462 |
+ m_project->changed( this ); |
463 |
+ } |
464 |
+ } |
465 |
+diff --git a/plan/libs/kernel/kptresource.h b/plan/libs/kernel/kptresource.h |
466 |
+index 10f6b92..fba020a 100644 |
467 |
+--- a/plan/libs/kernel/kptresource.h |
468 |
++++ b/plan/libs/kernel/kptresource.h |
469 |
+@@ -177,6 +177,8 @@ public: |
470 |
+ DateTime startTime( long id ) const; |
471 |
+ DateTime endTime( long id ) const; |
472 |
+ |
473 |
++ void blockChanged(bool on = true); |
474 |
++ |
475 |
+ #ifndef NDEBUG |
476 |
+ |
477 |
+ void printDebug( const QString& ident ); |
478 |
+@@ -199,7 +201,7 @@ private: |
479 |
+ Type m_type; |
480 |
+ |
481 |
+ QList<ResourceGroupRequest*> m_requests; |
482 |
+- |
483 |
++ bool m_blockChanged; |
484 |
+ }; |
485 |
+ |
486 |
+ /** |
487 |
+@@ -492,6 +494,8 @@ public: |
488 |
+ /// Set the @p account |
489 |
+ void setAccount( Account *account ); |
490 |
+ |
491 |
++ void blockChanged(bool on = true); |
492 |
++ |
493 |
+ // for xml loading code |
494 |
+ |
495 |
+ class WorkInfoCache |
496 |
+@@ -564,6 +568,7 @@ private: |
497 |
+ |
498 |
+ // return this if resource has no calendar and is a material resource |
499 |
+ Calendar m_materialCalendar; |
500 |
++ bool m_blockChanged; |
501 |
+ |
502 |
+ #ifndef NDEBUG |
503 |
+ public: |
504 |
+-- |
505 |
+cgit v0.11.2 |
506 |
+ |
507 |
|
508 |
diff --git a/app-office/calligra/files/calligra-3.0.0-words-crash.patch b/app-office/calligra/files/calligra-3.0.0-words-crash.patch |
509 |
new file mode 100644 |
510 |
index 00000000..4fe9283 |
511 |
--- /dev/null |
512 |
+++ b/app-office/calligra/files/calligra-3.0.0-words-crash.patch |
513 |
@@ -0,0 +1,75 @@ |
514 |
+From 2d86293939bafd80bc320849ffcc7544350fc2bf Mon Sep 17 00:00:00 2001 |
515 |
+From: Dag Andersen <danders@×××××××.dk> |
516 |
+Date: Fri, 9 Dec 2016 11:19:36 +0100 |
517 |
+Subject: Words: Fix crash when adding connected text frame |
518 |
+ |
519 |
+Summary: |
520 |
+KWFrameConnectSelector crashes you activate existsingRadio button but do not select a frameset. |
521 |
+This patch selects a frameset if none is selected. |
522 |
+ |
523 |
+Reviewers: boemann |
524 |
+ |
525 |
+Reviewed By: boemann |
526 |
+ |
527 |
+Tags: #kexi, #calligra:_3.0 |
528 |
+ |
529 |
+Differential Revision: https://phabricator.kde.org/D3632 |
530 |
+--- |
531 |
+ words/part/dialogs/KWFrameConnectSelector.cpp | 14 ++++++++++++++ |
532 |
+ words/part/dialogs/KWFrameConnectSelector.h | 1 + |
533 |
+ 2 files changed, 15 insertions(+) |
534 |
+ |
535 |
+diff --git a/words/part/dialogs/KWFrameConnectSelector.cpp b/words/part/dialogs/KWFrameConnectSelector.cpp |
536 |
+index 566dfe2..590d3b7 100644 |
537 |
+--- a/words/part/dialogs/KWFrameConnectSelector.cpp |
538 |
++++ b/words/part/dialogs/KWFrameConnectSelector.cpp |
539 |
+@@ -21,6 +21,7 @@ |
540 |
+ #include "KWDocument.h" |
541 |
+ #include "frames/KWTextFrameSet.h" |
542 |
+ #include "Words.h" |
543 |
++#include "WordsDebug.h" |
544 |
+ |
545 |
+ KWFrameConnectSelector::KWFrameConnectSelector(FrameConfigSharedState *state) |
546 |
+ : m_state(state), |
547 |
+@@ -30,6 +31,8 @@ KWFrameConnectSelector::KWFrameConnectSelector(FrameConfigSharedState *state) |
548 |
+ |
549 |
+ connect(widget.framesList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), |
550 |
+ this, SLOT(frameSetSelected())); |
551 |
++ connect(widget.existingRadio, SIGNAL(clicked(bool)), |
552 |
++ this, SLOT(existingRadioClicked(bool))); |
553 |
+ connect(widget.frameSetName, SIGNAL(textChanged(QString)), |
554 |
+ this, SLOT(nameChanged(QString))); |
555 |
+ } |
556 |
+@@ -50,6 +53,17 @@ bool KWFrameConnectSelector::canOpen(KoShape *shape) |
557 |
+ return true; |
558 |
+ } |
559 |
+ |
560 |
++void KWFrameConnectSelector::existingRadioClicked(bool on) |
561 |
++{ |
562 |
++ // make sure there is a selcted frameset |
563 |
++ if (on && !widget.framesList->currentItem() && widget.framesList->model()->rowCount() > 0) { |
564 |
++ QModelIndex curr = widget.framesList->model()->index(0, 0); |
565 |
++ widget.framesList->setCurrentIndex(curr); |
566 |
++ widget.framesList->selectionModel()->select(curr, QItemSelectionModel::Select); |
567 |
++ } |
568 |
++ debugWords<<Q_FUNC_INFO<<on<<widget.framesList->currentItem(); |
569 |
++} |
570 |
++ |
571 |
+ void KWFrameConnectSelector::frameSetSelected() |
572 |
+ { |
573 |
+ widget.existingRadio->setChecked(true); |
574 |
+diff --git a/words/part/dialogs/KWFrameConnectSelector.h b/words/part/dialogs/KWFrameConnectSelector.h |
575 |
+index 74d3f0d..75ec1613 100644 |
576 |
+--- a/words/part/dialogs/KWFrameConnectSelector.h |
577 |
++++ b/words/part/dialogs/KWFrameConnectSelector.h |
578 |
+@@ -50,6 +50,7 @@ public: |
579 |
+ } |
580 |
+ |
581 |
+ private Q_SLOTS: |
582 |
++ void existingRadioClicked(bool on); |
583 |
+ void frameSetSelected(); |
584 |
+ void nameChanged(const QString &text); |
585 |
+ |
586 |
+-- |
587 |
+cgit v0.11.2 |
588 |
+ |