70 |
70 |
71 @return tuple of None and activation status (boolean) |
71 @return tuple of None and activation status (boolean) |
72 """ |
72 """ |
73 menu = e5App().getObject("Project").getMenu("Checks") |
73 menu = e5App().getObject("Project").getMenu("Checks") |
74 if menu: |
74 if menu: |
75 self.__projectAct = E4Action(self.trUtf8('Check Syntax'), |
75 self.__projectAct = E5Action(self.trUtf8('Check Syntax'), |
76 self.trUtf8('&Syntax...'), 0, 0, |
76 self.trUtf8('&Syntax...'), 0, 0, |
77 self, 'project_check_syntax') |
77 self, 'project_check_syntax') |
78 self.__projectAct.setStatusTip(\ |
78 self.__projectAct.setStatusTip(\ |
79 self.trUtf8('Check syntax.')) |
79 self.trUtf8('Check syntax.')) |
80 self.__projectAct.setWhatsThis(self.trUtf8( |
80 self.__projectAct.setWhatsThis(self.trUtf8( |
81 """<b>Check Syntax...</b>""" |
81 """<b>Check Syntax...</b>""" |
82 """<p>This checks Python files for syntax errors.</p>""" |
82 """<p>This checks Python files for syntax errors.</p>""" |
83 )) |
83 )) |
84 self.connect(self.__projectAct, SIGNAL('triggered()'), |
84 self.connect(self.__projectAct, SIGNAL('triggered()'), |
85 self.__projectSyntaxCheck) |
85 self.__projectSyntaxCheck) |
86 e5App().getObject("Project").addE4Actions([self.__projectAct]) |
86 e5App().getObject("Project").addE5Actions([self.__projectAct]) |
87 menu.addAction(self.__projectAct) |
87 menu.addAction(self.__projectAct) |
88 |
88 |
89 self.__editorAct = E4Action(self.trUtf8('Check Syntax'), |
89 self.__editorAct = E5Action(self.trUtf8('Check Syntax'), |
90 self.trUtf8('&Syntax...'), 0, 0, |
90 self.trUtf8('&Syntax...'), 0, 0, |
91 self, "") |
91 self, "") |
92 self.__editorAct.setWhatsThis(self.trUtf8( |
92 self.__editorAct.setWhatsThis(self.trUtf8( |
93 """<b>Check Syntax...</b>""" |
93 """<b>Check Syntax...</b>""" |
94 """<p>This checks Python files for syntax errors.</p>""" |
94 """<p>This checks Python files for syntax errors.</p>""" |
160 """ |
160 """ |
161 if menuName == "Checks" and \ |
161 if menuName == "Checks" and \ |
162 e5App().getObject("Project").getProjectLanguage() == "Python3": |
162 e5App().getObject("Project").getProjectLanguage() == "Python3": |
163 self.__projectBrowserMenu = menu |
163 self.__projectBrowserMenu = menu |
164 if self.__projectBrowserAct is None: |
164 if self.__projectBrowserAct is None: |
165 self.__projectBrowserAct = E4Action(self.trUtf8('Check Syntax'), |
165 self.__projectBrowserAct = E5Action(self.trUtf8('Check Syntax'), |
166 self.trUtf8('&Syntax...'), 0, 0, |
166 self.trUtf8('&Syntax...'), 0, 0, |
167 self, "") |
167 self, "") |
168 self.__projectBrowserAct.setWhatsThis(self.trUtf8( |
168 self.__projectBrowserAct.setWhatsThis(self.trUtf8( |
169 """<b>Check Syntax...</b>""" |
169 """<b>Check Syntax...</b>""" |
170 """<p>This checks Python files for syntax errors.</p>""" |
170 """<p>This checks Python files for syntax errors.</p>""" |