Merge pull request #28811 from disassembler/caneda

caneda: fix build with gcc6
This commit is contained in:
Jörg Thalheim 2017-09-01 06:34:49 +01:00 committed by GitHub
commit 4d5aedd555
2 changed files with 17 additions and 0 deletions

View File

@ -23,6 +23,10 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake qt4 libxml2 libxslt ];
patches = [
./gcc6.patch
];
postInstall = ''
mkdir $out/share/caneda/components
cp -R ${srcComponents}/* $out/share/caneda/components

View File

@ -0,0 +1,13 @@
diff --git c/src/cgraphicsscene.cpp i/src/cgraphicsscene.cpp
index ac2929a..c399706 100644
--- c/src/cgraphicsscene.cpp
+++ i/src/cgraphicsscene.cpp
@@ -1436,7 +1436,7 @@ namespace Caneda
QPointF newPos = m_currentWiringWire->mapFromScene(pos);
QPointF refPos = m_currentWiringWire->port1()->pos();
- if( abs(refPos.x()-newPos.x()) > abs(refPos.y()-newPos.y()) ) {
+ if( (refPos.x()-newPos.x()) > (refPos.y()-newPos.y()) ) {
m_currentWiringWire->movePort2(QPointF(newPos.x(), refPos.y()));
}
else {