* @brief Dispatches an async close to the worker; main-thread cache clears on reply. */
| 458 | * @brief Dispatches an async close to the worker; main-thread cache clears on reply. |
| 459 | */ |
| 460 | void Sessions::DatabaseManager::closeDatabase(bool clearSavedPath) |
| 461 | { |
| 462 | if (m_worker) |
| 463 | m_worker->requestCancel(); |
| 464 | |
| 465 | if (clearSavedPath) |
| 466 | m_settings.remove("Sessions/LastDatabase"); |
| 467 | |
| 468 | if (m_worker) |
| 469 | QMetaObject::invokeMethod(m_worker, "closeDatabase", Qt::QueuedConnection); |
| 470 | } |
| 471 | |
| 472 | //-------------------------------------------------------------------------------------------------- |
| 473 | // Lock / unlock |
nothing calls this directly
no test coverage detected