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:
Giuseppe D'Angelo 2019-05-13 21:59:06 +02:00 committed by Marc Mutz
parent 83971776c7
commit 92479ed9b7
2 changed files with 1 additions and 3 deletions

View File

@ -84,8 +84,6 @@ public:
explicit QAbstractPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
~QAbstractPrintDialog();
int exec() override = 0;
// obsolete
void addEnabledOption(PrintDialogOption option);
void setEnabledOptions(PrintDialogOptions options);

View File

@ -1082,7 +1082,7 @@ void QPrintDialog::setVisible(bool visible)
int QPrintDialog::exec()
{
return QDialog::exec();
return QAbstractPrintDialog::exec();
}
void QPrintDialog::accept()