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