AssistantEric/APIsManager.py

changeset 173
ced7c270bf6b
parent 172
c9e64334670c
child 177
25cb41783971
equal deleted inserted replaced
172:c9e64334670c 173:ced7c270bf6b
165 query = QSqlQuery(db) 165 query = QSqlQuery(db)
166 query.prepare(self.file_loaded_stmt) 166 query.prepare(self.file_loaded_stmt)
167 query.bindValue(":file", apiFile) 167 query.bindValue(":file", apiFile)
168 query.exec() 168 query.exec()
169 if query.next() and query.isValid(): # __IGNORE_WARNING_M513__ 169 if query.next() and query.isValid(): # __IGNORE_WARNING_M513__
170 loadTime = QDateTime.fromString(query.value(0), Qt.ISODate) 170 loadTime = QDateTime.fromString(
171 query.value(0), Qt.DateFormat.ISODate)
171 else: 172 else:
172 loadTime = QDateTime(1970, 1, 1, 0, 0) 173 loadTime = QDateTime(1970, 1, 1, 0, 0)
173 query.finish() 174 query.finish()
174 del query 175 del query
175 finally: 176 finally:
1098 projectType = self.__projectType 1099 projectType = self.__projectType
1099 self.__worker = DbAPIsWorker(self, self.__language, apiFiles, 1100 self.__worker = DbAPIsWorker(self, self.__language, apiFiles,
1100 self._apiDbName(), projectPath, 1101 self._apiDbName(), projectPath,
1101 projectType=projectType) 1102 projectType=projectType)
1102 self.__worker.processing.connect( 1103 self.__worker.processing.connect(
1103 self.__processingStatus, Qt.QueuedConnection) 1104 self.__processingStatus, Qt.ConnectionType.QueuedConnection)
1104 self.__worker.start() 1105 self.__worker.start()
1105 1106
1106 def __processQueue(self): 1107 def __processQueue(self):
1107 """ 1108 """
1108 Private slot to process the queue of files to load. 1109 Private slot to process the queue of files to load.
1122 projectType = self.__projectType 1123 projectType = self.__projectType
1123 self.__worker = DbAPIsWorker(self, self.__language, apiFiles, 1124 self.__worker = DbAPIsWorker(self, self.__language, apiFiles,
1124 self._apiDbName(), projectPath, 1125 self._apiDbName(), projectPath,
1125 projectType=projectType, refresh=True) 1126 projectType=projectType, refresh=True)
1126 self.__worker.processing.connect( 1127 self.__worker.processing.connect(
1127 self.__processingStatus, Qt.QueuedConnection) 1128 self.__processingStatus, Qt.ConnectionType.QueuedConnection)
1128 self.__worker.start() 1129 self.__worker.start()
1129 1130
1130 def getLexer(self): 1131 def getLexer(self):
1131 """ 1132 """
1132 Public method to return a reference to our lexer object. 1133 Public method to return a reference to our lexer object.

eric ide

mercurial