23 # Start-Of-Header |
22 # Start-Of-Header |
24 name = "Assistant Eric Plugin" |
23 name = "Assistant Eric Plugin" |
25 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
24 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
26 autoactivate = True |
25 autoactivate = True |
27 deactivateable = True |
26 deactivateable = True |
28 version = "2.7.0" |
27 version = "3.0.0" |
29 className = "AssistantEricPlugin" |
28 className = "AssistantEricPlugin" |
30 packageName = "AssistantEric" |
29 packageName = "AssistantEric" |
31 shortDescription = "Alternative autocompletion and calltips provider." |
30 shortDescription = "Alternative autocompletion and calltips provider." |
32 longDescription = \ |
31 longDescription = \ |
33 """This plugin implements an alternative autocompletion and""" \ |
32 """This plugin implements an alternative autocompletion and""" \ |
76 |
75 |
77 @return dictionary containing the relevant data |
76 @return dictionary containing the relevant data |
78 """ |
77 """ |
79 return { |
78 return { |
80 "ericAutoCompletionPage": [ |
79 "ericAutoCompletionPage": [ |
81 QApplication.translate("AssistantEricPlugin", "Eric"), |
80 QCoreApplication.translate("AssistantEricPlugin", "Eric"), |
82 os.path.join("AssistantEric", "ConfigurationPages", |
81 os.path.join("AssistantEric", "ConfigurationPages", |
83 "eric.png"), |
82 "eric.png"), |
84 createAutoCompletionPage, "editorAutocompletionPage", None], |
83 createAutoCompletionPage, "editorAutocompletionPage", None], |
85 "ericCallTipsPage": [ |
84 "ericCallTipsPage": [ |
86 QApplication.translate("AssistantEricPlugin", "Eric"), |
85 QCoreApplication.translate("AssistantEricPlugin", "Eric"), |
87 os.path.join("AssistantEric", "ConfigurationPages", |
86 os.path.join("AssistantEric", "ConfigurationPages", |
88 "eric.png"), |
87 "eric.png"), |
89 createCallTipsPage, "editorCalltipsPage", None], |
88 createCallTipsPage, "editorCalltipsPage", None], |
90 } |
89 } |
91 |
90 |
137 |
136 |
138 @return flag indicating a suitable version (boolean) |
137 @return flag indicating a suitable version (boolean) |
139 """ |
138 """ |
140 global error |
139 global error |
141 |
140 |
142 suitable = self.__ui.versionIsNewer("5.0.99", "20100811") |
141 suitable = self.__ui.versionIsNewer("5.99.99", "20140704") |
143 if not suitable: |
142 if not suitable: |
144 error = self.trUtf8("Your version of eric5 is not supported.") |
143 error = self.tr("Your version of eric6 is not supported.") |
145 return suitable |
144 return suitable |
146 |
145 |
147 def __checkQSql(self): |
146 def __checkQSql(self): |
148 """ |
147 """ |
149 Private method to perform some checks on QSql. |
148 Private method to perform some checks on QSql. |
151 @return flag indicating QSql is ok (boolean) |
150 @return flag indicating QSql is ok (boolean) |
152 """ |
151 """ |
153 global error |
152 global error |
154 |
153 |
155 try: |
154 try: |
156 from PyQt4.QtSql import QSqlDatabase |
155 from PyQt5.QtSql import QSqlDatabase |
157 except ImportError: |
156 except ImportError: |
158 error = self.trUtf8("PyQt4.QtSql is not available.") |
157 error = self.tr("PyQt5.QtSql is not available.") |
159 return False |
158 return False |
160 |
159 |
161 drivers = QSqlDatabase.drivers() |
160 drivers = QSqlDatabase.drivers() |
162 if "QSQLITE" in drivers: |
161 if "QSQLITE" in drivers: |
163 return True |
162 return True |
164 else: |
163 else: |
165 error = self.trUtf8("The SQLite database driver is not available.") |
164 error = self.tr("The SQLite database driver is not available.") |
166 return False |
165 return False |
167 |
166 |
168 def activate(self): |
167 def activate(self): |
169 """ |
168 """ |
170 Public method to activate this plugin. |
169 Public method to activate this plugin. |