2915 self.codemetrics and self.codemetrics.close() |
2915 self.codemetrics and self.codemetrics.close() |
2916 self.codecoverage and self.codecoverage.close() |
2916 self.codecoverage and self.codecoverage.close() |
2917 self.profiledata and self.profiledata.close() |
2917 self.profiledata and self.profiledata.close() |
2918 self.applicationDiagram and self.applicationDiagram.close() |
2918 self.applicationDiagram and self.applicationDiagram.close() |
2919 |
2919 |
2920 def closeProject(self, reopen = False): |
2920 def closeProject(self, reopen = False, noSave = False): |
2921 """ |
2921 """ |
2922 Public slot to close the current project. |
2922 Public slot to close the current project. |
2923 |
2923 |
2924 @keyparam reopen flag indicating a reopening of the project (boolean) |
2924 @keyparam reopen flag indicating a reopening of the project (boolean) |
|
2925 @keyparam noSave flag indicating to not perform save actions (boolean) |
2925 @return flag indicating success (boolean) |
2926 @return flag indicating success (boolean) |
2926 """ |
2927 """ |
2927 # save the list of recently opened projects |
2928 # save the list of recently opened projects |
2928 self.__saveRecent() |
2929 self.__saveRecent() |
2929 |
2930 |
2932 |
2933 |
2933 if not self.checkDirty(): |
2934 if not self.checkDirty(): |
2934 return False |
2935 return False |
2935 |
2936 |
2936 # save the user project properties |
2937 # save the user project properties |
2937 self.__writeUserProperties() |
2938 if not noSave: |
|
2939 self.__writeUserProperties() |
2938 |
2940 |
2939 # save the project session file being quiet about error |
2941 # save the project session file being quiet about error |
2940 if reopen: |
2942 if reopen: |
2941 self.__writeSession(quiet = True, indicator = "_tmp") |
2943 self.__writeSession(quiet = True, indicator = "_tmp") |
2942 elif Preferences.getProject("AutoSaveSession"): |
2944 elif Preferences.getProject("AutoSaveSession") and not noSave: |
2943 self.__writeSession(quiet = True) |
2945 self.__writeSession(quiet = True) |
2944 |
2946 |
2945 # save the project debugger properties file being quiet about error |
2947 # save the project debugger properties file being quiet about error |
2946 if Preferences.getProject("AutoSaveDbgProperties") and \ |
2948 if Preferences.getProject("AutoSaveDbgProperties") and \ |
2947 self.isDebugPropertiesLoaded(): |
2949 self.isDebugPropertiesLoaded() and \ |
|
2950 not noSave: |
2948 self.__writeDebugProperties(True) |
2951 self.__writeDebugProperties(True) |
2949 |
2952 |
2950 # now save all open modified files of the project |
2953 # now save all open modified files of the project |
2951 vm = e5App().getObject("ViewManager") |
2954 vm = e5App().getObject("ViewManager") |
2952 success = True |
2955 success = True |
2966 self.disconnect(self.vcs, |
2969 self.disconnect(self.vcs, |
2967 SIGNAL("vcsStatusMonitorStatus(QString, QString)"), |
2970 SIGNAL("vcsStatusMonitorStatus(QString, QString)"), |
2968 self.__statusMonitorStatus) |
2971 self.__statusMonitorStatus) |
2969 |
2972 |
2970 # now save the tasks |
2973 # now save the tasks |
2971 self.__writeTasks() |
2974 if not noSave: |
|
2975 self.__writeTasks() |
2972 self.ui.taskViewer.clearProjectTasks() |
2976 self.ui.taskViewer.clearProjectTasks() |
2973 self.ui.taskViewer.setProjectOpen(False) |
2977 self.ui.taskViewer.setProjectOpen(False) |
2974 |
2978 |
2975 # now shutdown the vcs interface |
2979 # now shutdown the vcs interface |
2976 if self.vcs: |
2980 if self.vcs: |