Merge ~jv-cyril/ubiquity:master into ubiquity:master

Proposed by Cyril
Status: Merged
Merged at revision: 0bc8580d01a764fa6275a3a9278bdeeb9a830f3f
Proposed branch: ~jv-cyril/ubiquity:master
Merge into: ubiquity:master
Diff against target: 130 lines (+14/-14)
6 files modified
ubiquity/frontend/kde_components/Keyboard.py (+1/-1)
ubiquity/frontend/kde_components/PartMan.py (+4/-4)
ubiquity/frontend/kde_components/PartitionBar.py (+1/-1)
ubiquity/frontend/kde_components/PartitionModel.py (+2/-2)
ubiquity/frontend/kde_components/Timezone.py (+2/-2)
ubiquity/frontend/kde_components/nmwidgets.py (+4/-4)
Reviewer Review Type Date Requested Status
Jeremy Standring (community) Approve
Ubuntu Installer Team Pending
Review via email: mp+416911@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jeremy Standring (spenk009) :
review: Approve

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..67ddd44 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 = (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/PartMan.py b/ubiquity/frontend/kde_components/PartMan.py
15index 6e81614..f112a39 100644
16--- a/ubiquity/frontend/kde_components/PartMan.py
17+++ b/ubiquity/frontend/kde_components/PartMan.py
18@@ -172,7 +172,7 @@ class PartMan(QtWidgets.QWidget):
19 dialog.partition_create_type_widget.hide()
20 # Yes, I know, 1000000 bytes is annoying. Sorry. This is what
21 # partman expects.
22- max_size_mb = int(partition['parted']['size']) / 1000000
23+ max_size_mb = int(partition['parted']['size']) // 1000000
24 dialog.partition_create_size_spinbutton.setMaximum(max_size_mb)
25 dialog.partition_create_size_spinbutton.setValue(max_size_mb)
26
27@@ -271,9 +271,9 @@ class PartMan(QtWidgets.QWidget):
28 else:
29 # Yes, I know, 1000000 bytes is annoying. Sorry. This is what
30 # partman expects.
31- min_size_mb = int(partition['resize_min_size']) / 1000000
32- cur_size_mb = int(partition['parted']['size']) / 1000000
33- max_size_mb = int(partition['resize_max_size']) / 1000000
34+ min_size_mb = int(partition['resize_min_size']) // 1000000
35+ cur_size_mb = int(partition['parted']['size']) // 1000000
36+ max_size_mb = int(partition['resize_max_size']) // 1000000
37 # Bad things happen if the current size is out of bounds.
38 min_size_mb = min(min_size_mb, cur_size_mb)
39 max_size_mb = max(cur_size_mb, max_size_mb)
40diff --git a/ubiquity/frontend/kde_components/PartitionBar.py b/ubiquity/frontend/kde_components/PartitionBar.py
41index fc6e698..6207bbc 100644
42--- a/ubiquity/frontend/kde_components/PartitionBar.py
43+++ b/ubiquity/frontend/kde_components/PartitionBar.py
44@@ -164,7 +164,7 @@ class PartitionsBar(QtWidgets.QWidget):
45 QtCore.Qt.TextSingleLine, text)
46 painter.drawText(
47 x + 18,
48- labelY + v_off + textSize.height() / 2, text)
49+ labelY + v_off + textSize.height() // 2, text)
50 v_off += textSize.height()
51 painter.setFont(infoFont)
52 painter.setPen(QtGui.QColor(PartitionsBar.InfoColor))
53diff --git a/ubiquity/frontend/kde_components/PartitionModel.py b/ubiquity/frontend/kde_components/PartitionModel.py
54index 29ca9fa..4d530f8 100644
55--- a/ubiquity/frontend/kde_components/PartitionModel.py
56+++ b/ubiquity/frontend/kde_components/PartitionModel.py
57@@ -259,7 +259,7 @@ class TreeItem:
58 else:
59 # Yes, I know, 1000000 bytes is annoying. Sorry. This is what
60 # partman expects.
61- size_mb = int(partition['parted']['size']) / 1000000
62+ size_mb = int(partition['parted']['size']) // 1000000
63 return '%d MB' % size_mb
64
65 def partman_column_used(self):
66@@ -271,5 +271,5 @@ class TreeItem:
67 else:
68 # Yes, I know, 1000000 bytes is annoying. Sorry. This is what
69 # partman expects.
70- size_mb = int(partition['resize_min_size']) / 1000000
71+ size_mb = int(partition['resize_min_size']) // 1000000
72 return '%d MB' % size_mb
73diff --git a/ubiquity/frontend/kde_components/Timezone.py b/ubiquity/frontend/kde_components/Timezone.py
74index ea62f3d..cda72bd 100644
75--- a/ubiquity/frontend/kde_components/Timezone.py
76+++ b/ubiquity/frontend/kde_components/Timezone.py
77@@ -32,7 +32,7 @@ class TimezoneMap(QtWidgets.QWidget):
78 # load background pixmap
79 self.imagePath = "/usr/share/ubiquity/pixmaps/timezone"
80 self.pixmap = QtGui.QPixmap("%s/bg.png" % self.imagePath)
81- self.setMinimumSize(self.pixmap.size() / 2)
82+ self.setMinimumSize(self.pixmap.size() // 2)
83 self.setMaximumSize(self.pixmap.size())
84 policy = QtWidgets.QSizePolicy(
85 QtWidgets.QSizePolicy.Preferred,
86@@ -128,7 +128,7 @@ class TimezoneMap(QtWidgets.QWidget):
87 size = self.pixmap.size()
88 if w > size.width():
89 w = size.width()
90- return w * size.height() / size.width()
91+ return w * size.height() // size.width()
92
93 def paintEvent(self, unused_paintEvent):
94 painter = QtGui.QPainter(self)
95diff --git a/ubiquity/frontend/kde_components/nmwidgets.py b/ubiquity/frontend/kde_components/nmwidgets.py
96index 9edd7f3..22b8233 100644
97--- a/ubiquity/frontend/kde_components/nmwidgets.py
98+++ b/ubiquity/frontend/kde_components/nmwidgets.py
99@@ -73,7 +73,7 @@ def draw_level_pix(wanted_level):
100
101 right = pix.width()
102 bottom = pix.height()
103- middle = bottom / 2 + 1
104+ middle = bottom // 2 + 1
105
106 center = QtCore.QPointF(right / 2., bottom - 1)
107 for level in range(4):
108@@ -88,11 +88,11 @@ def draw_level_pix(wanted_level):
109 painter.setBrush(QtCore.Qt.black)
110 painter.drawPolygon(QtGui.QPolygon(
111 [QtCore.QPoint(int(center.x()), bottom),
112- QtCore.QPoint(0, int(middle)),
113+ QtCore.QPoint(0, middle),
114 QtCore.QPoint(0, bottom)]))
115 painter.drawPolygon(QtGui.QPolygon(
116 [QtCore.QPoint(int(center.x()), bottom),
117- QtCore.QPoint(right, int(middle)),
118+ QtCore.QPoint(right, middle),
119 QtCore.QPoint(right, bottom)]))
120 painter.translate(0, 2)
121 painter.drawRect(0, pix.height() - 2, pix.width(), 2)
122@@ -205,7 +205,7 @@ class QtNetworkStore(QtGui.QStandardItemModel, NetworkStore):
123 pixes.append(draw_level_pix(level))
124
125 secure_icon = QtGui.QIcon.fromTheme("emblem-locked")
126- secure_pix = secure_icon.pixmap(ICON_SIZE / 2, ICON_SIZE / 2)
127+ secure_pix = secure_icon.pixmap(ICON_SIZE // 2, ICON_SIZE // 2)
128 for level in range(5):
129 pix2 = QtGui.QPixmap(pixes[level])
130 painter = QtGui.QPainter(pix2)

Subscribers

People subscribed via source and target branches