mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
const range loop iterators
This commit is contained in:
parent
d9b4ae56bd
commit
af5760044a
@ -123,7 +123,7 @@ class QgsError
|
||||
Clear error messages
|
||||
%End
|
||||
|
||||
const QList<QgsErrorMessage> messageList();
|
||||
const QList<QgsErrorMessage> messageList() const;
|
||||
%Docstring
|
||||
messageList return the list of current error messages
|
||||
:return: current list of error messages
|
||||
|
@ -58,7 +58,8 @@ QgsError Qgs2To3Migration::runMigration()
|
||||
QgsError settingsErrors = migrateSettings();
|
||||
if ( !settingsErrors.isEmpty() )
|
||||
{
|
||||
for ( const auto &err : settingsErrors.messageList( ) )
|
||||
const QList<QgsErrorMessage> errorList( settingsErrors.messageList( ) );
|
||||
for ( const auto &err : errorList )
|
||||
{
|
||||
errors.append( err );
|
||||
}
|
||||
@ -66,7 +67,8 @@ QgsError Qgs2To3Migration::runMigration()
|
||||
QgsError stylesErrors = migrateStyles();
|
||||
if ( !stylesErrors.isEmpty() )
|
||||
{
|
||||
for ( const auto &err : stylesErrors.messageList( ) )
|
||||
const QList<QgsErrorMessage> errorList( stylesErrors.messageList( ) );
|
||||
for ( const auto &err : errorList )
|
||||
{
|
||||
errors.append( err );
|
||||
}
|
||||
@ -74,7 +76,8 @@ QgsError Qgs2To3Migration::runMigration()
|
||||
QgsError authDbErrors = migrateAuthDb();
|
||||
if ( !authDbErrors.isEmpty() )
|
||||
{
|
||||
for ( const auto &err : authDbErrors.messageList( ) )
|
||||
const QList<QgsErrorMessage> errorList( authDbErrors.messageList( ) );
|
||||
for ( const auto &err : errorList )
|
||||
{
|
||||
errors.append( err );
|
||||
}
|
||||
@ -280,8 +283,6 @@ QgsError Qgs2To3Migration::migrateAuthDb()
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( QStringLiteral( "OLD AUTH DB FILE %1" ).arg( oldAuthDbFilePath ) );
|
||||
QgsDebugMsg( QStringLiteral( "NEW AUTH DB FILE %1" ).arg( newAuthDbFilePath ) );
|
||||
QFile oldDbFile( oldAuthDbFilePath );
|
||||
if ( oldDbFile.exists( ) )
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ class CORE_EXPORT QgsError
|
||||
* \brief messageList return the list of current error messages
|
||||
* \return current list of error messages
|
||||
*/
|
||||
const QList<QgsErrorMessage> messageList() { return mMessageList; }
|
||||
const QList<QgsErrorMessage> messageList() const { return mMessageList; }
|
||||
|
||||
private:
|
||||
//! List of messages
|
||||
|
Loading…
x
Reference in New Issue
Block a user