From d4f7bb902435ec1ec56c9a51a8fc3049f524cf01 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 7 Feb 2020 16:17:29 +1000 Subject: [PATCH] No more QSqlError::number() --- src/providers/oracle/qgsoraclefeatureiterator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/providers/oracle/qgsoraclefeatureiterator.cpp b/src/providers/oracle/qgsoraclefeatureiterator.cpp index e5e19d95c28..3a0d7662cd2 100644 --- a/src/providers/oracle/qgsoraclefeatureiterator.cpp +++ b/src/providers/oracle/qgsoraclefeatureiterator.cpp @@ -546,8 +546,10 @@ bool QgsOracleFeatureIterator::execQuery( const QString &query, const QVariantLi // ORA-12170: TNS:Connect timeout occurred // Or if there is a problem with the network connectivity try again N times // ORA-03114: Not Connected to Oracle - if ( mQry.lastError().number() == 12170 || - mQry.lastError().number() == 3114 ) + if ( mQry.lastError().nativeErrorCode() == QLatin1String( "12170" ) || + mQry.lastError().nativeErrorCode().compare( QLatin1String( "ORA-12170" ), Qt::CaseInsensitive ) == 0 || + mQry.lastError().nativeErrorCode() == QLatin1String( "3114" ) || + mQry.lastError().nativeErrorCode().compare( QLatin1String( "ORA-3114" ), Qt::CaseInsensitive ) == 0 ) { // restart connection mConnection->reconnect();