11 |
11 |
12 from PyQt4.QtCore import * |
12 from PyQt4.QtCore import * |
13 from PyQt4.QtGui import * |
13 from PyQt4.QtGui import * |
14 |
14 |
15 from E5Gui.E5Application import e5App |
15 from E5Gui.E5Application import e5App |
|
16 from E5Gui import E5MessageBox |
16 |
17 |
17 from .ProjectBrowserModel import ProjectBrowserFileItem, \ |
18 from .ProjectBrowserModel import ProjectBrowserFileItem, \ |
18 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \ |
19 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \ |
19 ProjectBrowserResourceType |
20 ProjectBrowserResourceType |
20 from .ProjectBaseBrowser import ProjectBaseBrowser |
21 from .ProjectBaseBrowser import ProjectBaseBrowser |
519 f.write(line + "\n") |
520 f.write(line + "\n") |
520 f.close() |
521 f.close() |
521 if self.compiledFile not in self.project.pdata["SOURCES"]: |
522 if self.compiledFile not in self.project.pdata["SOURCES"]: |
522 self.project.appendFile(ofn) |
523 self.project.appendFile(ofn) |
523 if not self.noDialog: |
524 if not self.noDialog: |
524 QMessageBox.information(None, |
525 E5MessageBox.information(self, |
525 self.trUtf8("Resource Compilation"), |
526 self.trUtf8("Resource Compilation"), |
526 self.trUtf8("The compilation of the resource file" |
527 self.trUtf8("The compilation of the resource file" |
527 " was successful.")) |
528 " was successful.")) |
528 except IOError as msg: |
529 except IOError as msg: |
529 if not self.noDialog: |
530 if not self.noDialog: |
530 QMessageBox.information(None, |
531 E5MessageBox.information(self, |
531 self.trUtf8("Resource Compilation"), |
532 self.trUtf8("Resource Compilation"), |
532 self.trUtf8("<p>The compilation of the resource file failed.</p>" |
533 self.trUtf8("<p>The compilation of the resource file failed.</p>" |
533 "<p>Reason: {0}</p>").format(str(msg))) |
534 "<p>Reason: {0}</p>").format(str(msg))) |
534 else: |
535 else: |
535 if not self.noDialog: |
536 if not self.noDialog: |
536 QMessageBox.information(None, |
537 E5MessageBox.information(self, |
537 self.trUtf8("Resource Compilation"), |
538 self.trUtf8("Resource Compilation"), |
538 self.trUtf8("The compilation of the resource file failed.")) |
539 self.trUtf8("The compilation of the resource file failed.")) |
539 self.compileProc = None |
540 self.compileProc = None |
540 |
541 |
541 def __compileQRC(self, fn, noDialog = False, progress = None): |
542 def __compileQRC(self, fn, noDialog = False, progress = None): |