Project/ProjectResourcesBrowser.py

changeset 53
c3eb7cc1ff8b
parent 45
9a18f4dbb493
child 55
b5c84934de9c
equal deleted inserted replaced
52:ba69827929ee 53:c3eb7cc1ff8b
12 import shutil 12 import shutil
13 13
14 from PyQt4.QtCore import * 14 from PyQt4.QtCore import *
15 from PyQt4.QtGui import * 15 from PyQt4.QtGui import *
16 16
17 from E4Gui.E4Application import e4App 17 from E4Gui.E4Application import e5App
18 18
19 from .ProjectBrowserModel import ProjectBrowserFileItem, \ 19 from .ProjectBrowserModel import ProjectBrowserFileItem, \
20 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \ 20 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \
21 ProjectBrowserResourceType 21 ProjectBrowserResourceType
22 from .ProjectBaseBrowser import ProjectBaseBrowser 22 from .ProjectBaseBrowser import ProjectBaseBrowser
504 504
505 @param exitCode exit code of the process (integer) 505 @param exitCode exit code of the process (integer)
506 @param exitStatus exit status of the process (QProcess.ExitStatus) 506 @param exitStatus exit status of the process (QProcess.ExitStatus)
507 """ 507 """
508 self.compileRunning = False 508 self.compileRunning = False
509 e4App().getObject("ViewManager").enableEditorsCheckFocusIn(True) 509 e5App().getObject("ViewManager").enableEditorsCheckFocusIn(True)
510 if exitStatus == QProcess.NormalExit and exitCode == 0 and self.buf: 510 if exitStatus == QProcess.NormalExit and exitCode == 0 and self.buf:
511 ofn = os.path.join(self.project.ppath, self.compiledFile) 511 ofn = os.path.join(self.project.ppath, self.compiledFile)
512 try: 512 try:
513 f = open(ofn, "w", encoding = "utf-8") 513 f = open(ofn, "w", encoding = "utf-8")
514 for line in self.buf.splitlines(): 514 for line in self.buf.splitlines():
597 self.noDialog = noDialog 597 self.noDialog = noDialog
598 self.compileProc.start(rcc, args) 598 self.compileProc.start(rcc, args)
599 procStarted = self.compileProc.waitForStarted() 599 procStarted = self.compileProc.waitForStarted()
600 if procStarted: 600 if procStarted:
601 self.compileRunning = True 601 self.compileRunning = True
602 e4App().getObject("ViewManager").enableEditorsCheckFocusIn(False) 602 e5App().getObject("ViewManager").enableEditorsCheckFocusIn(False)
603 return self.compileProc 603 return self.compileProc
604 else: 604 else:
605 self.compileRunning = False 605 self.compileRunning = False
606 if progress is not None: 606 if progress is not None:
607 progress.cancel() 607 progress.cancel()

eric ide

mercurial