QPrintDialog - Fix casting print engine
We want to cast the print engine, not the paint engine. Change-Id: Ia8f11f0215fa066417118fbfbcc921a60282d713 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
parent
0da841bc33
commit
42fa59b151
@ -187,7 +187,7 @@ QPrintDialog::QPrintDialog(QPrinter *printer, QWidget *parent)
|
||||
Q_D(QPrintDialog);
|
||||
if (!warnIfNotNative(d->printer))
|
||||
return;
|
||||
d->ep = static_cast<QWin32PrintEngine *>(d->printer->paintEngine())->d_func();
|
||||
d->ep = static_cast<QWin32PrintEngine *>(d->printer->printEngine())->d_func();
|
||||
setAttribute(Qt::WA_DontShowOnScreen);
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ QPrintDialog::QPrintDialog(QWidget *parent)
|
||||
Q_D(QPrintDialog);
|
||||
if (!warnIfNotNative(d->printer))
|
||||
return;
|
||||
d->ep = static_cast<QWin32PrintEngine *>(d->printer->paintEngine())->d_func();
|
||||
d->ep = static_cast<QWin32PrintEngine *>(d->printer->printEngine())->d_func();
|
||||
setAttribute(Qt::WA_DontShowOnScreen);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user