summaryrefslogtreecommitdiff
path: root/sci-electronics/ktechlab
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /sci-electronics/ktechlab
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'sci-electronics/ktechlab')
-rw-r--r--sci-electronics/ktechlab/Manifest5
-rw-r--r--sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix-connectors-diverging.patch38
-rw-r--r--sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix-propertyeditor.patch52
-rw-r--r--sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix.patch26
-rw-r--r--sci-electronics/ktechlab/ktechlab-0.50.0-r2.ebuild (renamed from sci-electronics/ktechlab/ktechlab-0.50.0-r1.ebuild)9
5 files changed, 126 insertions, 4 deletions
diff --git a/sci-electronics/ktechlab/Manifest b/sci-electronics/ktechlab/Manifest
index 3df0be254b59..f84642e3ec6c 100644
--- a/sci-electronics/ktechlab/Manifest
+++ b/sci-electronics/ktechlab/Manifest
@@ -1,4 +1,7 @@
+AUX ktechlab-0.50.0-crashfix-connectors-diverging.patch 1191 BLAKE2B fa0eb5fc82d9f8f9c88f87f413b08969a4b2d681296bec8b40dbd1e4ca10ffe626b0b0e6adfc86bbdafba020a7e837a45c56d18b687f2c9dad0733e8a3f91f1d SHA512 2faa14aa0efb036b9001c187d47b18cfb866ae785c874619c16b95c9bb029165f72162a242721eeb56d50f7b4957a6fcc6a458140a1bb6518ce09aa04aacbc16
+AUX ktechlab-0.50.0-crashfix-propertyeditor.patch 1783 BLAKE2B 217a2255f46630802f3821f4a974a99b0690f9c473ef6f94b2baf1fd6dd4563ae142072e210cdaeec993d40d9fa1a8030e5074e02e6fdd89ed5f874ee15bcc0a SHA512 c9a2a68634ed04f2fdbeaab550dac0d7b276f8e0b5fea766e2d0aa0aad84b6f499058e48dd23266a3595ba5f87aa91bf7a42901b5f5c6fb14a64763b60c775e4
+AUX ktechlab-0.50.0-crashfix.patch 815 BLAKE2B 2e1ea6d6909d077c9891911ee8ccc35f1543b1e3c7409433b3585d22a489ecf2af79300fe9af605ca8b01ba6daf41d2c196fd4afd21d36c0b9c3cdc4f7a4f48f SHA512 a486c365c459c111f658c821efcf5fd06f595f325c6bfbc5d261ae1a0cf85be3e517dd3a5884d8fd242f2cde5a9802739f4ad69d8237f1143b9bfd57f15b26ef
AUX ktechlab-0.50.0-deps.patch 9144 BLAKE2B 1b93b6977fdc9b1d648f276d18dcde6fb302de36d6873db561577e630d54cc81d2628fdec9cd410068e8c9b61c7ad11bbf121a6574c8463fee62b9b765e7ced4 SHA512 7ef87942c27829a40bb8a1b7b15a0e67c691b15ffffd160d05b4b6c3b812a1fc736ba78b64ac9db3f5cb8c4ca6ac1edb243decc4703e8f489a52257d322d71e1
DIST ktechlab-0.50.0.tar.xz 2195752 BLAKE2B 213bee84364f8fc99ee6991ca465ce126f7fd16932a9e399947428955156500ce57e2c93170e16698b3d5e64f294ea208bff388c0d8e2ee6551bbe97e785233e SHA512 236be69f18ae21f1dffe1ae3d9e55665b6bdfd443bf6b3ae39c2e370923bae679fe8b1b09dac3d354a61278ca9f85113804a47a95a7f1de996b330f5a4b13a42
-EBUILD ktechlab-0.50.0-r1.ebuild 1267 BLAKE2B 827cc18442b5933e52acb165b9864c8d653d236d8c9a4274237382db4ab175e2f63009ff615d2ce83de68ffbaffaafac9e316afb984f0ce05b73caff8a7d26f5 SHA512 a157a0d1eafb23950dd400f5878c743598afbdc9b5172efa5e360b5d9df0dddcb01d6ec19ae1a6af682c375dd41d57b5605337194f323b8dea77543f65b55db7
+EBUILD ktechlab-0.50.0-r2.ebuild 1343 BLAKE2B 034440493d9ecd58db5b36d278f8121d50f46069632d1d01abb29457cd1e4ea931b13f03b995c3b6785532296b7e5f877bf1538d7c87c1ba9298d1e933791a6b SHA512 6fafceb0b349a7a4489d3dc8f87331478ca246b9f77b21579af3adc5ffe3806f3e5411419abaccd8308ece21c90b27c3a508abe4795aba8d0a8321f6cf2916a1
MISC metadata.xml 458 BLAKE2B c7bcf8be3d2a3cb94a6d31a2ab64e89dc7d8b5ca3acde1a61f4f3724a331b899f156d40b02f64a1d26f008b92452e997e7ea5004eef50b9d13a02edbb9e396db SHA512 506f455f24d17973637f12558a0cee063882fb40efd44df4e78a0e2d543d204c1ff170a9722f16933f2fd65b28283450c5f06ec61dbb49b08b2d38e6cd744a9e
diff --git a/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix-connectors-diverging.patch b/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix-connectors-diverging.patch
new file mode 100644
index 000000000000..20222c89daab
--- /dev/null
+++ b/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix-connectors-diverging.patch
@@ -0,0 +1,38 @@
+From 1b814b266f1bd25d92b701e071473f2267330933 Mon Sep 17 00:00:00 2001
+From: "Martin T. H. Sandsmark" <martin.sandsmark@kde.org>
+Date: Mon, 22 Mar 2021 12:49:26 +0100
+Subject: [PATCH] fix crash when looking for where connectors diverge
+
+---
+ src/electronics/ecnode.cpp | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/src/electronics/ecnode.cpp b/src/electronics/ecnode.cpp
+index 385844c1..28f2a556 100644
+--- a/src/electronics/ecnode.cpp
++++ b/src/electronics/ecnode.cpp
+@@ -225,10 +225,18 @@ QPoint ECNode::findConnectorDivergePoint(bool *found)
+ if (!gotP1 || !gotP2 )
+ return QPoint(0,0);
+
+- unsigned maxLength = p1.size() > p2.size() ? p1.size() : p2.size();
++ // If they are differing lengths, return the end of the shortest
++ if (p1.size() < p2.size()) {
++ *found = true;
++ return p1.last();
++ } else if (p2.size() < p1.size()) {
++ *found = true;
++ return p2.last();
++ }
++
++ Q_ASSERT(p1.size() == p2.size());
+
+- for ( unsigned i = 1; i < maxLength; ++i )
+- {
++ for (unsigned i = 1; i < qMin(p1.size(), p2.size()); ++i) {
+ if ( p1[i] != p2[i] ) {
+ *found = true;
+ return p1[i-1];
+--
+GitLab
+
diff --git a/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix-propertyeditor.patch b/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix-propertyeditor.patch
new file mode 100644
index 000000000000..ec970b64ad81
--- /dev/null
+++ b/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix-propertyeditor.patch
@@ -0,0 +1,52 @@
+From 730a5492e4780504a80db1a27dc307d8f61b4696 Mon Sep 17 00:00:00 2001
+From: Zoltan Padrah <zoltan_padrah@users.sf.net>
+Date: Fri, 18 Dec 2020 20:47:55 +0200
+Subject: [PATCH] property editor: fix crash when changing a property and
+ clicking circuit
+
+apparently Ubuntu 18.04 is affected (Qt 5.9.5)
+and Ubuntu 20.04 is not (Qt 5.12.8).
+
+to reproduce:
+
+1. place and select a resistor
+2. in the property editor click on any of its properties,
+ in order to start editing it
+3. click on the circuit, to stop editing of the properties
+3.1. Expected: property value is kept, program continues
+3.2. Actually: crash with the same stack trace from above
+
+Should fix issue on GitHub:
+https://github.com/ktechlab/ktechlab/issues/60
+---
+ src/gui/itemeditor/propertyeditor.cpp | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/src/gui/itemeditor/propertyeditor.cpp b/src/gui/itemeditor/propertyeditor.cpp
+index 88b86842..60821177 100644
+--- a/src/gui/itemeditor/propertyeditor.cpp
++++ b/src/gui/itemeditor/propertyeditor.cpp
+@@ -476,8 +476,19 @@ void PropertyEditor::showDefaultsButton(bool show)
+
+ void PropertyEditor::updateDefaultsButton()
+ {
+- if (!m_editItem)
++ QTableWidgetItem *currItem = currentItem();
++ if (!currItem) {
++ m_editItem = nullptr;
+ return;
++ }
++ m_editItem = dynamic_cast<PropertyEditorItem*>(currItem);
++ if (!m_editItem) {
++ qWarning() << "failed to cast current item to PropertyEditorItem, " << currItem;
++ return;
++ }
++ qDebug() << "currentItem=" << currentItem();
++ qDebug() << "m_editItem=" << m_editItem;
++ qDebug() << "m_editItem->property=" << m_editItem->property();
+ showDefaultsButton( m_editItem->property()->changed() );
+ repaint(); // m_editItem->repaint();
+ }
+--
+GitLab
+
diff --git a/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix.patch b/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix.patch
new file mode 100644
index 000000000000..c72fdd60021b
--- /dev/null
+++ b/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix.patch
@@ -0,0 +1,26 @@
+From e0bb9ff940f6eda544342c499998cf6142258629 Mon Sep 17 00:00:00 2001
+From: "Martin T. H. Sandsmark" <martin.sandsmark@kde.org>
+Date: Sun, 20 Dec 2020 14:43:31 +0100
+Subject: [PATCH] fix odd crash
+
+---
+ src/nodegroup.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/nodegroup.cpp b/src/nodegroup.cpp
+index f4cfa2b4..94430409 100644
+--- a/src/nodegroup.cpp
++++ b/src/nodegroup.cpp
+@@ -142,8 +142,7 @@ void NodeGroup::updateRoutes()
+ Node *next = (routeIt == routeEnd) ? n2 : (Node *)*(routeIt++);
+ removeRoutedNodes(&currentList, prev, next);
+ QPointList pointList = *it;
+- if ( prev != n1 )
+- {
++ if (!pointList.isEmpty() && prev != n1) {
+ QPoint first = pointList.first();
+ prev->moveBy( first.x() - prev->x(), first.y() - prev->y() );
+ }
+--
+GitLab
+
diff --git a/sci-electronics/ktechlab/ktechlab-0.50.0-r1.ebuild b/sci-electronics/ktechlab/ktechlab-0.50.0-r2.ebuild
index 47f9f7469ef3..6359c002ea9a 100644
--- a/sci-electronics/ktechlab/ktechlab-0.50.0-r1.ebuild
+++ b/sci-electronics/ktechlab/ktechlab-0.50.0-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
ECM_EXAMPLES="true"
ECM_HANDBOOK="forceoptional"
@@ -44,4 +44,7 @@ DEPEND="
"
RDEPEND="${DEPEND}"
-PATCHES=( "${FILESDIR}"/${P}-deps.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-deps.patch
+ "${FILESDIR}"/${P}-crashfix{-propertyeditor,-connectors-diverging,}.patch
+)