Ejemplo n.º 1
0
 public void SaveSettings()
 {
     QtVSIPSettings.SaveMocDirectory(newMocDir);
     QtVSIPSettings.SaveMocOptions(newMocOptions);
     QtVSIPSettings.SaveUicDirectory(newUicDir);
     QtVSIPSettings.SaveRccDirectory(newRccDir);
     QtVSIPSettings.SaveLUpdateOnBuild(newLUpdateOnBuild);
     QtVSIPSettings.SaveLUpdateOptions(newLUpdateOptions);
     QtVSIPSettings.SaveLReleaseOptions(newLReleaseOptions);
     QtVSIPSettings.SaveDesignerOptions(newDesignerOptions);
     QtVSIPSettings.SaveLinguistOptions(newLinguistOptions);
     QtVSIPSettings.SaveAssistantOptions(newAssistantOptions);
     QtVSIPSettings.SaveAskBeforeCheckoutFile(newAskBeforeCheckoutFile);
     QtVSIPSettings.SaveDisableCheckoutFiles(newDisableCheckoutFiles);
     QtVSIPSettings.SaveDisableAutoMocStepsUpdate(newDisableAutoMOCStepsUpdate);
 }
Ejemplo n.º 2
0
        public void SaveSettings()
        {
            bool      updateMoc = false;
            QtProject 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 (oldDesignerOptions != newDesignerOptions)
            {
                QtVSIPSettings.SaveDesignerOptions(project, newDesignerOptions);
            }

            if (oldLinguistOptions != newLinguistOptions)
            {
                QtVSIPSettings.SaveLinguistOptions(project, newLinguistOptions);
            }

            if (oldAssistantOptions != newAssistantOptions)
            {
                QtVSIPSettings.SaveAssistantOptions(project, newAssistantOptions);
            }

            if (oldQtVersion != newQtVersion)
            {
                bool newProjectCreated = false;
                bool versionChanged    = qtPro.ChangeQtVersion(oldQtVersion, newQtVersion, ref newProjectCreated);
                if (versionChanged && newProjectCreated)
                {
                    project = qtPro.Project;
                }
            }
        }