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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Manrique (community) | Approve | ||
Marc Tardif (community) | Needs Resubmitting | ||
Review via email: mp+92867@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
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 | 105 | 105 | ||
6 | 106 | self.qtiface.showEntry(text) | 106 | self.qtiface.showEntry(text) |
7 | 107 | self.wait_on_signals(submitTestsClicked=onSubmitTestsClicked) | 107 | self.wait_on_signals(submitTestsClicked=onSubmitTestsClicked) |
9 | 108 | return self.qtiface.getLaunchpadId() | 108 | return self.qtiface.getEmailAddress() |
10 | 109 | 109 | ||
11 | 110 | def show_check(self, text, options=[], default=[]): | 110 | def show_check(self, text, options=[], default=[]): |
12 | 111 | return False | 111 | return False |
13 | 112 | 112 | ||
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 | 28 | 28 | ||
19 | 29 | class LaunchpadPrompt(Plugin): | 29 | class LaunchpadPrompt(Plugin): |
20 | 30 | 30 | ||
22 | 31 | # E-mail address used to sign in to Launchpad. | 31 | # Email address used to sign in to Launchpad. |
23 | 32 | email = String(required=False) | 32 | email = String(required=False) |
24 | 33 | 33 | ||
25 | 34 | # Default email address used for anonymous submissions. | ||
26 | 35 | default_email = String(default="ubuntu-friendly-squad@lists.launchpad.net") | ||
27 | 36 | |||
28 | 34 | def register(self, manager): | 37 | def register(self, manager): |
29 | 35 | super(LaunchpadPrompt, self).register(manager) | 38 | super(LaunchpadPrompt, self).register(manager) |
30 | 36 | 39 | ||
31 | @@ -74,7 +77,7 @@ | |||
32 | 74 | 77 | ||
33 | 75 | [[%s|View Report]] | 78 | [[%s|View Report]] |
34 | 76 | 79 | ||
36 | 77 | You can submit this information about your system by providing the e-mail \ | 80 | You can submit this information about your system by providing the email \ |
37 | 78 | address you use to sign in to Launchpad. If you do not have a Launchpad \ | 81 | address you use to sign in to Launchpad. If you do not have a Launchpad \ |
38 | 79 | account, please register here: | 82 | account, please register here: |
39 | 80 | 83 | ||
40 | @@ -84,9 +87,7 @@ | |||
41 | 84 | break | 87 | break |
42 | 85 | 88 | ||
43 | 86 | if not email: | 89 | if not email: |
47 | 87 | self._manager.reactor.fire("prompt-error", interface, | 90 | email = self.default_email |
45 | 88 | _("No e-mail address provided, not submitting to Launchpad.")) | ||
46 | 89 | break | ||
48 | 90 | 91 | ||
49 | 91 | if not re.match(r"^\S+@\S+\.\S+$", email, re.I): | 92 | if not re.match(r"^\S+@\S+\.\S+$", email, re.I): |
50 | 92 | errors.append(_("Email address must be in a proper format.")) | 93 | errors.append(_("Email address must be in a proper format.")) |
51 | 93 | 94 | ||
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 | 838 | <bool>false</bool> | 838 | <bool>false</bool> |
57 | 839 | </property> | 839 | </property> |
58 | 840 | </widget> | 840 | </widget> |
60 | 841 | <widget class="QPushButton" name="buttonReviewResults"> | 841 | <widget class="QPushButton" name="buttonViewResults"> |
61 | 842 | <property name="geometry"> | 842 | <property name="geometry"> |
62 | 843 | <rect> | 843 | <rect> |
63 | 844 | <x>90</x> | 844 | <x>90</x> |
64 | @@ -848,10 +848,10 @@ | |||
65 | 848 | </rect> | 848 | </rect> |
66 | 849 | </property> | 849 | </property> |
67 | 850 | <property name="text"> | 850 | <property name="text"> |
69 | 851 | <string>Review Results</string> | 851 | <string>View results</string> |
70 | 852 | </property> | 852 | </property> |
71 | 853 | </widget> | 853 | </widget> |
73 | 854 | <widget class="QPushButton" name="buttonSubmitAnounymously"> | 854 | <widget class="QPushButton" name="buttonSubmitResults"> |
74 | 855 | <property name="geometry"> | 855 | <property name="geometry"> |
75 | 856 | <rect> | 856 | <rect> |
76 | 857 | <x>90</x> | 857 | <x>90</x> |
77 | @@ -861,7 +861,7 @@ | |||
78 | 861 | </rect> | 861 | </rect> |
79 | 862 | </property> | 862 | </property> |
80 | 863 | <property name="text"> | 863 | <property name="text"> |
82 | 864 | <string>Submit Anounymously</string> | 864 | <string>Submit results</string> |
83 | 865 | </property> | 865 | </property> |
84 | 866 | </widget> | 866 | </widget> |
85 | 867 | <widget class="QGroupBox" name="groupBox"> | 867 | <widget class="QGroupBox" name="groupBox"> |
86 | @@ -879,7 +879,7 @@ | |||
87 | 879 | </font> | 879 | </font> |
88 | 880 | </property> | 880 | </property> |
89 | 881 | <property name="title"> | 881 | <property name="title"> |
91 | 882 | <string>Submit To Your Launchpad Account</string> | 882 | <string>Personal details</string> |
92 | 883 | </property> | 883 | </property> |
93 | 884 | <property name="flat"> | 884 | <property name="flat"> |
94 | 885 | <bool>false</bool> | 885 | <bool>false</bool> |
95 | @@ -887,7 +887,7 @@ | |||
96 | 887 | <property name="checkable"> | 887 | <property name="checkable"> |
97 | 888 | <bool>false</bool> | 888 | <bool>false</bool> |
98 | 889 | </property> | 889 | </property> |
100 | 890 | <widget class="QLineEdit" name="lineEditLaunchpad"> | 890 | <widget class="QLineEdit" name="lineEditEmailAddress"> |
101 | 891 | <property name="geometry"> | 891 | <property name="geometry"> |
102 | 892 | <rect> | 892 | <rect> |
103 | 893 | <x>110</x> | 893 | <x>110</x> |
104 | @@ -915,20 +915,7 @@ | |||
105 | 915 | </font> | 915 | </font> |
106 | 916 | </property> | 916 | </property> |
107 | 917 | <property name="text"> | 917 | <property name="text"> |
122 | 918 | <string>Launchpad ID:</string> | 918 | <string>Email:</string> |
109 | 919 | </property> | ||
110 | 920 | </widget> | ||
111 | 921 | <widget class="QPushButton" name="buttonSubmit"> | ||
112 | 922 | <property name="geometry"> | ||
113 | 923 | <rect> | ||
114 | 924 | <x>320</x> | ||
115 | 925 | <y>24</y> | ||
116 | 926 | <width>101</width> | ||
117 | 927 | <height>27</height> | ||
118 | 928 | </rect> | ||
119 | 929 | </property> | ||
120 | 930 | <property name="text"> | ||
121 | 931 | <string>Submit</string> | ||
123 | 932 | </property> | 919 | </property> |
124 | 933 | </widget> | 920 | </widget> |
125 | 934 | </widget> | 921 | </widget> |
126 | 935 | 922 | ||
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 | 45 | connect(ui->noTestButton, SIGNAL(clicked()), this, SLOT(onNoTestClicked())); | 45 | connect(ui->noTestButton, SIGNAL(clicked()), this, SLOT(onNoTestClicked())); |
132 | 46 | connect(ui->nextTestButton, SIGNAL(clicked()), this, SLOT(onNextTestClicked())); | 46 | connect(ui->nextTestButton, SIGNAL(clicked()), this, SLOT(onNextTestClicked())); |
133 | 47 | connect(ui->previousTestButton, SIGNAL(clicked()), this, SLOT(onPreviousTestClicked())); | 47 | connect(ui->previousTestButton, SIGNAL(clicked()), this, SLOT(onPreviousTestClicked())); |
136 | 48 | connect(ui->buttonSubmit, SIGNAL(clicked()), this, SLOT(onSubmitTestsClicked())); | 48 | connect(ui->buttonSubmitResults, SIGNAL(clicked()), this, SLOT(onSubmitTestsClicked())); |
137 | 49 | connect(ui->buttonReviewResults, SIGNAL(clicked()), this, SLOT(onReviewTestsClicked())); | 49 | connect(ui->buttonViewResults, SIGNAL(clicked()), this, SLOT(onReviewTestsClicked())); |
138 | 50 | connect(m_mainWindow, SIGNAL(closed()), this, SIGNAL(closedFrontend())); | 50 | connect(m_mainWindow, SIGNAL(closed()), this, SIGNAL(closedFrontend())); |
139 | 51 | connect(ui->treeView, SIGNAL(collapsed(QModelIndex)), this, SLOT(onJobItemChanged(QModelIndex))); | 51 | connect(ui->treeView, SIGNAL(collapsed(QModelIndex)), this, SLOT(onJobItemChanged(QModelIndex))); |
140 | 52 | connect(ui->treeView, SIGNAL(expanded(QModelIndex)), this, SLOT(onJobItemChanged(QModelIndex))); | 52 | connect(ui->treeView, SIGNAL(expanded(QModelIndex)), this, SLOT(onJobItemChanged(QModelIndex))); |
141 | @@ -174,9 +174,8 @@ | |||
142 | 174 | 174 | ||
143 | 175 | void QtFront::onSubmitTestsClicked() | 175 | void QtFront::onSubmitTestsClicked() |
144 | 176 | { | 176 | { |
148 | 177 | ui->buttonSubmit->setEnabled(false); | 177 | ui->buttonSubmitResults->setEnabled(false); |
149 | 178 | ui->buttonSubmitAnonymously->setEnabled(false); | 178 | ui->lineEditEmailAddress->setEnabled(false); |
147 | 179 | ui->lineEditLaunchpad->setEnabled(false); | ||
150 | 180 | emit submitTestsClicked(); | 179 | emit submitTestsClicked(); |
151 | 181 | } | 180 | } |
152 | 182 | 181 | ||
153 | @@ -231,14 +230,13 @@ | |||
154 | 231 | { | 230 | { |
155 | 232 | Q_UNUSED(text) | 231 | Q_UNUSED(text) |
156 | 233 | currentState = SUBMISSION; | 232 | currentState = SUBMISSION; |
158 | 234 | // launchpad id requested, so move to the results screen and hide the "run" screen contents | 233 | // Email address requested, so move to the results screen and hide the "run" screen contents |
159 | 235 | ui->testsTab->setCurrentIndex(3); | 234 | ui->testsTab->setCurrentIndex(3); |
160 | 236 | ui->radioTestTab->setVisible(false); | 235 | ui->radioTestTab->setVisible(false); |
161 | 237 | ui->nextPrevButtons->setVisible(false); | 236 | ui->nextPrevButtons->setVisible(false); |
162 | 238 | 237 | ||
166 | 239 | ui->buttonSubmit->setEnabled(true); | 238 | ui->buttonSubmitResults->setEnabled(true); |
167 | 240 | ui->buttonSubmitAnonymously->setEnabled(true); | 239 | ui->lineEditEmailAddress->setEnabled(true); |
165 | 241 | ui->lineEditLaunchpad->setEnabled(true); | ||
168 | 242 | 240 | ||
169 | 243 | } | 241 | } |
170 | 244 | 242 | ||
171 | @@ -422,9 +420,9 @@ | |||
172 | 422 | return result; | 420 | return result; |
173 | 423 | } | 421 | } |
174 | 424 | 422 | ||
176 | 425 | QString QtFront::getLaunchpadId() | 423 | QString QtFront::getEmailAddress() |
177 | 426 | { | 424 | { |
179 | 427 | return ui->lineEditLaunchpad->text(); | 425 | return ui->lineEditEmailAddress->text(); |
180 | 428 | } | 426 | } |
181 | 429 | 427 | ||
182 | 430 | QVariantMap QtFront::getTestsToRun() | 428 | QVariantMap QtFront::getTestsToRun() |
183 | 431 | 429 | ||
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 | 48 | void showTree(QString text, QMap<QString, QVariant> options); | 48 | void showTree(QString text, QMap<QString, QVariant> options); |
189 | 49 | void showEntry(QString text); | 49 | void showEntry(QString text); |
190 | 50 | QVariantMap getTestsToRun(); | 50 | QVariantMap getTestsToRun(); |
192 | 51 | QString getLaunchpadId(); | 51 | QString getEmailAddress(); |
193 | 52 | void showTest(QString purpose, QString steps, QString verification, QString info, QString testType, QString testName, bool enableTestButton); | 52 | void showTest(QString purpose, QString steps, QString verification, QString info, QString testType, QString testName, bool enableTestButton); |
194 | 53 | QString showInfo(QString text, QStringList options, QString defaultoption); | 53 | QString showInfo(QString text, QStringList options, QString defaultoption); |
195 | 54 | 54 | ||
196 | 55 | 55 | ||
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 | 926 | <bool>false</bool> | 926 | <bool>false</bool> |
202 | 927 | </property> | 927 | </property> |
203 | 928 | </widget> | 928 | </widget> |
204 | 929 | <widget class="QPushButton" name="buttonReviewResults"> | ||
205 | 930 | <property name="geometry"> | ||
206 | 931 | <rect> | ||
207 | 932 | <x>90</x> | ||
208 | 933 | <y>80</y> | ||
209 | 934 | <width>461</width> | ||
210 | 935 | <height>27</height> | ||
211 | 936 | </rect> | ||
212 | 937 | </property> | ||
213 | 938 | <property name="text"> | ||
214 | 939 | <string>Review Results</string> | ||
215 | 940 | </property> | ||
216 | 941 | </widget> | ||
217 | 942 | <widget class="QPushButton" name="buttonSubmitAnonymously"> | ||
218 | 943 | <property name="geometry"> | ||
219 | 944 | <rect> | ||
220 | 945 | <x>90</x> | ||
221 | 946 | <y>120</y> | ||
222 | 947 | <width>461</width> | ||
223 | 948 | <height>27</height> | ||
224 | 949 | </rect> | ||
225 | 950 | </property> | ||
226 | 951 | <property name="text"> | ||
227 | 952 | <string>Submit Anounymously</string> | ||
228 | 953 | </property> | ||
229 | 954 | </widget> | ||
230 | 955 | <widget class="QGroupBox" name="groupBox"> | 929 | <widget class="QGroupBox" name="groupBox"> |
231 | 956 | <property name="geometry"> | 930 | <property name="geometry"> |
232 | 957 | <rect> | 931 | <rect> |
233 | 958 | <x>90</x> | 932 | <x>90</x> |
235 | 959 | <y>180</y> | 933 | <y>80</y> |
236 | 960 | <width>461</width> | 934 | <width>461</width> |
237 | 961 | <height>61</height> | 935 | <height>61</height> |
238 | 962 | </rect> | 936 | </rect> |
239 | @@ -967,7 +941,7 @@ | |||
240 | 967 | </font> | 941 | </font> |
241 | 968 | </property> | 942 | </property> |
242 | 969 | <property name="title"> | 943 | <property name="title"> |
244 | 970 | <string>Submit To Your Launchpad Account (using Launchpad eMail ID)</string> | 944 | <string>Personal details</string> |
245 | 971 | </property> | 945 | </property> |
246 | 972 | <property name="flat"> | 946 | <property name="flat"> |
247 | 973 | <bool>false</bool> | 947 | <bool>false</bool> |
248 | @@ -975,7 +949,7 @@ | |||
249 | 975 | <property name="checkable"> | 949 | <property name="checkable"> |
250 | 976 | <bool>false</bool> | 950 | <bool>false</bool> |
251 | 977 | </property> | 951 | </property> |
253 | 978 | <widget class="QLineEdit" name="lineEditLaunchpad"> | 952 | <widget class="QLineEdit" name="lineEditEmailAddress"> |
254 | 979 | <property name="geometry"> | 953 | <property name="geometry"> |
255 | 980 | <rect> | 954 | <rect> |
256 | 981 | <x>110</x> | 955 | <x>110</x> |
257 | @@ -991,7 +965,7 @@ | |||
258 | 991 | <widget class="QLabel" name="label_5"> | 965 | <widget class="QLabel" name="label_5"> |
259 | 992 | <property name="geometry"> | 966 | <property name="geometry"> |
260 | 993 | <rect> | 967 | <rect> |
262 | 994 | <x>0</x> | 968 | <x>10</x> |
263 | 995 | <y>30</y> | 969 | <y>30</y> |
264 | 996 | <width>101</width> | 970 | <width>101</width> |
265 | 997 | <height>17</height> | 971 | <height>17</height> |
266 | @@ -1003,22 +977,35 @@ | |||
267 | 1003 | </font> | 977 | </font> |
268 | 1004 | </property> | 978 | </property> |
269 | 1005 | <property name="text"> | 979 | <property name="text"> |
286 | 1006 | <string>Email Address:</string> | 980 | <string>Email:</string> |
287 | 1007 | </property> | 981 | </property> |
288 | 1008 | </widget> | 982 | </widget> |
289 | 1009 | <widget class="QPushButton" name="buttonSubmit"> | 983 | </widget> |
290 | 1010 | <property name="geometry"> | 984 | <widget class="QPushButton" name="buttonSubmitResults"> |
291 | 1011 | <rect> | 985 | <property name="geometry"> |
292 | 1012 | <x>320</x> | 986 | <rect> |
293 | 1013 | <y>24</y> | 987 | <x>90</x> |
294 | 1014 | <width>101</width> | 988 | <y>160</y> |
295 | 1015 | <height>27</height> | 989 | <width>461</width> |
296 | 1016 | </rect> | 990 | <height>27</height> |
297 | 1017 | </property> | 991 | </rect> |
298 | 1018 | <property name="text"> | 992 | </property> |
299 | 1019 | <string>Submit</string> | 993 | <property name="text"> |
300 | 1020 | </property> | 994 | <string>Submit results</string> |
301 | 1021 | </widget> | 995 | </property> |
302 | 996 | </widget> | ||
303 | 997 | <widget class="QPushButton" name="buttonViewResults"> | ||
304 | 998 | <property name="geometry"> | ||
305 | 999 | <rect> | ||
306 | 1000 | <x>90</x> | ||
307 | 1001 | <y>200</y> | ||
308 | 1002 | <width>461</width> | ||
309 | 1003 | <height>27</height> | ||
310 | 1004 | </rect> | ||
311 | 1005 | </property> | ||
312 | 1006 | <property name="text"> | ||
313 | 1007 | <string>View results</string> | ||
314 | 1008 | </property> | ||
315 | 1022 | </widget> | 1009 | </widget> |
316 | 1023 | </widget> | 1010 | </widget> |
317 | 1024 | </widget> | 1011 | </widget> |
Merged from trunk and moved widgets around in the Results window.