MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / teardownLocalDb

Method teardownLocalDb

app/src/Sessions/Player.cpp:506–523  ·  view source on GitHub ↗

* @brief Closes the per-frame DB connection and removes the named connection. */

Source from the content-addressed store, hash-verified

504 * @brief Closes the per-frame DB connection and removes the named connection.
505 */
506void Sessions::Player::teardownLocalDb()
507{
508 if (m_frameQuery)
509 m_frameQuery->clear();
510
511 m_frameQuery.reset();
512 m_frameQueryPrepared = false;
513
514 if (m_db && m_db->isOpen())
515 m_db->close();
516
517 const QString conn = m_connectionName;
518 m_db.reset();
519 if (!conn.isEmpty())
520 QSqlDatabase::removeDatabase(conn);
521
522 m_connectionName.clear();
523}
524
525/**
526 * @brief Resets all per-session caches.

Callers

nothing calls this directly

Calls 5

isEmptyMethod · 0.80
clearMethod · 0.45
resetMethod · 0.45
isOpenMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected