src/eric7/QScintilla/Editor.py

branch
eric7
changeset 9535
8b5402794fb6
parent 9517
d73c3a1e432b
child 9549
67295777d9fe
child 9563
8ee667840224
equal deleted inserted replaced
9534:5ed8445f3b31 9535:8b5402794fb6
6134 info. 6134 info.
6135 6135
6136 @return file name of the coverage file 6136 @return file name of the coverage file
6137 @rtype str 6137 @rtype str
6138 """ 6138 """
6139 files = set() 6139 files = []
6140 6140
6141 if bool(self.__coverageFile): 6141 if bool(self.__coverageFile):
6142 # return the path of a previously used coverage file 6142 # return the path of a previously used coverage file
6143 return self.__coverageFile 6143 return self.__coverageFile
6144 6144
6147 if self.project.isOpen() and self.project.isProjectCategory( 6147 if self.project.isOpen() and self.project.isProjectCategory(
6148 self.fileName, "SOURCES" 6148 self.fileName, "SOURCES"
6149 ): 6149 ):
6150 pfn = self.project.getMainScript(True) 6150 pfn = self.project.getMainScript(True)
6151 if pfn is not None: 6151 if pfn is not None:
6152 files |= set(Utilities.getCoverageFileNames(pfn)) 6152 files.extend(
6153 [f for f in Utilities.getCoverageFileNames(pfn) if f not in files]
6154 )
6153 6155
6154 # now check, if there are coverage files belonging to ourselves 6156 # now check, if there are coverage files belonging to ourselves
6155 fn = self.getFileName() 6157 fn = self.getFileName()
6156 if fn is not None: 6158 if fn is not None:
6157 files |= set(Utilities.getCoverageFileNames(fn)) 6159 files.extend(
6160 [f for f in Utilities.getCoverageFileNames(fn) if f not in files]
6161 )
6158 6162
6159 files = list(files) 6163 files = list(files)
6160 if files: 6164 if files:
6161 if len(files) > 1: 6165 if len(files) > 1:
6162 cfn, ok = QInputDialog.getItem( 6166 cfn, ok = QInputDialog.getItem(
6317 """ 6321 """
6318 Private method to handle the show profile data context menu action. 6322 Private method to handle the show profile data context menu action.
6319 """ 6323 """
6320 from eric7.DataViews.PyProfileDialog import PyProfileDialog 6324 from eric7.DataViews.PyProfileDialog import PyProfileDialog
6321 6325
6322 files = set() 6326 files = []
6323 6327
6324 # first check if the file belongs to a project and there is 6328 # first check if the file belongs to a project and there is
6325 # a project profile file 6329 # a project profile file
6326 if self.project.isOpen() and self.project.isProjectCategory( 6330 if self.project.isOpen() and self.project.isProjectCategory(
6327 self.fileName, "SOURCES" 6331 self.fileName, "SOURCES"
6328 ): 6332 ):
6329 fn = self.project.getMainScript(True) 6333 fn = self.project.getMainScript(True)
6330 if fn is not None: 6334 if fn is not None:
6331 files |= set(Utilities.getProfileFileNames(fn)) 6335 files.extend(
6336 [f for f in Utilities.getProfileFileNames(fn) if f not in files]
6337 )
6332 6338
6333 # now check, if there are profile files belonging to ourselves 6339 # now check, if there are profile files belonging to ourselves
6334 fn = self.getFileName() 6340 fn = self.getFileName()
6335 if fn is not None: 6341 if fn is not None:
6336 files |= set(Utilities.getProfileFileNames(fn)) 6342 files.extend(
6343 [f for f in Utilities.getProfileFileNames(fn) if f not in files]
6344 )
6337 6345
6338 files = list(files) 6346 files = list(files)
6339 if files: 6347 if files:
6340 if len(files) > 1: 6348 if len(files) > 1:
6341 fn, ok = QInputDialog.getItem( 6349 fn, ok = QInputDialog.getItem(

eric ide

mercurial