~andrew-haigh-b/cdts/bug1214896

« back to all changes in this revision

Viewing changes to plainbox-gui/driver-testing/testitem.cpp

  • Committer: Andrew Haigh
  • Date: 2013-09-08 13:27:48 UTC
  • mfrom: (2277.1.14 checkbox-ihv-ng)
  • Revision ID: andrew.haigh@cellsoftware.co.uk-20130908132748-ohm168li3h0klywq
Catchup from checkbox-ihv-ng

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
                   const QList<QString> &parent_ids, \
45
45
                   const int &depth, \
46
46
                   const bool &branch, \
 
47
                   const bool &rerun, \
47
48
                   QObject * parent  ) :
48
49
    ListItem(parent), \
49
50
              m_duration(duration), \
67
68
              m_branch(branch), \
68
69
          m_runstatus(0),
69
70
          m_elapsedtime(0),
70
 
              m_groupstatus(0)
 
71
              m_groupstatus(0),
 
72
              m_rerun(true) // covers the first run of all the tests
71
73
{
72
74
    // FIXME - Hard-coded data whilst we correct the RunManagerTestDelegate
73
75
    m_outcome = JobResult_OUTCOME_PASS;
110
112
  names[CommentsRole] = "comments";
111
113
  names[OutcomeRole] = "outcome";
112
114
 
 
115
  names[RerunRole] = "rerun";
 
116
 
113
117
  return names;
114
118
}
115
119
 
169
173
  case BranchRole:
170
174
      return branch();
171
175
 
 
176
  case RerunRole:
 
177
      return rerun();
 
178
 
172
179
  default:
173
180
    return QVariant();
174
181
  }
281
288
    case OutcomeRole:
282
289
        setOutcome(value.toString());
283
290
        break;
 
291
 
 
292
    case RerunRole:
 
293
        setRerun(value.toBool());
 
294
        break;
284
295
    }
285
296
}
286
297
 
417
428
        m_runstatus = runstatus;
418
429
        emit runstatusChanged();
419
430
        emit dataChanged();
420
 
        //qDebug()<<"status changed";
421
431
    }
422
432
}
423
433
 
484
494
        emit dataChanged();
485
495
    }
486
496
}
 
497
 
 
498
void TestItem::setRerun(bool rerun){
 
499
    if (rerun != m_rerun){
 
500
        m_rerun = rerun;
 
501
        emit rerunChanged();
 
502
        emit dataChanged();
 
503
    }
 
504
}