| 62 | } |
| 63 | |
| 64 | void addLines( const QStringList& lines ) |
| 65 | { |
| 66 | m_cachedLines << lines; |
| 67 | |
| 68 | if (m_cachedLines.size() >= BATCH_SIZE) { |
| 69 | // if enough lines were added, process immediately |
| 70 | m_timer->stop(); |
| 71 | process(); |
| 72 | } else if (!m_timer->isActive()) { |
| 73 | m_timer->start(); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | void flushBuffers() |
| 78 | { |