Merge lp:~tiagosh/checkbox/nowelcometab into lp:checkbox

Proposed by Tiago Salem Herrmann
Status: Merged
Merged at revision: 1329
Proposed branch: lp:~tiagosh/checkbox/nowelcometab
Merge into: lp:checkbox
Diff against target: 204 lines (+12/-60)
5 files modified
checkbox_qt/qt_interface.py (+1/-11)
debian/changelog (+2/-0)
qt/frontend/qtfront.cpp (+6/-31)
qt/frontend/qtfront.h (+0/-5)
qt/frontend/qtfront.ui (+3/-13)
To merge this branch: bzr merge lp:~tiagosh/checkbox/nowelcometab
Reviewer Review Type Date Requested Status
Sylvain Pineau Approve
Review via email: mp+97911@code.launchpad.net

Description of the change

This MR removes the welcome tab from the qt ui.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

We now can remove the code related to the welcomeScreenRequested signal in qt_interface.py

review: Needs Fixing
lp:~tiagosh/checkbox/nowelcometab updated
1323. By Tiago Salem Herrmann

remove legacy code

1324. By Tiago Salem Herrmann

merge trunk

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Thanks for the legacy code removal, approved.

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-03-15 13:38:07 +0000
3+++ checkbox_qt/qt_interface.py 2012-03-20 17:01:19 +0000
4@@ -54,8 +54,6 @@
5 except:
6 time.sleep(0.5)
7 self.bus.add_signal_receiver(
8- self.onWelcomeScreenRequested, "welcomeScreenRequested")
9- self.bus.add_signal_receiver(
10 self.onClosedFrontend, "closedFrontend")
11 self.bus.add_signal_receiver(
12 self.onReviewTestsClicked, "reviewTestsClicked")
13@@ -65,9 +63,6 @@
14 def onReviewTestsClicked(self):
15 self.show_url(self.report_url)
16
17- def onWelcomeScreenRequested(self):
18- pass
19-
20 def onClosedFrontend(self):
21 self.direction = KeyboardInterrupt
22 self.loop.quit()
23@@ -123,10 +118,6 @@
24 self.direction = NEXT
25 self.loop.quit()
26
27- def onWelcomeClicked():
28- self.direction = PREV
29- self.loop.quit()
30-
31 def buildBranch(options, baseIndex="1"):
32 internalIndex = 1
33 for test, state in options.iteritems():
34@@ -161,8 +152,7 @@
35
36 self.qtiface.showTree(text, indexedOptions)
37 self.wait_on_signals(
38- startTestsClicked=onStartTestsClicked,
39- welcomeClicked=onWelcomeClicked)
40+ startTestsClicked=onStartTestsClicked)
41
42 return buildDict(self.qtiface.getTestsToRun())
43
44
45=== modified file 'debian/changelog'
46--- debian/changelog 2012-03-20 16:26:50 +0000
47+++ debian/changelog 2012-03-20 17:01:19 +0000
48@@ -14,6 +14,8 @@
49 for each test under the "Run" tab. (LP: #959452)
50 * checkbox/user_interface.py: Avoid using fork() + call() to run a web
51 browser. Use Popen instead.(LP: #956307)
52+ * qt/frontend/qtfront.ui, qt/frontend/qtfront.cpp, qt/frontend/qtfront.h:
53+ Removed welcome tab (LP: #957090)
54
55 [Jeff Lane]
56 * Reset default checkbox log level to INFO from DEBUG to make logs less
57
58=== modified file 'qt/frontend/qtfront.cpp'
59--- qt/frontend/qtfront.cpp 2012-03-20 16:15:18 +0000
60+++ qt/frontend/qtfront.cpp 2012-03-20 17:01:19 +0000
61@@ -40,7 +40,7 @@
62 m_model(0),
63 m_statusModel(new QStandardItemModel()),
64 m_currentTextComment(new QTextEdit()),
65- m_currentTab(1),
66+ m_currentTab(0),
67 m_skipTestMessage(false)
68 {
69 m_mainWindow = (QWidget*)new CustomQWidget();
70@@ -51,7 +51,6 @@
71 tmpQTW->tabBar()->setVisible(false);
72 tmpQTW = (CustomQTabWidget*) ui->radioTestTab;
73 tmpQTW->tabBar()->setVisible(false);
74- connect(ui->testsTab, SIGNAL(currentChanged(int)), this, SLOT(onTabChanged(int)));
75 ui->radioTestTab->setVisible(false);
76 ui->nextPrevButtons->setVisible(false);
77 ui->treeView->verticalScrollBar()->setTracking(true);
78@@ -154,8 +153,8 @@
79 m_skipTestMessage = false;
80 ui->radioTestTab->setVisible(false);
81 ui->nextPrevButtons->setVisible(false);
82- ui->testsTab->setCurrentIndex(1);
83- ui->tabWidget->setCurrentIndex(0);
84+ ui->testsTab->setCurrentIndex(0);
85+ ui->tabWidget->setCurrentIndex(1);
86 m_model->deleteLater();
87 ui->treeView->setModel(0);
88 m_model = 0;
89@@ -183,30 +182,6 @@
90 updateTestStatus(STATUS_UNTESTED);
91 }
92
93-void QtFront::onTabChanged(int index)
94-{
95- // check if the user asked to go back to the welcome screen
96- if (index == 0) {
97- if (currentState != TREE) {
98- QMessageBox::StandardButton button = QMessageBox::question(ui->tabWidget, "Are you sure?",
99- "This action will invalidate your tests, do you want to proceed?",
100- QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
101- if(button == QMessageBox::Yes) {
102- emit welcomeScreenRequested();
103- } else {
104- // user aborted, go back to the previous tab
105- ui->testsTab->setCurrentIndex(m_currentTab);
106- }
107- return;
108- } else {
109- currentState = WELCOME;
110- emit welcomeClicked();
111- }
112- return;
113- }
114- m_currentTab = index;
115-}
116-
117 void QtFront::onFullTestsClicked()
118 {
119 ui->tabWidget->setCurrentIndex(1);
120@@ -279,7 +254,7 @@
121 Q_UNUSED(text)
122 currentState = SUBMISSION;
123 // Email address requested, so move to the results screen and hide the "run" screen contents
124- ui->testsTab->setCurrentIndex(3);
125+ ui->testsTab->setCurrentIndex(2);
126 ui->radioTestTab->setVisible(false);
127 ui->nextPrevButtons->setVisible(false);
128
129@@ -304,7 +279,7 @@
130
131 ui->stepsFrame->setFixedHeight(0);
132 ui->stepsFrame->update();
133- ui->testsTab->setCurrentIndex(2);
134+ ui->testsTab->setCurrentIndex(1);
135 QStringList stepsList = steps.trimmed().split("\n");
136
137 QRegExp r("[0-9]+\\. (.*)");
138@@ -441,7 +416,7 @@
139 {
140 Q_UNUSED(text);
141 currentState = TREE;
142- ui->testsTab->setCurrentIndex(1);
143+ ui->testsTab->setCurrentIndex(0);
144 ui->radioTestTab->setVisible(false);
145 ui->nextPrevButtons->setVisible(false);
146
147
148=== modified file 'qt/frontend/qtfront.h'
149--- qt/frontend/qtfront.h 2012-03-15 13:38:07 +0000
150+++ qt/frontend/qtfront.h 2012-03-20 17:01:19 +0000
151@@ -65,7 +65,6 @@
152 void onNoTestClicked();
153 void onReviewTestsClicked();
154
155- void onTabChanged(int index);
156 void onJobItemChanged(QModelIndex index);
157 void onJobItemChanged(QStandardItem *item, QString job, QModelIndex baseIndex);
158 void updateTestStatus(QStandardItem *item, QString status);
159@@ -82,10 +81,6 @@
160 void previousTestClicked();
161 void submitTestsClicked();
162 void reviewTestsClicked();
163- // when the user clicks welcome during the tests
164- void welcomeScreenRequested();
165- // when the user clicks welcome from the tests selection tree
166- void welcomeClicked();
167 void closedFrontend();
168
169 private:
170
171=== modified file 'qt/frontend/qtfront.ui'
172--- qt/frontend/qtfront.ui 2012-03-15 17:17:17 +0000
173+++ qt/frontend/qtfront.ui 2012-03-20 17:01:19 +0000
174@@ -457,18 +457,8 @@
175 <enum>QTabWidget::Rounded</enum>
176 </property>
177 <property name="currentIndex">
178- <number>1</number>
179+ <number>0</number>
180 </property>
181- <widget class="QWidget" name="welcome">
182- <property name="font">
183- <font>
184- <pointsize>11</pointsize>
185- </font>
186- </property>
187- <attribute name="title">
188- <string> Welcome </string>
189- </attribute>
190- </widget>
191 <widget class="QWidget" name="testSelection">
192 <property name="font">
193 <font>
194@@ -822,8 +812,8 @@
195 <rect>
196 <x>0</x>
197 <y>0</y>
198- <width>500</width>
199- <height>189</height>
200+ <width>100</width>
201+ <height>30</height>
202 </rect>
203 </property>
204 <layout class="QVBoxLayout" name="verticalLayout_4">

Subscribers

People subscribed via source and target branches