Merge lp:~cr3/checkbox/submit into lp:checkbox

Proposed by Marc Tardif
Status: Merged
Merged at revision: 1250
Proposed branch: lp:~cr3/checkbox/submit
Merge into: lp:checkbox
Diff against target: 317 lines (+57/-84)
6 files modified
checkbox_qt/qt_interface.py (+1/-1)
plugins/launchpad_prompt.py (+6/-5)
qt/checkbox-qt.ui (+7/-20)
qt/frontend/qtfront.cpp (+9/-11)
qt/frontend/qtfront.h (+1/-1)
qt/frontend/qtfront.ui (+33/-46)
To merge this branch: bzr merge lp:~cr3/checkbox/submit
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Marc Tardif (community) Needs Resubmitting
Review via email: mp+92867@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Marc Tardif (cr3) wrote :

Merged from trunk and moved widgets around in the Results window.

review: Needs Resubmitting
lp:~cr3/checkbox/submit updated
1243. By Marc Tardif

Merged from trunk.

1244. By Marc Tardif

Moved widets around in the Results window.

Revision history for this message
Daniel Manrique (roadmr) wrote :

I'm unable to test this directly because of some crappiness on my system, but the code looks fine. Merging, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox_qt/qt_interface.py'
2--- checkbox_qt/qt_interface.py 2012-02-14 20:53:30 +0000
3+++ checkbox_qt/qt_interface.py 2012-02-14 22:16:21 +0000
4@@ -105,7 +105,7 @@
5
6 self.qtiface.showEntry(text)
7 self.wait_on_signals(submitTestsClicked=onSubmitTestsClicked)
8- return self.qtiface.getLaunchpadId()
9+ return self.qtiface.getEmailAddress()
10
11 def show_check(self, text, options=[], default=[]):
12 return False
13
14=== modified file 'plugins/launchpad_prompt.py'
15--- plugins/launchpad_prompt.py 2011-09-08 14:52:33 +0000
16+++ plugins/launchpad_prompt.py 2012-02-14 22:16:21 +0000
17@@ -28,9 +28,12 @@
18
19 class LaunchpadPrompt(Plugin):
20
21- # E-mail address used to sign in to Launchpad.
22+ # Email address used to sign in to Launchpad.
23 email = String(required=False)
24
25+ # Default email address used for anonymous submissions.
26+ default_email = String(default="ubuntu-friendly-squad@lists.launchpad.net")
27+
28 def register(self, manager):
29 super(LaunchpadPrompt, self).register(manager)
30
31@@ -74,7 +77,7 @@
32
33 [[%s|View Report]]
34
35-You can submit this information about your system by providing the e-mail \
36+You can submit this information about your system by providing the email \
37 address you use to sign in to Launchpad. If you do not have a Launchpad \
38 account, please register here:
39
40@@ -84,9 +87,7 @@
41 break
42
43 if not email:
44- self._manager.reactor.fire("prompt-error", interface,
45- _("No e-mail address provided, not submitting to Launchpad."))
46- break
47+ email = self.default_email
48
49 if not re.match(r"^\S+@\S+\.\S+$", email, re.I):
50 errors.append(_("Email address must be in a proper format."))
51
52=== modified file 'qt/checkbox-qt.ui'
53--- qt/checkbox-qt.ui 2012-01-20 20:47:28 +0000
54+++ qt/checkbox-qt.ui 2012-02-14 22:16:21 +0000
55@@ -838,7 +838,7 @@
56 <bool>false</bool>
57 </property>
58 </widget>
59- <widget class="QPushButton" name="buttonReviewResults">
60+ <widget class="QPushButton" name="buttonViewResults">
61 <property name="geometry">
62 <rect>
63 <x>90</x>
64@@ -848,10 +848,10 @@
65 </rect>
66 </property>
67 <property name="text">
68- <string>Review Results</string>
69+ <string>View results</string>
70 </property>
71 </widget>
72- <widget class="QPushButton" name="buttonSubmitAnounymously">
73+ <widget class="QPushButton" name="buttonSubmitResults">
74 <property name="geometry">
75 <rect>
76 <x>90</x>
77@@ -861,7 +861,7 @@
78 </rect>
79 </property>
80 <property name="text">
81- <string>Submit Anounymously</string>
82+ <string>Submit results</string>
83 </property>
84 </widget>
85 <widget class="QGroupBox" name="groupBox">
86@@ -879,7 +879,7 @@
87 </font>
88 </property>
89 <property name="title">
90- <string>Submit To Your Launchpad Account</string>
91+ <string>Personal details</string>
92 </property>
93 <property name="flat">
94 <bool>false</bool>
95@@ -887,7 +887,7 @@
96 <property name="checkable">
97 <bool>false</bool>
98 </property>
99- <widget class="QLineEdit" name="lineEditLaunchpad">
100+ <widget class="QLineEdit" name="lineEditEmailAddress">
101 <property name="geometry">
102 <rect>
103 <x>110</x>
104@@ -915,20 +915,7 @@
105 </font>
106 </property>
107 <property name="text">
108- <string>Launchpad ID:</string>
109- </property>
110- </widget>
111- <widget class="QPushButton" name="buttonSubmit">
112- <property name="geometry">
113- <rect>
114- <x>320</x>
115- <y>24</y>
116- <width>101</width>
117- <height>27</height>
118- </rect>
119- </property>
120- <property name="text">
121- <string>Submit</string>
122+ <string>Email:</string>
123 </property>
124 </widget>
125 </widget>
126
127=== modified file 'qt/frontend/qtfront.cpp'
128--- qt/frontend/qtfront.cpp 2012-02-14 16:39:38 +0000
129+++ qt/frontend/qtfront.cpp 2012-02-14 22:16:21 +0000
130@@ -45,8 +45,8 @@
131 connect(ui->noTestButton, SIGNAL(clicked()), this, SLOT(onNoTestClicked()));
132 connect(ui->nextTestButton, SIGNAL(clicked()), this, SLOT(onNextTestClicked()));
133 connect(ui->previousTestButton, SIGNAL(clicked()), this, SLOT(onPreviousTestClicked()));
134- connect(ui->buttonSubmit, SIGNAL(clicked()), this, SLOT(onSubmitTestsClicked()));
135- connect(ui->buttonReviewResults, SIGNAL(clicked()), this, SLOT(onReviewTestsClicked()));
136+ connect(ui->buttonSubmitResults, SIGNAL(clicked()), this, SLOT(onSubmitTestsClicked()));
137+ connect(ui->buttonViewResults, SIGNAL(clicked()), this, SLOT(onReviewTestsClicked()));
138 connect(m_mainWindow, SIGNAL(closed()), this, SIGNAL(closedFrontend()));
139 connect(ui->treeView, SIGNAL(collapsed(QModelIndex)), this, SLOT(onJobItemChanged(QModelIndex)));
140 connect(ui->treeView, SIGNAL(expanded(QModelIndex)), this, SLOT(onJobItemChanged(QModelIndex)));
141@@ -174,9 +174,8 @@
142
143 void QtFront::onSubmitTestsClicked()
144 {
145- ui->buttonSubmit->setEnabled(false);
146- ui->buttonSubmitAnonymously->setEnabled(false);
147- ui->lineEditLaunchpad->setEnabled(false);
148+ ui->buttonSubmitResults->setEnabled(false);
149+ ui->lineEditEmailAddress->setEnabled(false);
150 emit submitTestsClicked();
151 }
152
153@@ -231,14 +230,13 @@
154 {
155 Q_UNUSED(text)
156 currentState = SUBMISSION;
157- // launchpad id requested, so move to the results screen and hide the "run" screen contents
158+ // Email address requested, so move to the results screen and hide the "run" screen contents
159 ui->testsTab->setCurrentIndex(3);
160 ui->radioTestTab->setVisible(false);
161 ui->nextPrevButtons->setVisible(false);
162
163- ui->buttonSubmit->setEnabled(true);
164- ui->buttonSubmitAnonymously->setEnabled(true);
165- ui->lineEditLaunchpad->setEnabled(true);
166+ ui->buttonSubmitResults->setEnabled(true);
167+ ui->lineEditEmailAddress->setEnabled(true);
168
169 }
170
171@@ -422,9 +420,9 @@
172 return result;
173 }
174
175-QString QtFront::getLaunchpadId()
176+QString QtFront::getEmailAddress()
177 {
178- return ui->lineEditLaunchpad->text();
179+ return ui->lineEditEmailAddress->text();
180 }
181
182 QVariantMap QtFront::getTestsToRun()
183
184=== modified file 'qt/frontend/qtfront.h'
185--- qt/frontend/qtfront.h 2012-02-14 16:39:38 +0000
186+++ qt/frontend/qtfront.h 2012-02-14 22:16:21 +0000
187@@ -48,7 +48,7 @@
188 void showTree(QString text, QMap<QString, QVariant> options);
189 void showEntry(QString text);
190 QVariantMap getTestsToRun();
191- QString getLaunchpadId();
192+ QString getEmailAddress();
193 void showTest(QString purpose, QString steps, QString verification, QString info, QString testType, QString testName, bool enableTestButton);
194 QString showInfo(QString text, QStringList options, QString defaultoption);
195
196
197=== modified file 'qt/frontend/qtfront.ui'
198--- qt/frontend/qtfront.ui 2012-02-13 19:50:45 +0000
199+++ qt/frontend/qtfront.ui 2012-02-14 22:16:21 +0000
200@@ -926,37 +926,11 @@
201 <bool>false</bool>
202 </property>
203 </widget>
204- <widget class="QPushButton" name="buttonReviewResults">
205- <property name="geometry">
206- <rect>
207- <x>90</x>
208- <y>80</y>
209- <width>461</width>
210- <height>27</height>
211- </rect>
212- </property>
213- <property name="text">
214- <string>Review Results</string>
215- </property>
216- </widget>
217- <widget class="QPushButton" name="buttonSubmitAnonymously">
218- <property name="geometry">
219- <rect>
220- <x>90</x>
221- <y>120</y>
222- <width>461</width>
223- <height>27</height>
224- </rect>
225- </property>
226- <property name="text">
227- <string>Submit Anounymously</string>
228- </property>
229- </widget>
230 <widget class="QGroupBox" name="groupBox">
231 <property name="geometry">
232 <rect>
233 <x>90</x>
234- <y>180</y>
235+ <y>80</y>
236 <width>461</width>
237 <height>61</height>
238 </rect>
239@@ -967,7 +941,7 @@
240 </font>
241 </property>
242 <property name="title">
243- <string>Submit To Your Launchpad Account (using Launchpad eMail ID)</string>
244+ <string>Personal details</string>
245 </property>
246 <property name="flat">
247 <bool>false</bool>
248@@ -975,7 +949,7 @@
249 <property name="checkable">
250 <bool>false</bool>
251 </property>
252- <widget class="QLineEdit" name="lineEditLaunchpad">
253+ <widget class="QLineEdit" name="lineEditEmailAddress">
254 <property name="geometry">
255 <rect>
256 <x>110</x>
257@@ -991,7 +965,7 @@
258 <widget class="QLabel" name="label_5">
259 <property name="geometry">
260 <rect>
261- <x>0</x>
262+ <x>10</x>
263 <y>30</y>
264 <width>101</width>
265 <height>17</height>
266@@ -1003,22 +977,35 @@
267 </font>
268 </property>
269 <property name="text">
270- <string>Email Address:</string>
271- </property>
272- </widget>
273- <widget class="QPushButton" name="buttonSubmit">
274- <property name="geometry">
275- <rect>
276- <x>320</x>
277- <y>24</y>
278- <width>101</width>
279- <height>27</height>
280- </rect>
281- </property>
282- <property name="text">
283- <string>Submit</string>
284- </property>
285- </widget>
286+ <string>Email:</string>
287+ </property>
288+ </widget>
289+ </widget>
290+ <widget class="QPushButton" name="buttonSubmitResults">
291+ <property name="geometry">
292+ <rect>
293+ <x>90</x>
294+ <y>160</y>
295+ <width>461</width>
296+ <height>27</height>
297+ </rect>
298+ </property>
299+ <property name="text">
300+ <string>Submit results</string>
301+ </property>
302+ </widget>
303+ <widget class="QPushButton" name="buttonViewResults">
304+ <property name="geometry">
305+ <rect>
306+ <x>90</x>
307+ <y>200</y>
308+ <width>461</width>
309+ <height>27</height>
310+ </rect>
311+ </property>
312+ <property name="text">
313+ <string>View results</string>
314+ </property>
315 </widget>
316 </widget>
317 </widget>

Subscribers

People subscribed via source and target branches