public void SaveSettings() { var updateMoc = false; var qtPro = QtProject.Create(project); if (oldMocDir != newMocDir) { QtVSIPSettings.SaveMocDirectory(project, newMocDir); updateMoc = true; } if (oldMocOptions != newMocOptions) { QtVSIPSettings.SaveMocOptions(project, newMocOptions); updateMoc = true; } if (updateMoc) { qtPro.UpdateMocSteps(oldMocDir); } if (oldUicDir != newUicDir) { QtVSIPSettings.SaveUicDirectory(project, newUicDir); qtPro.UpdateUicSteps(oldUicDir, true); } if (oldRccDir != newRccDir) { QtVSIPSettings.SaveRccDirectory(project, newRccDir); qtPro.RefreshRccSteps(oldRccDir); } if (oldLUpdateOnBuild != newLUpdateOnBuild) { QtVSIPSettings.SaveLUpdateOnBuild(project, newLUpdateOnBuild); } if (oldLUpdateOptions != newLUpdateOptions) { QtVSIPSettings.SaveLUpdateOptions(project, newLUpdateOptions); } if (oldLReleaseOptions != newLReleaseOptions) { QtVSIPSettings.SaveLReleaseOptions(project, newLReleaseOptions); } if (oldQmlDebug != QmlDebug) { QtVSIPSettings.SaveQmlDebug(project, QmlDebug); } if (oldQtVersion != newQtVersion) { if (qtPro.PromptChangeQtVersion(oldQtVersion, newQtVersion)) { var newProjectCreated = false; var versionChanged = qtPro.ChangeQtVersion( oldQtVersion, newQtVersion, ref newProjectCreated); if (versionChanged && newProjectCreated) { project = qtPro.Project; } } } }