static const QString FirstConfigFileName = "config_1.ini";static const QString SecondConfigFileName = "config_2.ini";bool first_config_is_current;void save_config_internal( QSettings & settings ){ // lots of data}void save_config(){ QSettings settings( first_config_is_current ? SecondConfigFileName : FirstConfigFileName, QSettings::IniFormat ); save_config_internal( settings ); first_config_is_current = !first_config_is_current;}