[mac] use qsettings to store defaults, and fix related bug