diff options
author | rahulp13 | 2020-12-14 21:08:43 +0530 |
---|---|---|
committer | rahulp13 | 2020-12-14 21:08:43 +0530 |
commit | 779eac4d604c082442ba9ca72a7c23509a78e5f5 (patch) | |
tree | 43831dac148767334754754988a6abc5c4352f9e /src/projManagement | |
parent | b3b25b6f1b6c5202620548cce59985d8b79a495f (diff) | |
download | eSim-779eac4d604c082442ba9ca72a7c23509a78e5f5.tar.gz eSim-779eac4d604c082442ba9ca72a7c23509a78e5f5.tar.bz2 eSim-779eac4d604c082442ba9ca72a7c23509a78e5f5.zip |
changed QFileDialog separator and handled crash exception for all input fields
Diffstat (limited to 'src/projManagement')
-rw-r--r-- | src/projManagement/newProject.py | 3 | ||||
-rw-r--r-- | src/projManagement/openProject.py | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py index ad29dc76..278cfbe3 100644 --- a/src/projManagement/newProject.py +++ b/src/projManagement/newProject.py @@ -124,6 +124,7 @@ class NewProjectInfo(QtWidgets.QWidget): ' existing project' ) self.msg.exec_() + return None, None elif self.reply == "CHECKNAME": self.msg = QtWidgets.QErrorMessage(self) @@ -132,6 +133,7 @@ class NewProjectInfo(QtWidgets.QWidget): self.msg.showMessage( 'The project name should not contain space between them') self.msg.exec_() + return None, None elif self.reply == "NONE": self.msg = QtWidgets.QErrorMessage(self) @@ -139,6 +141,7 @@ class NewProjectInfo(QtWidgets.QWidget): self.msg.setWindowTitle("Error Message") self.msg.showMessage('The project name cannot be empty') self.msg.exec_() + return None, None def cancelProject(self): self.close() diff --git a/src/projManagement/openProject.py b/src/projManagement/openProject.py index 04944d29..c5bc2dec 100644 --- a/src/projManagement/openProject.py +++ b/src/projManagement/openProject.py @@ -16,7 +16,7 @@ # REVISION: Sunday 26 July 2020 # ========================================================================= -from PyQt5 import QtWidgets +from PyQt5 import QtWidgets, QtCore from .Validation import Validation from configuration.Appconfig import Appconfig import os @@ -45,8 +45,11 @@ class OpenProjectInfo(QtWidgets.QWidget): """ self.obj_Appconfig = Appconfig() self.openDir = self.obj_Appconfig.default_workspace["workspace"] - self.projDir = QtWidgets.QFileDialog.getExistingDirectory( - self, "open", self.openDir) + self.projDir = QtCore.QDir.toNativeSeparators( + QtWidgets.QFileDialog.getExistingDirectory( + self, "open", self.openDir + ) + ) if self.obj_validation.validateOpenproj(self.projDir): self.obj_Appconfig.current_project['ProjectName'] = str( |