eric6/Project/ProjectResourcesBrowser.py

changeset 7836
2f0d208b8137
parent 7785
9978016560ec
child 7911
4621c9082a43
child 7924
8a96736d465e
equal deleted inserted replaced
7835:0835ed67714b 7836:2f0d208b8137
497 rcfile.write('<!DOCTYPE RCC>\n') 497 rcfile.write('<!DOCTYPE RCC>\n')
498 rcfile.write('<RCC version="1.0">\n') 498 rcfile.write('<RCC version="1.0">\n')
499 rcfile.write('<qresource>\n') 499 rcfile.write('<qresource>\n')
500 rcfile.write('</qresource>\n') 500 rcfile.write('</qresource>\n')
501 rcfile.write('</RCC>\n') 501 rcfile.write('</RCC>\n')
502 except IOError as e: 502 except OSError as e:
503 E5MessageBox.critical( 503 E5MessageBox.critical(
504 self, 504 self,
505 self.tr("New Resource"), 505 self.tr("New Resource"),
506 self.tr( 506 self.tr(
507 "<p>The new resource file <b>{0}</b> could not" 507 "<p>The new resource file <b>{0}</b> could not"
610 ui.showNotification( 610 ui.showNotification(
611 UI.PixmapCache.getPixmap("resourcesCompiler48"), 611 UI.PixmapCache.getPixmap("resourcesCompiler48"),
612 self.tr("Resource Compilation"), 612 self.tr("Resource Compilation"),
613 self.tr("The compilation of the resource file" 613 self.tr("The compilation of the resource file"
614 " was successful.")) 614 " was successful."))
615 except IOError as msg: 615 except OSError as msg:
616 if not self.noDialog: 616 if not self.noDialog:
617 E5MessageBox.information( 617 E5MessageBox.information(
618 self, 618 self,
619 self.tr("Resource Compilation"), 619 self.tr("Resource Compilation"),
620 self.tr( 620 self.tr(
814 @return flag indicating some file is newer (boolean) 814 @return flag indicating some file is newer (boolean)
815 """ 815 """
816 try: 816 try:
817 with open(filename, "r", encoding="utf-8") as f: 817 with open(filename, "r", encoding="utf-8") as f:
818 buf = f.read() 818 buf = f.read()
819 except IOError: 819 except OSError:
820 return False 820 return False
821 821
822 qrcDirName = os.path.dirname(filename) 822 qrcDirName = os.path.dirname(filename)
823 lbuf = "" 823 lbuf = ""
824 for line in buf.splitlines(): 824 for line in buf.splitlines():

eric ide

mercurial