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
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-08-03 08:17:45 +0000
3+++ debian/changelog 2012-08-03 11:27:48 +0000
4@@ -12,6 +12,8 @@
5 'Start Testing' has been clicked (LP: #1029815)
6 * Put Component and Status into one tree view on the selection screen,
7 rather than two seperate ones (LP: #1030871)
8+ * Disable the Select All and Deselect All buttons in the selection
9+ view during testing (LP: #1032259)
10
11 [Daniel Manrique]
12 * New version 0.14.3 for Quantal Quetzal development.
13
14=== modified file 'qt/frontend/qtfront.cpp'
15--- qt/frontend/qtfront.cpp 2012-08-02 15:12:33 +0000
16+++ qt/frontend/qtfront.cpp 2012-08-03 11:27:48 +0000
17@@ -130,9 +130,11 @@
18 emit closedFrontend(m_doneTesting);
19 }
20
21-void QtFront::onTestSelectionChanged() {
22- ui->selectAllButton->setEnabled(! m_model->allInStatus(Qt::Checked));
23- ui->deselectAllButton->setEnabled(! m_model->allInStatus(Qt::Unchecked));
24+void QtFront::onTestSelectionChanged(QModelIndex index) {
25+ if (m_model->item(index.row())->isEnabled()) {
26+ ui->selectAllButton->setEnabled(! m_model->allInStatus(Qt::Checked));
27+ ui->deselectAllButton->setEnabled(! m_model->allInStatus(Qt::Unchecked));
28+ }
29 }
30
31 void QtFront::onDeselectAllClicked() {
32@@ -205,6 +207,8 @@
33
34 void QtFront::onStartTestsClicked() {
35 ui->buttonStartTesting->setEnabled(false);
36+ ui->selectAllButton->setEnabled(false);
37+ ui->deselectAllButton->setEnabled(false);
38 m_model->setInteraction(false);
39 emit startTestsClicked();
40 }
41
42=== modified file 'qt/frontend/qtfront.h'
43--- qt/frontend/qtfront.h 2012-08-02 09:53:56 +0000
44+++ qt/frontend/qtfront.h 2012-08-03 11:27:48 +0000
45@@ -65,7 +65,7 @@
46 void onFullTestsClicked();
47 void onDeselectAllClicked();
48 void onSelectAllClicked();
49- void onTestSelectionChanged();
50+ void onTestSelectionChanged(QModelIndex index);
51 void onStartTestsClicked();
52 void onSubmitTestsClicked();
53 void onNextTestClicked();

Subscribers

People subscribed via source and target branches