Skip to content

Commit

Permalink
Merge branch 'jb46923' into 'master'
Browse files Browse the repository at this point in the history
[calligra] Fix build with GCC6 and newer. Contributes to JB#46923

See merge request mer-core/calligra!13
  • Loading branch information
pvuorela committed Sep 25, 2019
2 parents 1b2f50e + 29ce1c8 commit 690465b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions rpm/calligra-gcc6.patch
@@ -0,0 +1,25 @@
From fe9065fe6771df56604e9735f0eb4fbcdcca9933 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= <matti.lehtimaki@jolla.com>
Date: Mon, 9 Sep 2019 21:47:57 +0300
Subject: [PATCH] Fix build with GCC6 and newer.

---
libs/flake/KoSnapStrategy.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/flake/KoSnapStrategy.cpp b/libs/flake/KoSnapStrategy.cpp
index e67b0907367..442827defaa 100644
--- a/libs/flake/KoSnapStrategy.cpp
+++ b/libs/flake/KoSnapStrategy.cpp
@@ -177,7 +177,7 @@ bool ExtensionSnapStrategy::snap(const QPointF &mousePosition, KoSnapProxy * pro
Q_ASSERT(std::isfinite(maxSnapDistance));

const qreal maxDistance = maxSnapDistance * maxSnapDistance;
- qreal minDistances[2] = { HUGE_VAL, HUGE_VAL };
+ qreal minDistances[2] = { (qreal)HUGE_VAL, (qreal)HUGE_VAL };

QPointF snappedPoints[2] = { mousePosition, mousePosition };
QPointF startPoints[2];
--
2.17.1

2 changes: 2 additions & 0 deletions rpm/calligra.spec
Expand Up @@ -38,6 +38,7 @@ Patch19: calligra-qtdbus.patch
Patch20: calligra-background.patch
Patch21: calligra-rtf.patch
Patch22: calligra-invalidate-cache.patch
Patch23: calligra-gcc6.patch

%description
%{summary}.
Expand Down Expand Up @@ -192,6 +193,7 @@ BuildRequires: extra-cmake-modules >= 5.34.0
%patch20 -d upstream -p1
%patch21 -d upstream -p1
%patch22 -d upstream -p1
%patch23 -d upstream -p1

%define build_kf5() cd %1 ; if [ ! -d build ] ; then mkdir build ; fi ; cd build ; if [ ! -e Makefile ] ; then CMAKE_PREFIX_PATH=%{_buildrootdir}/kf5/usr cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_RPATH=/usr/lib/calligra-kf5 %{?2} .. ; fi ; make %{?_smp_mflags} install DESTDIR=%{_buildrootdir}/kf5 ; cd ../.. ;
%build
Expand Down

0 comments on commit 690465b

Please sign in to comment.