MCPcopy Create free account
hub / github.com/blizzard4591/openMittsu / isDatabaseFileReadableAndValid

Method isDatabaseFileReadableAndValid

src/database/SimpleDatabase.cpp:180–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178 }
179
180 bool SimpleDatabase::isDatabaseFileReadableAndValid() {
181 QStringList const tables = database.tables(QSql::AllTables);
182 if (!tables.contains(QStringLiteral("sqlite_master"))) {
183 return false;
184 } else {
185 QSqlQuery query(database);
186 if (!query.exec(QStringLiteral("SELECT `type`, `name`, `sql`, `tbl_name` FROM `sqlite_master`"))) {
187 return false;
188 }
189 }
190 return true;
191 }
192
193 void SimpleDatabase::setCompatibilityMode(bool activate) {
194 if (m_usingCryptoDb) {

Callers

nothing calls this directly

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected