Qt,Qt5: do not call setPrinterName() if current printerName is already setted up.part of issue #34569

git-svn-id: trunk@59606 -
This commit is contained in:
zeljko 2018-11-19 17:45:28 +00:00
parent b36dbf345d
commit aacbf95adb
2 changed files with 4 additions and 2 deletions

View File

@ -4435,7 +4435,8 @@ var
Str: WideString;
begin
Str := AValue;
QPrinter_setPrinterName(FHandle, @Str);
if getPrinterName <> AValue then
QPrinter_setPrinterName(FHandle, @Str);
end;
function TQtPrinter.getPrinterName: WideString;

View File

@ -4441,7 +4441,8 @@ var
Str: WideString;
begin
Str := GetUtf8String(AValue);
QPrinter_setPrinterName(FHandle, @Str);
if getPrinterName <> Str then
QPrinter_setPrinterName(FHandle, @Str);
end;
function TQtPrinter.getPrinterName: WideString;