Merge ~fritzdaswiesel/ubuntu/+source/ubiquity:fritzdaswiesel_bug1963697 into ubuntu/+source/ubiquity:ubuntu/devel

Proposed by Patrick T. Lehmann
Status: Needs review
Proposed branch: ~fritzdaswiesel/ubuntu/+source/ubiquity:fritzdaswiesel_bug1963697
Merge into: ubuntu/+source/ubiquity:ubuntu/devel
Diff against target: 55 lines (+5/-5)
4 files modified
ubiquity/frontend/kde_components/Keyboard.py (+1/-1)
ubiquity/frontend/kde_components/PartitionBar.py (+1/-1)
ubiquity/frontend/kde_components/Timezone.py (+2/-2)
ubiquity/frontend/kde_components/nmwidgets.py (+1/-1)
Reviewer Review Type Date Requested Status
Julian Andres Klode (community) Disapprove
git-ubuntu import Pending
Review via email: mp+416979@code.launchpad.net

Commit message

Bugfix for Ubiquity bug #1963697
Kubuntu installer scripts reported crashes due to unexpected types. The reason is the ICON_SIZE which, for some reason, was an odd number. Thus dividing it by 2 results in a float number.

Description of the change

With this patch applied, I successfully went through all default steps of the installer and got Kubuntu Jammy's current daily build installed on my VM.

To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) wrote :

The bug report states this has already been fixed, if the issue remains, please open a new bug report and merge.

review: Disapprove

Unmerged commits

e854536... by Patrick T. Lehmann

Bugfix for Ubiquity bug #1963697
Kubuntu installer scripts reported crashes due to unexpected
types. The reason is the ICON_SIZE which, for some reason, was
an odd number. Thus dividing it by 2 results in a float number.

With this patch applied, I went successfully through all default
steps if the installer and got Kubuntu Jammy's daily build
running on my VM.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ubiquity/frontend/kde_components/Keyboard.py b/ubiquity/frontend/kde_components/Keyboard.py
2index 822dc2f..08768fe 100644
3--- a/ubiquity/frontend/kde_components/Keyboard.py
4+++ b/ubiquity/frontend/kde_components/Keyboard.py
5@@ -94,7 +94,7 @@ class Keyboard(QWidget):
6 def resizeEvent(self, re):
7 self.space = 6
8 self.usable_width = self.width() - 2
9- self.key_w = (self.usable_width - 14 * self.space) / 15
10+ self.key_w = int((self.usable_width - 14 * self.space) / 15)
11
12 self.setMinimumHeight(self.key_w * 4 + self.space * 5)
13
14diff --git a/ubiquity/frontend/kde_components/PartitionBar.py b/ubiquity/frontend/kde_components/PartitionBar.py
15index fc6e698..39be383 100644
16--- a/ubiquity/frontend/kde_components/PartitionBar.py
17+++ b/ubiquity/frontend/kde_components/PartitionBar.py
18@@ -164,7 +164,7 @@ class PartitionsBar(QtWidgets.QWidget):
19 QtCore.Qt.TextSingleLine, text)
20 painter.drawText(
21 x + 18,
22- labelY + v_off + textSize.height() / 2, text)
23+ labelY + v_off + int(textSize.height() / 2), text)
24 v_off += textSize.height()
25 painter.setFont(infoFont)
26 painter.setPen(QtGui.QColor(PartitionsBar.InfoColor))
27diff --git a/ubiquity/frontend/kde_components/Timezone.py b/ubiquity/frontend/kde_components/Timezone.py
28index ea62f3d..05bbb7b 100644
29--- a/ubiquity/frontend/kde_components/Timezone.py
30+++ b/ubiquity/frontend/kde_components/Timezone.py
31@@ -126,9 +126,9 @@ class TimezoneMap(QtWidgets.QWidget):
32
33 def heightForWidth(self, w):
34 size = self.pixmap.size()
35- if w > size.width():
36+ if int(w) > size.width():
37 w = size.width()
38- return w * size.height() / size.width()
39+ return int(w * size.height() / size.width())
40
41 def paintEvent(self, unused_paintEvent):
42 painter = QtGui.QPainter(self)
43diff --git a/ubiquity/frontend/kde_components/nmwidgets.py b/ubiquity/frontend/kde_components/nmwidgets.py
44index 9edd7f3..edf300d 100644
45--- a/ubiquity/frontend/kde_components/nmwidgets.py
46+++ b/ubiquity/frontend/kde_components/nmwidgets.py
47@@ -205,7 +205,7 @@ class QtNetworkStore(QtGui.QStandardItemModel, NetworkStore):
48 pixes.append(draw_level_pix(level))
49
50 secure_icon = QtGui.QIcon.fromTheme("emblem-locked")
51- secure_pix = secure_icon.pixmap(ICON_SIZE / 2, ICON_SIZE / 2)
52+ secure_pix = secure_icon.pixmap(int(ICON_SIZE / 2), int(ICON_SIZE / 2))
53 for level in range(5):
54 pix2 = QtGui.QPixmap(pixes[level])
55 painter = QtGui.QPainter(pix2)

Subscribers

People subscribed via source and target branches