[qt] Deprecate Qt4 and old versions of Qt5

Not enough adoption to keep the platform alive.
This commit is contained in:
Thiago Marcos P. Santos
2018-11-12 16:38:34 +02:00
parent b891a8d6b0
commit cd92a231b3
20 changed files with 181 additions and 387 deletions

View File

@@ -26,22 +26,14 @@ namespace sqlite {
void checkQueryError(const QSqlQuery& query) {
QSqlError lastError = query.lastError();
if (lastError.type() != QSqlError::NoError) {
#if QT_VERSION >= 0x050300
throw Exception { lastError.nativeErrorCode().toInt(), lastError.databaseText().toStdString() };
#else
throw Exception { lastError.number(), lastError.databaseText().toStdString() };
#endif
}
}
void checkDatabaseError(const QSqlDatabase &db) {
QSqlError lastError = db.lastError();
if (lastError.type() != QSqlError::NoError) {
#if QT_VERSION >= 0x050300
throw Exception { lastError.nativeErrorCode().toInt(), lastError.databaseText().toStdString() };
#else
throw Exception { lastError.number(), lastError.databaseText().toStdString() };
#endif
}
}