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
=== modified file 'checkbox_qt/qt_interface.py'
--- checkbox_qt/qt_interface.py 2012-02-14 20:53:30 +0000
+++ checkbox_qt/qt_interface.py 2012-02-14 22:16:21 +0000
@@ -105,7 +105,7 @@
105105
106 self.qtiface.showEntry(text)106 self.qtiface.showEntry(text)
107 self.wait_on_signals(submitTestsClicked=onSubmitTestsClicked)107 self.wait_on_signals(submitTestsClicked=onSubmitTestsClicked)
108 return self.qtiface.getLaunchpadId()108 return self.qtiface.getEmailAddress()
109109
110 def show_check(self, text, options=[], default=[]):110 def show_check(self, text, options=[], default=[]):
111 return False111 return False
112112
=== modified file 'plugins/launchpad_prompt.py'
--- plugins/launchpad_prompt.py 2011-09-08 14:52:33 +0000
+++ plugins/launchpad_prompt.py 2012-02-14 22:16:21 +0000
@@ -28,9 +28,12 @@
2828
29class LaunchpadPrompt(Plugin):29class LaunchpadPrompt(Plugin):
3030
31 # E-mail address used to sign in to Launchpad.31 # Email address used to sign in to Launchpad.
32 email = String(required=False)32 email = String(required=False)
3333
34 # Default email address used for anonymous submissions.
35 default_email = String(default="ubuntu-friendly-squad@lists.launchpad.net")
36
34 def register(self, manager):37 def register(self, manager):
35 super(LaunchpadPrompt, self).register(manager)38 super(LaunchpadPrompt, self).register(manager)
3639
@@ -74,7 +77,7 @@
7477
75 [[%s|View Report]]78 [[%s|View Report]]
7679
77You can submit this information about your system by providing the e-mail \80You can submit this information about your system by providing the email \
78address you use to sign in to Launchpad. If you do not have a Launchpad \81address you use to sign in to Launchpad. If you do not have a Launchpad \
79account, please register here:82account, please register here:
8083
@@ -84,9 +87,7 @@
84 break87 break
8588
86 if not email:89 if not email:
87 self._manager.reactor.fire("prompt-error", interface,90 email = self.default_email
88 _("No e-mail address provided, not submitting to Launchpad."))
89 break
9091
91 if not re.match(r"^\S+@\S+\.\S+$", email, re.I):92 if not re.match(r"^\S+@\S+\.\S+$", email, re.I):
92 errors.append(_("Email address must be in a proper format."))93 errors.append(_("Email address must be in a proper format."))
9394
=== modified file 'qt/checkbox-qt.ui'
--- qt/checkbox-qt.ui 2012-01-20 20:47:28 +0000
+++ qt/checkbox-qt.ui 2012-02-14 22:16:21 +0000
@@ -838,7 +838,7 @@
838 <bool>false</bool>838 <bool>false</bool>
839 </property>839 </property>
840 </widget>840 </widget>
841 <widget class="QPushButton" name="buttonReviewResults">841 <widget class="QPushButton" name="buttonViewResults">
842 <property name="geometry">842 <property name="geometry">
843 <rect>843 <rect>
844 <x>90</x>844 <x>90</x>
@@ -848,10 +848,10 @@
848 </rect>848 </rect>
849 </property>849 </property>
850 <property name="text">850 <property name="text">
851 <string>Review Results</string>851 <string>View results</string>
852 </property>852 </property>
853 </widget>853 </widget>
854 <widget class="QPushButton" name="buttonSubmitAnounymously">854 <widget class="QPushButton" name="buttonSubmitResults">
855 <property name="geometry">855 <property name="geometry">
856 <rect>856 <rect>
857 <x>90</x>857 <x>90</x>
@@ -861,7 +861,7 @@
861 </rect>861 </rect>
862 </property>862 </property>
863 <property name="text">863 <property name="text">
864 <string>Submit Anounymously</string>864 <string>Submit results</string>
865 </property>865 </property>
866 </widget>866 </widget>
867 <widget class="QGroupBox" name="groupBox">867 <widget class="QGroupBox" name="groupBox">
@@ -879,7 +879,7 @@
879 </font>879 </font>
880 </property>880 </property>
881 <property name="title">881 <property name="title">
882 <string>Submit To Your Launchpad Account</string>882 <string>Personal details</string>
883 </property>883 </property>
884 <property name="flat">884 <property name="flat">
885 <bool>false</bool>885 <bool>false</bool>
@@ -887,7 +887,7 @@
887 <property name="checkable">887 <property name="checkable">
888 <bool>false</bool>888 <bool>false</bool>
889 </property>889 </property>
890 <widget class="QLineEdit" name="lineEditLaunchpad">890 <widget class="QLineEdit" name="lineEditEmailAddress">
891 <property name="geometry">891 <property name="geometry">
892 <rect>892 <rect>
893 <x>110</x>893 <x>110</x>
@@ -915,20 +915,7 @@
915 </font>915 </font>
916 </property>916 </property>
917 <property name="text">917 <property name="text">
918 <string>Launchpad ID:</string>918 <string>Email:</string>
919 </property>
920 </widget>
921 <widget class="QPushButton" name="buttonSubmit">
922 <property name="geometry">
923 <rect>
924 <x>320</x>
925 <y>24</y>
926 <width>101</width>
927 <height>27</height>
928 </rect>
929 </property>
930 <property name="text">
931 <string>Submit</string>
932 </property>919 </property>
933 </widget>920 </widget>
934 </widget>921 </widget>
935922
=== modified file 'qt/frontend/qtfront.cpp'
--- qt/frontend/qtfront.cpp 2012-02-14 16:39:38 +0000
+++ qt/frontend/qtfront.cpp 2012-02-14 22:16:21 +0000
@@ -45,8 +45,8 @@
45 connect(ui->noTestButton, SIGNAL(clicked()), this, SLOT(onNoTestClicked()));45 connect(ui->noTestButton, SIGNAL(clicked()), this, SLOT(onNoTestClicked()));
46 connect(ui->nextTestButton, SIGNAL(clicked()), this, SLOT(onNextTestClicked()));46 connect(ui->nextTestButton, SIGNAL(clicked()), this, SLOT(onNextTestClicked()));
47 connect(ui->previousTestButton, SIGNAL(clicked()), this, SLOT(onPreviousTestClicked()));47 connect(ui->previousTestButton, SIGNAL(clicked()), this, SLOT(onPreviousTestClicked()));
48 connect(ui->buttonSubmit, SIGNAL(clicked()), this, SLOT(onSubmitTestsClicked()));48 connect(ui->buttonSubmitResults, SIGNAL(clicked()), this, SLOT(onSubmitTestsClicked()));
49 connect(ui->buttonReviewResults, SIGNAL(clicked()), this, SLOT(onReviewTestsClicked()));49 connect(ui->buttonViewResults, SIGNAL(clicked()), this, SLOT(onReviewTestsClicked()));
50 connect(m_mainWindow, SIGNAL(closed()), this, SIGNAL(closedFrontend()));50 connect(m_mainWindow, SIGNAL(closed()), this, SIGNAL(closedFrontend()));
51 connect(ui->treeView, SIGNAL(collapsed(QModelIndex)), this, SLOT(onJobItemChanged(QModelIndex)));51 connect(ui->treeView, SIGNAL(collapsed(QModelIndex)), this, SLOT(onJobItemChanged(QModelIndex)));
52 connect(ui->treeView, SIGNAL(expanded(QModelIndex)), this, SLOT(onJobItemChanged(QModelIndex)));52 connect(ui->treeView, SIGNAL(expanded(QModelIndex)), this, SLOT(onJobItemChanged(QModelIndex)));
@@ -174,9 +174,8 @@
174174
175void QtFront::onSubmitTestsClicked()175void QtFront::onSubmitTestsClicked()
176{176{
177 ui->buttonSubmit->setEnabled(false);177 ui->buttonSubmitResults->setEnabled(false);
178 ui->buttonSubmitAnonymously->setEnabled(false);178 ui->lineEditEmailAddress->setEnabled(false);
179 ui->lineEditLaunchpad->setEnabled(false);
180 emit submitTestsClicked();179 emit submitTestsClicked();
181}180}
182181
@@ -231,14 +230,13 @@
231{230{
232 Q_UNUSED(text)231 Q_UNUSED(text)
233 currentState = SUBMISSION;232 currentState = SUBMISSION;
234 // launchpad id requested, so move to the results screen and hide the "run" screen contents233 // Email address requested, so move to the results screen and hide the "run" screen contents
235 ui->testsTab->setCurrentIndex(3);234 ui->testsTab->setCurrentIndex(3);
236 ui->radioTestTab->setVisible(false);235 ui->radioTestTab->setVisible(false);
237 ui->nextPrevButtons->setVisible(false);236 ui->nextPrevButtons->setVisible(false);
238237
239 ui->buttonSubmit->setEnabled(true);238 ui->buttonSubmitResults->setEnabled(true);
240 ui->buttonSubmitAnonymously->setEnabled(true);239 ui->lineEditEmailAddress->setEnabled(true);
241 ui->lineEditLaunchpad->setEnabled(true);
242240
243}241}
244242
@@ -422,9 +420,9 @@
422 return result;420 return result;
423}421}
424422
425QString QtFront::getLaunchpadId()423QString QtFront::getEmailAddress()
426{424{
427 return ui->lineEditLaunchpad->text();425 return ui->lineEditEmailAddress->text();
428}426}
429427
430QVariantMap QtFront::getTestsToRun()428QVariantMap QtFront::getTestsToRun()
431429
=== modified file 'qt/frontend/qtfront.h'
--- qt/frontend/qtfront.h 2012-02-14 16:39:38 +0000
+++ qt/frontend/qtfront.h 2012-02-14 22:16:21 +0000
@@ -48,7 +48,7 @@
48 void showTree(QString text, QMap<QString, QVariant> options);48 void showTree(QString text, QMap<QString, QVariant> options);
49 void showEntry(QString text);49 void showEntry(QString text);
50 QVariantMap getTestsToRun();50 QVariantMap getTestsToRun();
51 QString getLaunchpadId();51 QString getEmailAddress();
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);
53 QString showInfo(QString text, QStringList options, QString defaultoption);53 QString showInfo(QString text, QStringList options, QString defaultoption);
5454
5555
=== modified file 'qt/frontend/qtfront.ui'
--- qt/frontend/qtfront.ui 2012-02-13 19:50:45 +0000
+++ qt/frontend/qtfront.ui 2012-02-14 22:16:21 +0000
@@ -926,37 +926,11 @@
926 <bool>false</bool>926 <bool>false</bool>
927 </property>927 </property>
928 </widget>928 </widget>
929 <widget class="QPushButton" name="buttonReviewResults">
930 <property name="geometry">
931 <rect>
932 <x>90</x>
933 <y>80</y>
934 <width>461</width>
935 <height>27</height>
936 </rect>
937 </property>
938 <property name="text">
939 <string>Review Results</string>
940 </property>
941 </widget>
942 <widget class="QPushButton" name="buttonSubmitAnonymously">
943 <property name="geometry">
944 <rect>
945 <x>90</x>
946 <y>120</y>
947 <width>461</width>
948 <height>27</height>
949 </rect>
950 </property>
951 <property name="text">
952 <string>Submit Anounymously</string>
953 </property>
954 </widget>
955 <widget class="QGroupBox" name="groupBox">929 <widget class="QGroupBox" name="groupBox">
956 <property name="geometry">930 <property name="geometry">
957 <rect>931 <rect>
958 <x>90</x>932 <x>90</x>
959 <y>180</y>933 <y>80</y>
960 <width>461</width>934 <width>461</width>
961 <height>61</height>935 <height>61</height>
962 </rect>936 </rect>
@@ -967,7 +941,7 @@
967 </font>941 </font>
968 </property>942 </property>
969 <property name="title">943 <property name="title">
970 <string>Submit To Your Launchpad Account (using Launchpad eMail ID)</string>944 <string>Personal details</string>
971 </property>945 </property>
972 <property name="flat">946 <property name="flat">
973 <bool>false</bool>947 <bool>false</bool>
@@ -975,7 +949,7 @@
975 <property name="checkable">949 <property name="checkable">
976 <bool>false</bool>950 <bool>false</bool>
977 </property>951 </property>
978 <widget class="QLineEdit" name="lineEditLaunchpad">952 <widget class="QLineEdit" name="lineEditEmailAddress">
979 <property name="geometry">953 <property name="geometry">
980 <rect>954 <rect>
981 <x>110</x>955 <x>110</x>
@@ -991,7 +965,7 @@
991 <widget class="QLabel" name="label_5">965 <widget class="QLabel" name="label_5">
992 <property name="geometry">966 <property name="geometry">
993 <rect>967 <rect>
994 <x>0</x>968 <x>10</x>
995 <y>30</y>969 <y>30</y>
996 <width>101</width>970 <width>101</width>
997 <height>17</height>971 <height>17</height>
@@ -1003,22 +977,35 @@
1003 </font>977 </font>
1004 </property>978 </property>
1005 <property name="text">979 <property name="text">
1006 <string>Email Address:</string>980 <string>Email:</string>
1007 </property>981 </property>
1008 </widget>982 </widget>
1009 <widget class="QPushButton" name="buttonSubmit">983 </widget>
1010 <property name="geometry">984 <widget class="QPushButton" name="buttonSubmitResults">
1011 <rect>985 <property name="geometry">
1012 <x>320</x>986 <rect>
1013 <y>24</y>987 <x>90</x>
1014 <width>101</width>988 <y>160</y>
1015 <height>27</height>989 <width>461</width>
1016 </rect>990 <height>27</height>
1017 </property>991 </rect>
1018 <property name="text">992 </property>
1019 <string>Submit</string>993 <property name="text">
1020 </property>994 <string>Submit results</string>
1021 </widget>995 </property>
996 </widget>
997 <widget class="QPushButton" name="buttonViewResults">
998 <property name="geometry">
999 <rect>
1000 <x>90</x>
1001 <y>200</y>
1002 <width>461</width>
1003 <height>27</height>
1004 </rect>
1005 </property>
1006 <property name="text">
1007 <string>View results</string>
1008 </property>
1022 </widget>1009 </widget>
1023 </widget>1010 </widget>
1024 </widget>1011 </widget>

Subscribers

People subscribed via source and target branches