Skip to content
Permalink
Browse files

const range loop iterators

  • Loading branch information
elpaso committed Nov 6, 2017
1 parent d9b4ae5 commit af5760044afe40d02e33d320ba235d56164678df
Showing with 8 additions and 7 deletions.
  1. +1 −1 python/core/qgserror.sip
  2. +6 −5 src/app/qgsversionmigration.cpp
  3. +1 −1 src/core/qgserror.h
@@ -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,23 +58,26 @@ 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 );
}
}
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 );
}
}
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

0 comments on commit af57600

Please sign in to comment.
You can’t perform that action at this time.