QPrintSupport: do not bypass a base class' virtual
QAbstractPrintDialog (a QDialog subclass) has an interesting override of exec(): a pure virtual, without a body. The UNIX subclass was therefore forced to override it, but since it did not need to do anything with it, it had to call QDialog::exec (bypassing the direct base, otherwise it would cause a pure virtual call). Eliminate the pure virtual override. This should be BC; the layout of the vtable does not change, merely its contents. Change-Id: I84ac23c938f1934f699df032ef1bde0d6df77784 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
83971776c7
commit
92479ed9b7
@ -84,8 +84,6 @@ public:
|
|||||||
explicit QAbstractPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
|
explicit QAbstractPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
|
||||||
~QAbstractPrintDialog();
|
~QAbstractPrintDialog();
|
||||||
|
|
||||||
int exec() override = 0;
|
|
||||||
|
|
||||||
// obsolete
|
// obsolete
|
||||||
void addEnabledOption(PrintDialogOption option);
|
void addEnabledOption(PrintDialogOption option);
|
||||||
void setEnabledOptions(PrintDialogOptions options);
|
void setEnabledOptions(PrintDialogOptions options);
|
||||||
|
@ -1082,7 +1082,7 @@ void QPrintDialog::setVisible(bool visible)
|
|||||||
|
|
||||||
int QPrintDialog::exec()
|
int QPrintDialog::exec()
|
||||||
{
|
{
|
||||||
return QDialog::exec();
|
return QAbstractPrintDialog::exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QPrintDialog::accept()
|
void QPrintDialog::accept()
|
||||||
|
Loading…
Reference in New Issue
Block a user