QtPrintSupport: Initialize UI of widget-based dialog.

Remove virtual from QPageSetupDialogPrivate::init() (which was
called from the constructor) and keep it as a non-virtual
function for QUnixPageSetupDialogPrivate.

Fix breakage introduced by
54b899f448 .

Task-number: QTBUG-31790
Change-Id: I6d552bc250e4d72c1bb50eceadd2852b1b957aea
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
bb10
Friedemann Kleint 2013-06-25 12:01:43 +02:00 committed by The Qt Project
parent d849f3332f
commit 6e2d7a612b
3 changed files with 4 additions and 6 deletions

View File

@ -104,11 +104,6 @@ QT_BEGIN_NAMESPACE
QPageSetupDialogPrivate::QPageSetupDialogPrivate(QPrinter *prntr) : printer(0), ownsPrinter(false)
{
setPrinter(prntr);
init();
}
void QPageSetupDialogPrivate::init()
{
}
void QPageSetupDialogPrivate::setPrinter(QPrinter *newPrinter)

View File

@ -73,7 +73,6 @@ class QPageSetupDialogPrivate : public QDialogPrivate
public:
QPageSetupDialogPrivate(QPrinter *printer);
virtual void init();
void setPrinter(QPrinter *newPrinter);
QPrinter *printer;

View File

@ -574,14 +574,18 @@ void QPageSetupWidget::setRightMargin(double newValue)
QPageSetupDialog::QPageSetupDialog(QPrinter *printer, QWidget *parent)
: QDialog(*(new QUnixPageSetupDialogPrivate(printer)), parent)
{
Q_D(QPageSetupDialog);
setWindowTitle(QCoreApplication::translate("QPrintPreviewDialog", "Page Setup"));
static_cast<QUnixPageSetupDialogPrivate *>(d)->init();
}
QPageSetupDialog::QPageSetupDialog(QWidget *parent)
: QDialog(*(new QUnixPageSetupDialogPrivate(0)), parent)
{
Q_D(QPageSetupDialog);
setWindowTitle(QCoreApplication::translate("QPrintPreviewDialog", "Page Setup"));
static_cast<QUnixPageSetupDialogPrivate *>(d)->init();
}
int QPageSetupDialog::exec()