| 281 | } |
| 282 | |
| 283 | void GrepJob::start() |
| 284 | { |
| 285 | if (m_workState != WorkUnstarted) { |
| 286 | qCWarning(PLUGIN_GREPVIEW) << "cannot start a grep job more than once, current state:" << m_workState; |
| 287 | return; |
| 288 | } |
| 289 | |
| 290 | m_workState = WorkStarting; |
| 291 | |
| 292 | m_outputModel->clear(); |
| 293 | |
| 294 | connect(this, &GrepJob::foundMatches, |
| 295 | m_outputModel, &GrepOutputModel::appendOutputs, Qt::QueuedConnection); |
| 296 | |
| 297 | QMetaObject::invokeMethod(this, "slotWork", Qt::QueuedConnection); |
| 298 | } |
| 299 | |
| 300 | bool GrepJob::doKill() |
| 301 | { |