409 |
409 |
410 def _contextMenuRequested(self, coord): |
410 def _contextMenuRequested(self, coord): |
411 """ |
411 """ |
412 Protected slot to show the context menu. |
412 Protected slot to show the context menu. |
413 |
413 |
414 @param coord the position of the mouse pointer (QPoint) |
414 @param coord the position of the mouse pointer |
|
415 @type QPoint |
415 """ |
416 """ |
416 if not self.project.isOpen(): |
417 if not self.project.isOpen(): |
417 return |
418 return |
418 |
419 |
419 with contextlib.suppress(Exception): # secok |
420 with contextlib.suppress(Exception): # secok |
654 |
655 |
655 def __compileQRCDone(self, exitCode, exitStatus): |
656 def __compileQRCDone(self, exitCode, exitStatus): |
656 """ |
657 """ |
657 Private slot to handle the finished signal of the compile process. |
658 Private slot to handle the finished signal of the compile process. |
658 |
659 |
659 @param exitCode exit code of the process (integer) |
660 @param exitCode exit code of the process |
660 @param exitStatus exit status of the process (QProcess.ExitStatus) |
661 @type int |
|
662 @param exitStatus exit status of the process |
|
663 @type QProcess.ExitStatus |
661 """ |
664 """ |
662 self.compileRunning = False |
665 self.compileRunning = False |
663 ericApp().getObject("ViewManager").enableEditorsCheckFocusIn(True) |
666 ericApp().getObject("ViewManager").enableEditorsCheckFocusIn(True) |
664 ui = ericApp().getObject("UserInterface") |
667 ui = ericApp().getObject("UserInterface") |
665 if ( |
668 if ( |
706 def __compileQRC(self, fn, noDialog=False, progress=None): |
709 def __compileQRC(self, fn, noDialog=False, progress=None): |
707 """ |
710 """ |
708 Private method to compile a .qrc file to a .py file. |
711 Private method to compile a .qrc file to a .py file. |
709 |
712 |
710 @param fn filename of the .ui file to be compiled |
713 @param fn filename of the .ui file to be compiled |
|
714 @type str |
711 @param noDialog flag indicating silent operations |
715 @param noDialog flag indicating silent operations |
|
716 @type bool |
712 @param progress reference to the progress dialog |
717 @param progress reference to the progress dialog |
713 @return reference to the compile process (QProcess) |
718 @type QProgressDialog |
|
719 @return reference to the compile process |
|
720 @rtype QProcess |
714 """ |
721 """ |
715 self.compileProc = QProcess() |
722 self.compileProc = QProcess() |
716 args = [] |
723 args = [] |
717 self.__buf = [] |
724 self.__buf = [] |
718 |
725 |
874 def __checkResourcesNewer(self, filename, mtime): |
881 def __checkResourcesNewer(self, filename, mtime): |
875 """ |
882 """ |
876 Private method to check, if any file referenced in a resource |
883 Private method to check, if any file referenced in a resource |
877 file is newer than a given time. |
884 file is newer than a given time. |
878 |
885 |
879 @param filename filename of the resource file (string) |
886 @param filename filename of the resource file |
|
887 @type str |
880 @param mtime modification time to check against |
888 @param mtime modification time to check against |
881 @return flag indicating some file is newer (boolean) |
889 @type int |
|
890 @return flag indicating some file is newer |
|
891 @rtype boolean) |
882 """ |
892 """ |
883 try: |
893 try: |
884 with open(filename, "r", encoding="utf-8") as f: |
894 with open(filename, "r", encoding="utf-8") as f: |
885 buf = f.read() |
895 buf = f.read() |
886 except OSError: |
896 except OSError: |