@@ -94,12 +94,12 @@ QgsLayoutManagerDialog::QgsLayoutManagerDialog( QWidget *parent, Qt::WindowFlags
94
94
95
95
mUserTemplatesDir = QgsApplication::qgisSettingsDirPath () + " /composer_templates" ;
96
96
QMap<QString, QString> userTemplateMap = defaultTemplates ( true );
97
- this -> addTemplates ( userTemplateMap );
97
+ addTemplates ( userTemplateMap );
98
98
99
99
mDefaultTemplatesDir = QgsApplication::pkgDataPath () + " /composer_templates" ;
100
100
QMap<QString, QString> defaultTemplateMap = defaultTemplates ( false );
101
- this -> addTemplates ( defaultTemplateMap );
102
- this -> addTemplates ( this -> otherTemplates () );
101
+ addTemplates ( defaultTemplateMap );
102
+ addTemplates ( otherTemplates () );
103
103
104
104
toggleButtons ();
105
105
}
@@ -187,13 +187,12 @@ QMap<QString, QString> QgsLayoutManagerDialog::templatesFromPath( const QString
187
187
return templateMap;
188
188
}
189
189
190
- QFileInfoList fileInfoList = templateDir.entryInfoList ( QDir::Files );
191
- QFileInfoList::const_iterator infoIt = fileInfoList.constBegin ();
192
- for ( ; infoIt != fileInfoList.constEnd (); ++infoIt )
190
+ const QFileInfoList fileInfoList = templateDir.entryInfoList ( QDir::Files );
191
+ for ( const QFileInfo &info : fileInfoList )
193
192
{
194
- if ( infoIt-> suffix ().compare ( QLatin1String ( " qpt" ), Qt::CaseInsensitive ) == 0 )
193
+ if ( info. suffix ().compare ( QLatin1String ( " qpt" ), Qt::CaseInsensitive ) == 0 )
195
194
{
196
- templateMap.insert ( infoIt-> baseName (), infoIt-> absoluteFilePath () );
195
+ templateMap.insert ( info. baseName (), info. absoluteFilePath () );
197
196
}
198
197
}
199
198
return templateMap;
0 commit comments