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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 27 Dec 2013 11:39:08 +0100
changeset 3158
c91f976a2395
parent 3156
86a6528fea9f
child 3160
209a07d7e401

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

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:35:47 2013 +0100
+++ b/Graphics/SvgDiagram.py	Fri Dec 27 11:39:08 2013 +0100
@@ -283,7 +283,7 @@
             printer.setPageOrder(QPrinter.LastPageFirst)
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         printDialog = QPrintDialog(printer, self)
         if printDialog.exec_():
@@ -314,7 +314,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:35:47 2013 +0100
+++ b/Graphics/UMLGraphicsView.py	Fri Dec 27 11:39:08 2013 +0100
@@ -418,7 +418,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         printDialog = QPrintDialog(printer, self)
         if printDialog.exec_():
@@ -449,7 +449,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:35:47 2013 +0100
+++ b/Helpviewer/HelpBrowserWV.py	Fri Dec 27 11:39:08 2013 +0100
@@ -2310,7 +2310,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         printDialog = QPrintDialog(printer, self)
         if printDialog.exec_() == QDialog.Accepted:
@@ -2348,7 +2348,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         preview = QPrintPreviewDialog(printer, self)
         preview.paintRequested.connect(self.__generatePrintPreviewClickedFrame)
@@ -2382,7 +2382,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:35:47 2013 +0100
+++ b/Helpviewer/HelpTabWidget.py	Fri Dec 27 11:39:08 2013 +0100
@@ -530,7 +530,7 @@
         )
         printerName = Preferences.getPrinter("PrinterName")
         if printerName:
-            self.setPrinterName(printerName)
+            printer.setPrinterName(printerName)
         
         printDialog = QPrintDialog(printer, self)
         if printDialog.exec_() == QDialog.Accepted:
@@ -569,7 +569,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:
@@ -619,7 +619,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:35:47 2013 +0100
+++ b/Tools/UIPreviewer.py	Fri Dec 27 11:39:08 2013 +0100
@@ -520,7 +520,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(
@@ -563,7 +563,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