Skip to content

Commit 2ffa7ba

Browse files
committedAug 16, 2017
Translate GDAL error codes
1 parent da6049e commit 2ffa7ba

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed
 

‎src/providers/ogr/qgsogrprovider.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4332,41 +4332,41 @@ QGISEXTERN bool deleteLayer( const QString &uri, QString &errCause )
43324332
switch ( error )
43334333
{
43344334
case OGRERR_NOT_ENOUGH_DATA:
4335-
errCause = QStringLiteral( "Not enough data to deserialize" );
4335+
errCause = QObject::tr( "Not enough data to deserialize" );
43364336
break;
43374337
case OGRERR_NOT_ENOUGH_MEMORY:
4338-
errCause = QStringLiteral( "Not enough memory" );
4338+
errCause = QObject::tr( "Not enough memory" );
43394339
break;
43404340
case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
4341-
errCause = QStringLiteral( "Unsupported geometry type" );
4341+
errCause = QObject::tr( "Unsupported geometry type" );
43424342
break;
43434343
case OGRERR_UNSUPPORTED_OPERATION:
4344-
errCause = QStringLiteral( "Unsupported operation" );
4344+
errCause = QObject::tr( "Unsupported operation" );
43454345
break;
43464346
case OGRERR_CORRUPT_DATA:
4347-
errCause = QStringLiteral( "Corrupt data" );
4347+
errCause = QObject::tr( "Corrupt data" );
43484348
break;
43494349
case OGRERR_FAILURE:
4350-
errCause = QStringLiteral( "Failure" );
4350+
errCause = QObject::tr( "Failure" );
43514351
break;
43524352
case OGRERR_UNSUPPORTED_SRS:
4353-
errCause = QStringLiteral( "Unsupported SRS" );
4353+
errCause = QObject::tr( "Unsupported SRS" );
43544354
break;
43554355
case OGRERR_INVALID_HANDLE:
4356-
errCause = QStringLiteral( "Invalid handle" );
4356+
errCause = QObject::tr( "Invalid handle" );
43574357
break;
43584358
case OGRERR_NON_EXISTING_FEATURE:
4359-
errCause = QStringLiteral( "Non existing feature" );
4359+
errCause = QObject::tr( "Non existing feature" );
43604360
break;
43614361
default:
43624362
case OGRERR_NONE:
4363-
errCause = QStringLiteral( "Success" );
4363+
errCause = QObject::tr( "Success" );
43644364
break;
43654365
}
4366-
errCause = QStringLiteral( "OGR result code: %s" ).arg( errCause );
4366+
errCause = QObject::tr( "GDAL result code: %s" ).arg( errCause );
43674367
return error == OGRERR_NONE;
43684368
}
43694369
// This should never happen:
4370-
errCause = QStringLiteral( "Layer not found: %s" ).arg( uri );
4370+
errCause = QObject::tr( "Layer not found: %s" ).arg( uri );
43714371
return false;
43724372
}

0 commit comments

Comments
 (0)
Please sign in to comment.