Changeset View
Changeset View
Standalone View
Standalone View
outputview/outputmodel.cpp
Show First 20 Lines • Show All 446 Lines • ▼ Show 20 Line(s) | |||||
447 | { | 447 | { | ||
448 | if( lines.isEmpty() ) | 448 | if( lines.isEmpty() ) | ||
449 | return; | 449 | return; | ||
450 | 450 | | |||
451 | QMetaObject::invokeMethod(d->worker, "addLines", | 451 | QMetaObject::invokeMethod(d->worker, "addLines", | ||
452 | Q_ARG(QStringList, lines)); | 452 | Q_ARG(QStringList, lines)); | ||
453 | } | 453 | } | ||
454 | 454 | | |||
455 | void OutputModel::appendLine( const QString& l ) | 455 | void OutputModel::appendLine( const QString& line ) | ||
456 | { | 456 | { | ||
457 | appendLines( QStringList() << l ); | 457 | appendLines( QStringList() << line ); | ||
458 | } | 458 | } | ||
459 | 459 | | |||
460 | void OutputModel::ensureAllDone() | 460 | void OutputModel::ensureAllDone() | ||
461 | { | 461 | { | ||
462 | QMetaObject::invokeMethod(d->worker, "flushBuffers"); | 462 | QMetaObject::invokeMethod(d->worker, "flushBuffers"); | ||
463 | } | 463 | } | ||
464 | 464 | | |||
465 | void OutputModel::clear() | ||||
466 | { | ||||
467 | ensureAllDone(); | ||||
468 | beginResetModel(); | ||||
469 | d->m_filteredItems.clear(); | ||||
470 | endResetModel(); | ||||
471 | } | ||||
472 | | ||||
465 | } | 473 | } | ||
466 | 474 | | |||
467 | #include "outputmodel.moc" | 475 | #include "outputmodel.moc" | ||
468 | #include "moc_outputmodel.cpp" | 476 | #include "moc_outputmodel.cpp" |