| 195 | }; |
| 196 | |
| 197 | OutputModelPrivate::OutputModelPrivate( OutputModel* model_, const QUrl& builddir) |
| 198 | : model(model_) |
| 199 | , worker(new ParseWorker ) |
| 200 | , m_buildDir( builddir ) |
| 201 | { |
| 202 | qRegisterMetaType<QVector<KDevelop::FilteredItem> >(); |
| 203 | qRegisterMetaType<KDevelop::IFilterStrategy*>(); |
| 204 | qRegisterMetaType<KDevelop::IFilterStrategy::Progress>(); |
| 205 | |
| 206 | s_parsingThread->addWorker(worker); |
| 207 | model->connect(worker, &ParseWorker::parsedBatch, |
| 208 | model, [=] (const QVector<KDevelop::FilteredItem>& items) { linesParsed(items); }); |
| 209 | model->connect(worker, &ParseWorker::allDone, |
| 210 | model, &OutputModel::allDone); |
| 211 | model->connect(worker, &ParseWorker::progress, |
| 212 | model, &OutputModel::progress); |
| 213 | } |
| 214 | |
| 215 | bool OutputModelPrivate::isValidIndex( const QModelIndex& idx, int currentRowCount ) const |
| 216 | { |