- switch (query.lastError().number()) {
- case 5: // SQLITE_BUSY 5 /* The database file is locked */
- // fallthrough
- case 6: // SQLITE_LOCKED 6 /* A table in the database is locked */
+ QString nativeErrorCode = query.lastError().nativeErrorCode();
+
+ // SQLITE_BUSY 5 /* The database file is locked */
+ // SQLITE_LOCKED 6 /* A table in the database is locked */
+ if (nativeErrorCode == QLatin1String{"5"} || nativeErrorCode == QLatin1String{"6"}) {