From 60c1682c0a1150e1f87d290dfea6f6c1b5da7074 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Oct 22 2021 16:52:09 +0000 Subject: Fix for crashes. --- diff --git a/floatcast.patch b/floatcast.patch new file mode 100644 index 0000000..71d09d8 --- /dev/null +++ b/floatcast.patch @@ -0,0 +1,13 @@ +--- frescobaldi_app/widgets/progressbar.py.orig 2021-10-22 11:32:04.300798009 -0500 ++++ frescobaldi_app/widgets/progressbar.py 2021-10-22 11:32:25.281696415 -0500 +@@ -71,8 +71,8 @@ + """ + self._hideTimer.stop() + self._timeline.stop() +- self._timeline.setDuration(total * 1000) +- self._timeline.setCurrentTime(elapsed * 1000) ++ self._timeline.setDuration(int(total * 1000)) ++ self._timeline.setCurrentTime(int(elapsed * 1000)) + self.setValue(self._timeline.currentFrame()) + self._timeline.resume() + if self._hideWhileIdle and not self._hidden: diff --git a/frescobaldi.spec b/frescobaldi.spec index b9ba259..ed1bbbc 100644 --- a/frescobaldi.spec +++ b/frescobaldi.spec @@ -2,7 +2,7 @@ Name: frescobaldi Version: 3.1.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Edit LilyPond sheet music with ease! # hyphenator.py is LGPLv2+ @@ -12,6 +12,8 @@ URL: http://www.frescobaldi.org/ Source0: https://github.com/wbsoft/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz Patch0: frescobaldi-3.1.2-setup.patch Patch1: 0001-Remove-nested-list-from-metainfo-release.patch +Patch2: qpageview.patch +Patch3: floatcast.patch BuildArch: noarch ExclusiveArch: %{qt5_qtwebengine_arches} @@ -58,6 +60,8 @@ find -name "*.py" -exec sed -i -e 's|#! python||' {} \; %patch0 -p0 %patch1 -p0 +%patch2 -p0 +%patch3 -p0 %build python3 ./setup.py build @@ -95,6 +99,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml %{_metainfodir}/*.metainfo.xml %changelog +* Fri Oct 22 2021 Gwyn Ciesla - 3.1.3-5 +- Patches for qpageview, progressbar crashes. + * Wed Jul 21 2021 Fedora Release Engineering - 3.1.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/qpageview.patch b/qpageview.patch new file mode 100644 index 0000000..09909b7 --- /dev/null +++ b/qpageview.patch @@ -0,0 +1,11 @@ +--- frescobaldi_app/qpageview/shadow.py.orig 2021-10-22 11:18:50.427497680 -0500 ++++ frescobaldi_app/qpageview/shadow.py 2021-10-22 11:17:11.795956469 -0500 +@@ -40,7 +40,7 @@ + width = self._pageLayout.spacing / 2 + # make the rect slightly larger, so we "see" shadow of pages that + # would be outside view normally. +- rect = ev.rect().adjusted(-width, -width, width / 2, width / 2) ++ rect = ev.rect().adjusted(int(-width), int(-width), int(width / 2), int(width / 2)) + painter = QPainter(self.viewport()) + for page, rect in self.pagesToPaint(rect, painter): + self.drawDropShadow(page, painter, width)