128 preparedAPIsInfo = QFileInfo(preparedAPIs) |
128 preparedAPIsInfo = QFileInfo(preparedAPIs) |
129 if not preparedAPIsInfo.exists(): |
129 if not preparedAPIsInfo.exists(): |
130 needsPreparation = True |
130 needsPreparation = True |
131 else: |
131 else: |
132 preparedAPIsTime = preparedAPIsInfo.lastModified() |
132 preparedAPIsTime = preparedAPIsInfo.lastModified() |
133 apifiles = Preferences.getEditorAPI(self.__language) |
133 apifiles = sorted(Preferences.getEditorAPI(self.__language)) |
134 apifiles.sort() |
|
135 if self.__apifiles != apifiles: |
134 if self.__apifiles != apifiles: |
136 needsPreparation = True |
135 needsPreparation = True |
137 for apifile in apifiles: |
136 for apifile in apifiles: |
138 if QFileInfo(apifile).lastModified() > preparedAPIsTime: |
137 if QFileInfo(apifile).lastModified() > preparedAPIsTime: |
139 needsPreparation = True |
138 needsPreparation = True |
197 |
196 |
198 def reloadAPIs(self): |
197 def reloadAPIs(self): |
199 """ |
198 """ |
200 Public slot to reload the api information. |
199 Public slot to reload the api information. |
201 """ |
200 """ |
202 for api in self.__apis.values(): |
201 for api in list(self.__apis.values()): |
203 api and api.reloadAPIs() |
202 api and api.reloadAPIs() |
204 |
203 |
205 def getAPIs(self, language, forPreparation = False): |
204 def getAPIs(self, language, forPreparation = False): |
206 """ |
205 """ |
207 Public method to get an apis object for autocompletion/calltips. |
206 Public method to get an apis object for autocompletion/calltips. |