Merge lp:~brendan-donegan/checkbox/bug1032259_select_deselect_all_disable into lp:checkbox

Proposed by Brendan Donegan
Status: Merged
Merged at revision: 1549
Proposed branch: lp:~brendan-donegan/checkbox/bug1032259_select_deselect_all_disable
Merge into: lp:checkbox
Diff against target: 53 lines (+10/-4)
3 files modified
debian/changelog (+2/-0)
qt/frontend/qtfront.cpp (+7/-3)
qt/frontend/qtfront.h (+1/-1)
To merge this branch: bzr merge lp:~brendan-donegan/checkbox/bug1032259_select_deselect_all_disable
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+118064@code.launchpad.net

Description of the change

Very simple, disable the Select All and Deselect All buttons after 'Start Testing' is clicked. They no longer have any use then. Also had to tweak the onTestSelectionChanged function to make sure the buttons weren't re-enabled when clicking on the tree view after testing had started.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Looks good, I tested it and works as advertised.

Merging, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2012-08-03 08:17:45 +0000
+++ debian/changelog 2012-08-03 11:27:48 +0000
@@ -12,6 +12,8 @@
12 'Start Testing' has been clicked (LP: #1029815)12 'Start Testing' has been clicked (LP: #1029815)
13 * Put Component and Status into one tree view on the selection screen,13 * Put Component and Status into one tree view on the selection screen,
14 rather than two seperate ones (LP: #1030871)14 rather than two seperate ones (LP: #1030871)
15 * Disable the Select All and Deselect All buttons in the selection
16 view during testing (LP: #1032259)
1517
16 [Daniel Manrique]18 [Daniel Manrique]
17 * New version 0.14.3 for Quantal Quetzal development.19 * New version 0.14.3 for Quantal Quetzal development.
1820
=== modified file 'qt/frontend/qtfront.cpp'
--- qt/frontend/qtfront.cpp 2012-08-02 15:12:33 +0000
+++ qt/frontend/qtfront.cpp 2012-08-03 11:27:48 +0000
@@ -130,9 +130,11 @@
130 emit closedFrontend(m_doneTesting);130 emit closedFrontend(m_doneTesting);
131}131}
132132
133void QtFront::onTestSelectionChanged() {133void QtFront::onTestSelectionChanged(QModelIndex index) {
134 ui->selectAllButton->setEnabled(! m_model->allInStatus(Qt::Checked));134 if (m_model->item(index.row())->isEnabled()) {
135 ui->deselectAllButton->setEnabled(! m_model->allInStatus(Qt::Unchecked));135 ui->selectAllButton->setEnabled(! m_model->allInStatus(Qt::Checked));
136 ui->deselectAllButton->setEnabled(! m_model->allInStatus(Qt::Unchecked));
137 }
136}138}
137139
138void QtFront::onDeselectAllClicked() {140void QtFront::onDeselectAllClicked() {
@@ -205,6 +207,8 @@
205207
206void QtFront::onStartTestsClicked() {208void QtFront::onStartTestsClicked() {
207 ui->buttonStartTesting->setEnabled(false);209 ui->buttonStartTesting->setEnabled(false);
210 ui->selectAllButton->setEnabled(false);
211 ui->deselectAllButton->setEnabled(false);
208 m_model->setInteraction(false);212 m_model->setInteraction(false);
209 emit startTestsClicked();213 emit startTestsClicked();
210}214}
211215
=== modified file 'qt/frontend/qtfront.h'
--- qt/frontend/qtfront.h 2012-08-02 09:53:56 +0000
+++ qt/frontend/qtfront.h 2012-08-03 11:27:48 +0000
@@ -65,7 +65,7 @@
65 void onFullTestsClicked();65 void onFullTestsClicked();
66 void onDeselectAllClicked();66 void onDeselectAllClicked();
67 void onSelectAllClicked();67 void onSelectAllClicked();
68 void onTestSelectionChanged();68 void onTestSelectionChanged(QModelIndex index);
69 void onStartTestsClicked();69 void onStartTestsClicked();
70 void onSubmitTestsClicked();70 void onSubmitTestsClicked();
71 void onNextTestClicked();71 void onNextTestClicked();

Subscribers

People subscribed via source and target branches