Skip to content

Commit e17c263

Browse files
committed
Remove unnecessary null check
1 parent 05a3ce3 commit e17c263

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/app/qgssettingstree.cpp

+5-8
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,14 @@ void QgsSettingsTree::refresh()
131131
settings->sync();
132132

133133
// add any settings not in QgsSettings object, so it will show up in the tree view
134-
if ( settings )
134+
QMap<QString, QStringList>::const_iterator it = settingsMap.constBegin();
135+
while ( it != settingsMap.constEnd() )
135136
{
136-
QMap<QString, QStringList>::const_iterator it = settingsMap.constBegin();
137-
while ( it != settingsMap.constEnd() )
137+
if ( ! settings->contains( it.key() ) )
138138
{
139-
if ( ! settings->contains( it.key() ) )
140-
{
141-
settings->setValue( it.key(), it.value().at( 3 ) );
142-
}
143-
++it;
139+
settings->setValue( it.key(), it.value().at( 3 ) );
144140
}
141+
++it;
145142
}
146143

147144
updateChildItems( nullptr );

0 commit comments

Comments
 (0)