[qt] Deprecate Qt4 and old versions of Qt5
Not enough adoption to keep the platform alive.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user