diff -Nru manuskript-0.12.0/debian/changelog manuskript-0.12.0/debian/changelog --- manuskript-0.12.0/debian/changelog 2021-09-21 17:26:43.000000000 +0000 +++ manuskript-0.12.0/debian/changelog 2023-12-27 19:51:27.000000000 +0000 @@ -1,3 +1,21 @@ +manuskript (0.12.0-1ubuntu0.22.04.2) jammy; urgency=medium + + * Improve upstream fixes for Python 3.10. (LP: #1989203) + - d/p/fix_qcolor_types.patch: remove; switch to git patch. + - d/p/lp1989203-1-fix_qcolor_types.patch + - d/p/lp1989203-2-adjusted-fixes-for-python-3.10.patch + + -- Aaron Rainbolt Wed, 27 Dec 2023 19:51:27 +0000 + +manuskript (0.12.0-1ubuntu0.22.04.1) jammy; urgency=medium + + * debian/patches/fix_qcolor_types.patch: Backport commit + 15edb6efb7305b9d1a192712660857ca38facace from upstream, ensuring that QColor + is not accidentally passed floating-point numbers. (LP: #1989203) + * debian/control: Update the Maintainer field + + -- Aaron Rainbolt Tue, 07 Feb 2023 16:34:40 -0600 + manuskript (0.12.0-1) unstable; urgency=medium * New upstream release. diff -Nru manuskript-0.12.0/debian/control manuskript-0.12.0/debian/control --- manuskript-0.12.0/debian/control 2021-09-21 17:26:43.000000000 +0000 +++ manuskript-0.12.0/debian/control 2023-12-27 19:51:27.000000000 +0000 @@ -1,7 +1,8 @@ Source: manuskript Section: editors Priority: optional -Maintainer: Miriam Ruiz +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Miriam Ruiz Build-Depends: debhelper (>= 9), dh-python, quilt, python3-all-dev, python3-setuptools Standards-Version: 4.6.0.1 diff -Nru manuskript-0.12.0/debian/patches/lp1989203-1-fix_qcolor_types.patch manuskript-0.12.0/debian/patches/lp1989203-1-fix_qcolor_types.patch --- manuskript-0.12.0/debian/patches/lp1989203-1-fix_qcolor_types.patch 1970-01-01 00:00:00.000000000 +0000 +++ manuskript-0.12.0/debian/patches/lp1989203-1-fix_qcolor_types.patch 2023-12-27 19:51:27.000000000 +0000 @@ -0,0 +1,51 @@ +Bug-Ubuntu: https://launchpad.net/bugs/1989203 +Origin: upstream, https://github.com/olivierkes/manuskript/commit/15edb6efb7305b9d1a192712660857ca38facace + +From 15edb6efb7305b9d1a192712660857ca38facace Mon Sep 17 00:00:00 2001 +From: TheJackiMonster +Date: Thu, 4 Nov 2021 00:50:44 +0100 +Subject: [PATCH] Fixed issue #957 enforcing types supported by spec for QColor + +Signed-off-by: TheJackiMonster +--- + manuskript/functions/__init__.py | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +Index: manuskript-0.12.0/manuskript/functions/__init__.py +=================================================================== +--- manuskript-0.12.0.orig/manuskript/functions/__init__.py ++++ manuskript-0.12.0/manuskript/functions/__init__.py +@@ -175,24 +175,25 @@ def randomColor(mix=None): + b = randint(0, 255) + + if mix: +- r = (r + mix.red()) / 2 +- g = (g + mix.green()) / 2 +- b = (b + mix.blue()) / 2 ++ r = int((r + mix.red()) / 2) ++ g = int((g + mix.green()) / 2) ++ b = int((b + mix.blue()) / 2) + + return QColor(r, g, b) + + +-def mixColors(col1, col2, f=.5): ++def mixColors(col1, col2, f=0.5): + fromString = False + if type(col1) == str: + fromString = True + col1 = QColor(col1) + if type(col2) == str: + col2 = QColor(col2) +- f2 = 1-f +- r = col1.red() * f + col2.red() * f2 +- g = col1.green() * f + col2.green() * f2 +- b = col1.blue() * f + col2.blue() * f2 ++ ++ f2 = 1.0 - f ++ r = int(col1.red() * f + col2.red() * f2) ++ g = int(col1.green() * f + col2.green() * f2) ++ b = int(col1.blue() * f + col2.blue() * f2) + + return QColor(r, g, b) if not fromString else QColor(r, g, b).name() + diff -Nru manuskript-0.12.0/debian/patches/lp1989203-2-adjusted-fixes-for-python-3.10.patch manuskript-0.12.0/debian/patches/lp1989203-2-adjusted-fixes-for-python-3.10.patch --- manuskript-0.12.0/debian/patches/lp1989203-2-adjusted-fixes-for-python-3.10.patch 1970-01-01 00:00:00.000000000 +0000 +++ manuskript-0.12.0/debian/patches/lp1989203-2-adjusted-fixes-for-python-3.10.patch 2023-12-27 19:51:27.000000000 +0000 @@ -0,0 +1,241 @@ +Bug-Ubuntu: https://launchpad.net/bugs/1989203 +Origin: upstream, https://github.com/olivierkes/manuskript/commit/dc86e3b14e1969ebdc62884126c372b971620da6 + +From dc86e3b14e1969ebdc62884126c372b971620da6 Mon Sep 17 00:00:00 2001 +From: TheJackiMonster +Date: Mon, 13 Dec 2021 14:27:59 +0100 +Subject: [PATCH] Adjusted fixes for python 3.10 to not crash immediately + +Signed-off-by: TheJackiMonster +--- + manuskript/functions/__init__.py | 4 ++-- + manuskript/mainWindow.py | 2 +- + manuskript/settingsWindow.py | 10 +++++----- + manuskript/ui/editors/fullScreenEditor.py | 4 ++-- + manuskript/ui/editors/themes.py | 14 +++++++------- + manuskript/ui/exporters/exporter.py | 2 +- + manuskript/ui/views/corkDelegate.py | 20 ++++++++++---------- + manuskript/ui/views/outlineDelegates.py | 8 ++++---- + 8 files changed, 32 insertions(+), 32 deletions(-) + +Index: manuskript-0.12.0/manuskript/functions/__init__.py +=================================================================== +--- manuskript-0.12.0.orig/manuskript/functions/__init__.py ++++ manuskript-0.12.0/manuskript/functions/__init__.py +@@ -92,7 +92,7 @@ def drawProgress(painter, rect, progress + painter.setBrush(QBrush(colorFromProgress(progress))) + + r2 = QRect(rect) +- r2.setWidth(r2.width() * min(progress, 1)) ++ r2.setWidth(int(r2.width() * min(progress, 1))) + painter.drawRoundedRect(r2, radius, radius) + + +@@ -408,7 +408,7 @@ def statusMessage(message, duration=5000 + MW.statusLabel.adjustSize() + g = MW.statusLabel.geometry() + # g.moveCenter(MW.mapFromGlobal(MW.geometry().center())) +- s = MW.layout().spacing() / 2 ++ s = int(MW.layout().spacing() / 2) + g.setLeft(s) + g.moveBottom(MW.mapFromGlobal(MW.geometry().bottomLeft()).y() - s) + MW.statusLabel.setGeometry(g) +Index: manuskript-0.12.0/manuskript/mainWindow.py +=================================================================== +--- manuskript-0.12.0.orig/manuskript/mainWindow.py ++++ manuskript-0.12.0/manuskript/mainWindow.py +@@ -1180,7 +1180,7 @@ class MainWindow(QMainWindow, Ui_MainWin + def centerChildWindow(self, win): + r = win.geometry() + r2 = self.geometry() +- win.move(r2.center() - QPoint(r.width()/2, r.height()/2)) ++ win.move(r2.center() - QPoint(int(r.width()/2), int(r.height()/2))) + + def support(self): + openURL("https://github.com/olivierkes/manuskript/wiki/Technical-Support") +Index: manuskript-0.12.0/manuskript/settingsWindow.py +=================================================================== +--- manuskript-0.12.0.orig/manuskript/settingsWindow.py ++++ manuskript-0.12.0/manuskript/settingsWindow.py +@@ -143,15 +143,15 @@ class settingsWindow(QWidget, Ui_Setting + self.chkRevisionsKeep.stateChanged.connect(self.revisionsSettingsChanged) + self.chkRevisionRemove.setChecked(opt["smartremove"]) + self.chkRevisionRemove.toggled.connect(self.revisionsSettingsChanged) +- self.spnRevisions10Mn.setValue(60 / opt["rules"][10 * 60]) ++ self.spnRevisions10Mn.setValue(int(60 / opt["rules"][10 * 60])) + self.spnRevisions10Mn.valueChanged.connect(self.revisionsSettingsChanged) +- self.spnRevisionsHour.setValue(60 * 10 / opt["rules"][60 * 60]) ++ self.spnRevisionsHour.setValue(int(60 * 10 / opt["rules"][60 * 60])) + self.spnRevisionsHour.valueChanged.connect(self.revisionsSettingsChanged) +- self.spnRevisionsDay.setValue(60 * 60 / opt["rules"][60 * 60 * 24]) ++ self.spnRevisionsDay.setValue(int(60 * 60 / opt["rules"][60 * 60 * 24])) + self.spnRevisionsDay.valueChanged.connect(self.revisionsSettingsChanged) +- self.spnRevisionsMonth.setValue(60 * 60 * 24 / opt["rules"][60 * 60 * 24 * 30]) ++ self.spnRevisionsMonth.setValue(int(60 * 60 * 24 / opt["rules"][60 * 60 * 24 * 30])) + self.spnRevisionsMonth.valueChanged.connect(self.revisionsSettingsChanged) +- self.spnRevisionsEternity.setValue(60 * 60 * 24 * 7 / opt["rules"][None]) ++ self.spnRevisionsEternity.setValue(int(60 * 60 * 24 * 7 / opt["rules"][None])) + self.spnRevisionsEternity.valueChanged.connect(self.revisionsSettingsChanged) + + # Views +Index: manuskript-0.12.0/manuskript/ui/editors/fullScreenEditor.py +=================================================================== +--- manuskript-0.12.0.orig/manuskript/ui/editors/fullScreenEditor.py ++++ manuskript-0.12.0/manuskript/ui/editors/fullScreenEditor.py +@@ -215,7 +215,7 @@ class fullScreenEditor(QWidget): + self._bgcolor = QColor(self._themeDatas["Background/Color"]) + else: + self._bgcolor = QColor(self._themeDatas["Foreground/Color"]) +- self._bgcolor.setAlpha(self._themeDatas["Foreground/Opacity"] * 255 / 100) ++ self._bgcolor.setAlpha(int(self._themeDatas["Foreground/Opacity"] * 255 / 100)) + self._fgcolor = QColor(self._themeDatas["Text/Color"]) + if self._themeDatas["Text/Color"] == self._themeDatas["Foreground/Color"]: + self._fgcolor = QColor(self._themeDatas["Background/Color"]) +@@ -239,7 +239,7 @@ class fullScreenEditor(QWidget): + r = self.locker.geometry() + r.moveTopLeft(QPoint( + 0, +- self.geometry().height() / 2 - r.height() / 2 ++ int(self.geometry().height() / 2 - r.height() / 2) + )) + self.leftPanel.setGeometry(r) + self.hideWidget(self.leftPanel) +Index: manuskript-0.12.0/manuskript/ui/editors/themes.py +=================================================================== +--- manuskript-0.12.0.orig/manuskript/ui/editors/themes.py ++++ manuskript-0.12.0/manuskript/ui/editors/themes.py +@@ -83,7 +83,7 @@ def themeTextRect(themeDatas, screenRect + elif themeDatas["Foreground/Position"] == 3: # Stretched + x = margin + width = screenRect.width() - 2 * margin +- return QRect(x, y, width, height) ++ return QRect(int(x), int(y), int(width), int(height)) + + + def createThemePreview(theme, screenRect, size=QSize(200, 120)): +@@ -116,13 +116,13 @@ def createThemePreview(theme, screenRect + + px = QPixmap(pixmap).scaled(size, Qt.KeepAspectRatio) + +- w = px.width() / 10 +- h = px.height() / 10 ++ w = int(px.width() / 10) ++ h = int(px.height() / 10) + r = themeTextRect(themeDatas, screenRect) + + painter = QPainter(px) + painter.drawPixmap(QRect(w, h, w * 4, h * 5), pixmap, +- QRect(r.topLeft() - QPoint(w / 3, h / 3), QSize(w * 4, h * 5))) ++ QRect(r.topLeft() - QPoint(int(w / 3), int(h / 3)), QSize(w * 4, h * 5))) + painter.setPen(Qt.white) + painter.drawRect(QRect(w, h, w * 4, h * 5)) + painter.end() +@@ -164,15 +164,15 @@ def generateTheme(themeDatas, screenRect + elif _type == 5: # Zoomed + scaled.scale(screenRect.size(), Qt.KeepAspectRatioByExpanding) + +- painter.drawImage((screenRect.width() - scaled.width()) / 2, +- (screenRect.height() - scaled.height()) / 2, img.scaled(scaled)) ++ painter.drawImage(int((screenRect.width() - scaled.width()) / 2), ++ int((screenRect.height() - scaled.height()) / 2), img.scaled(scaled)) + + # Text Background + textRect = themeTextRect(themeDatas, screenRect) + + painter.save() + color = QColor(themeDatas["Foreground/Color"]) +- color.setAlpha(themeDatas["Foreground/Opacity"] * 255 / 100) ++ color.setAlpha(int(themeDatas["Foreground/Opacity"] * 255 / 100)) + painter.setBrush(color) + painter.setPen(Qt.NoPen) + r = themeDatas["Foreground/Rounding"] +Index: manuskript-0.12.0/manuskript/ui/exporters/exporter.py +=================================================================== +--- manuskript-0.12.0.orig/manuskript/ui/exporters/exporter.py ++++ manuskript-0.12.0/manuskript/ui/exporters/exporter.py +@@ -138,7 +138,7 @@ class exporterDialog(QWidget, Ui_exporte + + r = self.dialog.geometry() + r2 = self.geometry() +- self.dialog.move(r2.center() - QPoint(r.width()/2, r.height()/2)) ++ self.dialog.move(r2.center() - QPoint(int(r.width()/2), int(r.height()/2))) + + self.dialog.exportersMightHaveChanged.connect(self.populateExportList) + +Index: manuskript-0.12.0/manuskript/ui/views/corkDelegate.py +=================================================================== +--- manuskript-0.12.0.orig/manuskript/ui/views/corkDelegate.py ++++ manuskript-0.12.0/manuskript/ui/views/corkDelegate.py +@@ -153,15 +153,15 @@ class corkDelegate(QStyledItemDelegate): + self.updateRects_v1(option, index) + + def updateRects_v2(self, option, index): +- margin = self.margin * 2 +- iconSize = max(24 * self.factor, 18) ++ margin = int(self.margin * 2) ++ iconSize = int(max(24 * self.factor, 18)) + item = index.internalPointer() + fm = QFontMetrics(option.font) +- h = fm.lineSpacing() ++ h = int(fm.lineSpacing()) + + self.itemRect = option.rect.adjusted(margin, margin, -margin, -margin) + +- top = 15 * self.factor ++ top = int(15 * self.factor) + self.topRect = QRect(self.itemRect) + self.topRect.setHeight(top) + +@@ -169,8 +169,8 @@ class corkDelegate(QStyledItemDelegate): + self.itemRect.bottomRight()) + self.iconRect = QRect(self.cardRect.topLeft() + QPoint(margin, margin), + QSize(iconSize, iconSize)) +- self.labelRect = QRect(self.cardRect.topRight() - QPoint(margin + self.factor * 18, 1), +- self.cardRect.topRight() + QPoint(- margin - self.factor * 4, self.factor * 24)) ++ self.labelRect = QRect(self.cardRect.topRight() - QPoint(int(margin + self.factor * 18), 1), ++ self.cardRect.topRight() + QPoint(int(-margin - self.factor * 4), int(self.factor * 24))) + self.titleRect = QRect(self.iconRect.topRight() + QPoint(margin, 0), + self.labelRect.bottomLeft() - QPoint(margin, margin)) + self.titleRect.setBottom(self.iconRect.bottom()) +@@ -185,8 +185,8 @@ class corkDelegate(QStyledItemDelegate): + self.mainTextRect.setTopLeft(self.mainLineRect.topLeft()) + + def updateRects_v1(self, option, index): +- margin = self.margin +- iconSize = max(16 * self.factor, 12) ++ margin = int(self.margin) ++ iconSize = int(max(16 * self.factor, 12)) + item = index.internalPointer() + self.itemRect = option.rect.adjusted(margin, margin, -margin, -margin) + self.iconRect = QRect(self.itemRect.topLeft() + QPoint(margin, margin), QSize(iconSize, iconSize)) +@@ -270,8 +270,8 @@ class corkDelegate(QStyledItemDelegate): + if item.isFolder(): + itemPoly = QPolygonF([ + self.topRect.topLeft(), +- self.topRect.topLeft() + QPoint(self.topRect.width() * .35, 0), +- self.cardRect.topLeft() + QPoint(self.topRect.width() * .45, 0), ++ self.topRect.topLeft() + QPoint(int(self.topRect.width() * .35), 0), ++ self.cardRect.topLeft() + QPoint(int(self.topRect.width() * .45), 0), + self.cardRect.topRight(), + self.cardRect.bottomRight(), + self.cardRect.bottomLeft() +Index: manuskript-0.12.0/manuskript/ui/views/outlineDelegates.py +=================================================================== +--- manuskript-0.12.0.orig/manuskript/ui/views/outlineDelegates.py ++++ manuskript-0.12.0/manuskript/ui/views/outlineDelegates.py +@@ -237,11 +237,11 @@ class outlineGoalPercentageDelegate(QSty + rect = option.rect.adjusted(margin, margin, -margin, -margin) + + # Move +- rect.translate(level * rect.width() / 10, 0) +- rect.setWidth(rect.width() - level * rect.width() / 10) ++ rect.translate(int(level * rect.width() / 10), 0) ++ rect.setWidth(int(rect.width() - level * rect.width() / 10)) + +- rect.setHeight(height) +- rect.setTop(option.rect.top() + (option.rect.height() - height) / 2) ++ rect.setHeight(int(height)) ++ rect.setTop(int(option.rect.top() + (option.rect.height() - height) / 2)) + + drawProgress(painter, rect, p) # from functions + diff -Nru manuskript-0.12.0/debian/patches/series manuskript-0.12.0/debian/patches/series --- manuskript-0.12.0/debian/patches/series 2021-09-21 17:26:43.000000000 +0000 +++ manuskript-0.12.0/debian/patches/series 2023-12-27 19:51:27.000000000 +0000 @@ -1,2 +1,4 @@ add_shebangs.patch shared_OpenGL_contexts.patch +lp1989203-1-fix_qcolor_types.patch +lp1989203-2-adjusted-fixes-for-python-3.10.patch