bool CThumbIndex::OpenThumb(const CString& strFileName, const QString& strVersion) { if (m_dbThumb.IsOpened()) return true; try { m_dbThumb.open(strFileName); // need rebuild thumb index if (strVersion.isEmpty() || strVersion.toInt() < QString(WIZNOTE_THUMB_VERSION).toInt()) { if (m_dbThumb.tableExists("WIZ_ABSTRACT")) { m_dbThumb.execDML("drop table WIZ_ABSTRACT"); } } if (!InitThumbDB()) return false; return true; } catch (const CppSQLite3Exception& e) { TOLOG(e.errorMessage()); return false; } catch (...) { TOLOG("Unknown exception while close DB"); return false; } }
bool CThumbIndex::OpenThumb(const CString& strFileName) { if (m_dbThumb.IsOpened()) return true; // try { m_dbThumb.open(strFileName); // if (!InitThumbDB()) return false; // return true; } catch (const CppSQLite3Exception& e) { TOLOG(e.errorMessage()); return false; } catch (...) { TOLOG("Unknown exception while close DB"); return false; } }