Fixed a severe issue assigning a name to a printer in several dialogs. 5_3_x

Fri, 27 Dec 2013 11:39:08 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 27 Dec 2013 11:39:08 +0100
branch
5_3_x
changeset 3162
5cb6da893fad
parent 3157
0515293f05eb
child 3163
9f50365a0870

Fixed a severe issue assigning a name to a printer in several dialogs.
(grafted from c91f976a23954e304688ce67d83e480a407ac4d2)

Graphics/SvgDiagram.py file | annotate | diff | comparison | revisions
Graphics/UMLGraphicsView.py file | annotate | diff | comparison | revisions
Helpviewer/HelpBrowserWV.py file | annotate | diff | comparison | revisions
Helpviewer/HelpTabWidget.py file | annotate | diff | comparison | revisions
Tools/UIPreviewer.py file | annotate | diff | comparison | revisions
--- a/Graphics/SvgDiagram.py	Thu Dec 26 18:36:22 2013 +0100
+++ b/Graphics/SvgDiagram.py	Fri Dec 27 11:39:08 2013 +0100
@@ -274,7 +274,7 @@
             printer.setPageOrder(QPrinter.LastPageFirst)
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         printDialog = QPrintDialog(printer, self)
         if printDialog.exec_():
@@ -305,7 +305,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         preview = QPrintPreviewDialog(printer, self)
         preview.paintRequested[QPrinter].connect(self.__print)
--- a/Graphics/UMLGraphicsView.py	Thu Dec 26 18:36:22 2013 +0100
+++ b/Graphics/UMLGraphicsView.py	Fri Dec 27 11:39:08 2013 +0100
@@ -427,7 +427,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         printDialog = QPrintDialog(printer, self)
         if printDialog.exec_():
@@ -458,7 +458,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         preview = QPrintPreviewDialog(printer, self)
         preview.paintRequested[QPrinter].connect(self.__printPreviewPrint)
--- a/Helpviewer/HelpBrowserWV.py	Thu Dec 26 18:36:22 2013 +0100
+++ b/Helpviewer/HelpBrowserWV.py	Fri Dec 27 11:39:08 2013 +0100
@@ -2145,7 +2145,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         printDialog = QPrintDialog(printer, self)
         if printDialog.exec_() == QDialog.Accepted:
@@ -2181,7 +2181,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         preview = QPrintPreviewDialog(printer, self)
         preview.paintRequested.connect(self.__generatePrintPreviewClickedFrame)
@@ -2213,7 +2213,7 @@
             printer.setColorMode(QPrinter.GrayScale)
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         printer.setOutputFormat(QPrinter.PdfFormat)
         name = self.__clickedFrame.url().path().rsplit('/', 1)[-1]
         if name:
--- a/Helpviewer/HelpTabWidget.py	Thu Dec 26 18:36:22 2013 +0100
+++ b/Helpviewer/HelpTabWidget.py	Fri Dec 27 11:39:08 2013 +0100
@@ -492,7 +492,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         printDialog = QPrintDialog(printer, self)
         if printDialog.exec_() == QDialog.Accepted:
@@ -529,7 +529,7 @@
             printer.setColorMode(QPrinter.GrayScale)
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         printer.setOutputFormat(QPrinter.PdfFormat)
         name = frame.url().path().rsplit('/', 1)[-1]
         if name:
@@ -577,7 +577,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         self.__printPreviewBrowser = browser
         preview = QPrintPreviewDialog(printer, self)
--- a/Tools/UIPreviewer.py	Thu Dec 26 18:36:22 2013 +0100
+++ b/Tools/UIPreviewer.py	Fri Dec 27 11:39:08 2013 +0100
@@ -491,7 +491,7 @@
         
         printerName = Preferences.getPrinter("UIPreviewer/printername")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         printer.setPageSize(
             QPrinter.PageSize(int(settings.value("UIPreviewer/pagesize"))))
         printer.setPageOrder(
@@ -532,7 +532,7 @@
         
         printerName = Preferences.getPrinter("UIPreviewer/printername")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         printer.setPageSize(
             QPrinter.PageSize(int(settings.value("UIPreviewer/pagesize"))))
         printer.setPageOrder(

eric ide

mercurial