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
=== modified file 'checkbox_qt/qt_interface.py'
--- checkbox_qt/qt_interface.py 2012-03-15 13:38:07 +0000
+++ checkbox_qt/qt_interface.py 2012-03-20 17:01:19 +0000
@@ -54,8 +54,6 @@
54 except:54 except:
55 time.sleep(0.5)55 time.sleep(0.5)
56 self.bus.add_signal_receiver(56 self.bus.add_signal_receiver(
57 self.onWelcomeScreenRequested, "welcomeScreenRequested")
58 self.bus.add_signal_receiver(
59 self.onClosedFrontend, "closedFrontend")57 self.onClosedFrontend, "closedFrontend")
60 self.bus.add_signal_receiver(58 self.bus.add_signal_receiver(
61 self.onReviewTestsClicked, "reviewTestsClicked")59 self.onReviewTestsClicked, "reviewTestsClicked")
@@ -65,9 +63,6 @@
65 def onReviewTestsClicked(self):63 def onReviewTestsClicked(self):
66 self.show_url(self.report_url)64 self.show_url(self.report_url)
6765
68 def onWelcomeScreenRequested(self):
69 pass
70
71 def onClosedFrontend(self):66 def onClosedFrontend(self):
72 self.direction = KeyboardInterrupt67 self.direction = KeyboardInterrupt
73 self.loop.quit()68 self.loop.quit()
@@ -123,10 +118,6 @@
123 self.direction = NEXT118 self.direction = NEXT
124 self.loop.quit()119 self.loop.quit()
125120
126 def onWelcomeClicked():
127 self.direction = PREV
128 self.loop.quit()
129
130 def buildBranch(options, baseIndex="1"):121 def buildBranch(options, baseIndex="1"):
131 internalIndex = 1122 internalIndex = 1
132 for test, state in options.iteritems():123 for test, state in options.iteritems():
@@ -161,8 +152,7 @@
161152
162 self.qtiface.showTree(text, indexedOptions)153 self.qtiface.showTree(text, indexedOptions)
163 self.wait_on_signals(154 self.wait_on_signals(
164 startTestsClicked=onStartTestsClicked,155 startTestsClicked=onStartTestsClicked)
165 welcomeClicked=onWelcomeClicked)
166156
167 return buildDict(self.qtiface.getTestsToRun())157 return buildDict(self.qtiface.getTestsToRun())
168158
169159
=== modified file 'debian/changelog'
--- debian/changelog 2012-03-20 16:26:50 +0000
+++ debian/changelog 2012-03-20 17:01:19 +0000
@@ -14,6 +14,8 @@
14 for each test under the "Run" tab. (LP: #959452)14 for each test under the "Run" tab. (LP: #959452)
15 * checkbox/user_interface.py: Avoid using fork() + call() to run a web15 * checkbox/user_interface.py: Avoid using fork() + call() to run a web
16 browser. Use Popen instead.(LP: #956307)16 browser. Use Popen instead.(LP: #956307)
17 * qt/frontend/qtfront.ui, qt/frontend/qtfront.cpp, qt/frontend/qtfront.h:
18 Removed welcome tab (LP: #957090)
1719
18 [Jeff Lane]20 [Jeff Lane]
19 * Reset default checkbox log level to INFO from DEBUG to make logs less21 * Reset default checkbox log level to INFO from DEBUG to make logs less
2022
=== modified file 'qt/frontend/qtfront.cpp'
--- qt/frontend/qtfront.cpp 2012-03-20 16:15:18 +0000
+++ qt/frontend/qtfront.cpp 2012-03-20 17:01:19 +0000
@@ -40,7 +40,7 @@
40 m_model(0),40 m_model(0),
41 m_statusModel(new QStandardItemModel()),41 m_statusModel(new QStandardItemModel()),
42 m_currentTextComment(new QTextEdit()),42 m_currentTextComment(new QTextEdit()),
43 m_currentTab(1),43 m_currentTab(0),
44 m_skipTestMessage(false)44 m_skipTestMessage(false)
45{45{
46 m_mainWindow = (QWidget*)new CustomQWidget();46 m_mainWindow = (QWidget*)new CustomQWidget();
@@ -51,7 +51,6 @@
51 tmpQTW->tabBar()->setVisible(false);51 tmpQTW->tabBar()->setVisible(false);
52 tmpQTW = (CustomQTabWidget*) ui->radioTestTab;52 tmpQTW = (CustomQTabWidget*) ui->radioTestTab;
53 tmpQTW->tabBar()->setVisible(false);53 tmpQTW->tabBar()->setVisible(false);
54 connect(ui->testsTab, SIGNAL(currentChanged(int)), this, SLOT(onTabChanged(int)));
55 ui->radioTestTab->setVisible(false);54 ui->radioTestTab->setVisible(false);
56 ui->nextPrevButtons->setVisible(false);55 ui->nextPrevButtons->setVisible(false);
57 ui->treeView->verticalScrollBar()->setTracking(true);56 ui->treeView->verticalScrollBar()->setTracking(true);
@@ -154,8 +153,8 @@
154 m_skipTestMessage = false; 153 m_skipTestMessage = false;
155 ui->radioTestTab->setVisible(false);154 ui->radioTestTab->setVisible(false);
156 ui->nextPrevButtons->setVisible(false);155 ui->nextPrevButtons->setVisible(false);
157 ui->testsTab->setCurrentIndex(1);156 ui->testsTab->setCurrentIndex(0);
158 ui->tabWidget->setCurrentIndex(0);157 ui->tabWidget->setCurrentIndex(1);
159 m_model->deleteLater();158 m_model->deleteLater();
160 ui->treeView->setModel(0);159 ui->treeView->setModel(0);
161 m_model = 0;160 m_model = 0;
@@ -183,30 +182,6 @@
183 updateTestStatus(STATUS_UNTESTED);182 updateTestStatus(STATUS_UNTESTED);
184}183}
185184
186void QtFront::onTabChanged(int index)
187{
188 // check if the user asked to go back to the welcome screen
189 if (index == 0) {
190 if (currentState != TREE) {
191 QMessageBox::StandardButton button = QMessageBox::question(ui->tabWidget, "Are you sure?",
192 "This action will invalidate your tests, do you want to proceed?",
193 QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
194 if(button == QMessageBox::Yes) {
195 emit welcomeScreenRequested();
196 } else {
197 // user aborted, go back to the previous tab
198 ui->testsTab->setCurrentIndex(m_currentTab);
199 }
200 return;
201 } else {
202 currentState = WELCOME;
203 emit welcomeClicked();
204 }
205 return;
206 }
207 m_currentTab = index;
208}
209
210void QtFront::onFullTestsClicked()185void QtFront::onFullTestsClicked()
211{186{
212 ui->tabWidget->setCurrentIndex(1);187 ui->tabWidget->setCurrentIndex(1);
@@ -279,7 +254,7 @@
279 Q_UNUSED(text)254 Q_UNUSED(text)
280 currentState = SUBMISSION;255 currentState = SUBMISSION;
281 // Email address requested, so move to the results screen and hide the "run" screen contents256 // Email address requested, so move to the results screen and hide the "run" screen contents
282 ui->testsTab->setCurrentIndex(3);257 ui->testsTab->setCurrentIndex(2);
283 ui->radioTestTab->setVisible(false);258 ui->radioTestTab->setVisible(false);
284 ui->nextPrevButtons->setVisible(false);259 ui->nextPrevButtons->setVisible(false);
285260
@@ -304,7 +279,7 @@
304279
305 ui->stepsFrame->setFixedHeight(0);280 ui->stepsFrame->setFixedHeight(0);
306 ui->stepsFrame->update();281 ui->stepsFrame->update();
307 ui->testsTab->setCurrentIndex(2);282 ui->testsTab->setCurrentIndex(1);
308 QStringList stepsList = steps.trimmed().split("\n");283 QStringList stepsList = steps.trimmed().split("\n");
309284
310 QRegExp r("[0-9]+\\. (.*)");285 QRegExp r("[0-9]+\\. (.*)");
@@ -441,7 +416,7 @@
441{416{
442 Q_UNUSED(text);417 Q_UNUSED(text);
443 currentState = TREE;418 currentState = TREE;
444 ui->testsTab->setCurrentIndex(1);419 ui->testsTab->setCurrentIndex(0);
445 ui->radioTestTab->setVisible(false);420 ui->radioTestTab->setVisible(false);
446 ui->nextPrevButtons->setVisible(false);421 ui->nextPrevButtons->setVisible(false);
447422
448423
=== modified file 'qt/frontend/qtfront.h'
--- qt/frontend/qtfront.h 2012-03-15 13:38:07 +0000
+++ qt/frontend/qtfront.h 2012-03-20 17:01:19 +0000
@@ -65,7 +65,6 @@
65 void onNoTestClicked();65 void onNoTestClicked();
66 void onReviewTestsClicked();66 void onReviewTestsClicked();
6767
68 void onTabChanged(int index);
69 void onJobItemChanged(QModelIndex index);68 void onJobItemChanged(QModelIndex index);
70 void onJobItemChanged(QStandardItem *item, QString job, QModelIndex baseIndex);69 void onJobItemChanged(QStandardItem *item, QString job, QModelIndex baseIndex);
71 void updateTestStatus(QStandardItem *item, QString status);70 void updateTestStatus(QStandardItem *item, QString status);
@@ -82,10 +81,6 @@
82 void previousTestClicked();81 void previousTestClicked();
83 void submitTestsClicked();82 void submitTestsClicked();
84 void reviewTestsClicked();83 void reviewTestsClicked();
85 // when the user clicks welcome during the tests
86 void welcomeScreenRequested();
87 // when the user clicks welcome from the tests selection tree
88 void welcomeClicked();
89 void closedFrontend();84 void closedFrontend();
9085
91private:86private:
9287
=== modified file 'qt/frontend/qtfront.ui'
--- qt/frontend/qtfront.ui 2012-03-15 17:17:17 +0000
+++ qt/frontend/qtfront.ui 2012-03-20 17:01:19 +0000
@@ -457,18 +457,8 @@
457 <enum>QTabWidget::Rounded</enum>457 <enum>QTabWidget::Rounded</enum>
458 </property>458 </property>
459 <property name="currentIndex">459 <property name="currentIndex">
460 <number>1</number>460 <number>0</number>
461 </property>461 </property>
462 <widget class="QWidget" name="welcome">
463 <property name="font">
464 <font>
465 <pointsize>11</pointsize>
466 </font>
467 </property>
468 <attribute name="title">
469 <string> Welcome </string>
470 </attribute>
471 </widget>
472 <widget class="QWidget" name="testSelection">462 <widget class="QWidget" name="testSelection">
473 <property name="font">463 <property name="font">
474 <font>464 <font>
@@ -822,8 +812,8 @@
822 <rect>812 <rect>
823 <x>0</x>813 <x>0</x>
824 <y>0</y>814 <y>0</y>
825 <width>500</width>815 <width>100</width>
826 <height>189</height>816 <height>30</height>
827 </rect>817 </rect>
828 </property>818 </property>
829 <layout class="QVBoxLayout" name="verticalLayout_4">819 <layout class="QVBoxLayout" name="verticalLayout_4">

Subscribers

People subscribed via source and target branches