MCPcopy Create free account
hub / github.com/KDE/labplot / readOnUpdate

Method readOnUpdate

src/backend/datasources/LiveDataSource.cpp:457–476  ·  view source on GitHub ↗

* Called when the watch timer times out, i.e. when modifying the file or directory * presumably has finished. Also see LiveDataSource::setUpdateType(). */

Source from the content-addressed store, hash-verified

455 * presumably has finished. Also see LiveDataSource::setUpdateType().
456 */
457void LiveDataSource::readOnUpdate() {
458 DEBUG(Q_FUNC_INFO)
459 if (!m_fileSystemWatcher->files().contains(m_fileName)) {
460 m_fileSystemWatcher->addPath(m_fileName);
461 QFileInfo file(m_fileName);
462 if (m_fileSystemWatcher->files().contains(m_fileName))
463 m_fileSystemWatcher->removePath(file.absolutePath());
464 else {
465 m_fileSystemWatcher->addPath(file.absolutePath());
466 return;
467 }
468 }
469 if (m_paused)
470 // flag file for reading, once the user decides to continue reading
471 m_pending = true;
472 else
473 read();
474
475 Q_EMIT readOnUpdateCalled();
476}
477
478void LiveDataSource::initDevice() {
479 switch (m_sourceType) {

Callers

nothing calls this directly

Calls 3

readFunction · 0.85
absolutePathMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected