Fix build without features.cupsjobwidget

Change-Id: I1b49a9f63a6a071457a3b9305dc87abe5f3b5b19
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
bb10
Tasuku Suzuki 2017-04-27 12:09:06 +09:00 committed by Stephan Binner
parent dd03817ab6
commit da1079e51c
3 changed files with 10 additions and 8 deletions

View File

@ -38,7 +38,7 @@
****************************************************************************/
#include "qplatformdefs.h"
#include <QtPrintSupport/qtprintsupportglobal.h>
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
#ifndef QT_NO_PRINTDIALOG
@ -66,8 +66,10 @@
#ifndef QT_NO_CUPS
#include <private/qcups_p.h>
#if QT_CONFIG(cupsjobwidget)
#include "qcupsjobwidget_p.h"
#endif
#endif
/*
@ -129,7 +131,7 @@ private:
friend class QUnixPrintWidgetPrivate;
Ui::QPrintPropertiesWidget widget;
QDialogButtonBox *m_buttons;
#ifndef QT_NO_CUPS
#if QT_CONFIG(cupsjobwidget)
QCupsJobWidget *m_jobOptions;
#endif
};
@ -247,7 +249,7 @@ QPrintPropertiesDialog::QPrintPropertiesDialog(QAbstractPrintDialog *parent)
connect(m_buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(accept()));
connect(m_buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(reject()));
#ifndef QT_NO_CUPS
#if QT_CONFIG(cupsjobwidget)
m_jobOptions = new QCupsJobWidget();
widget.tabs->addTab(m_jobOptions, tr("Job Options"));
#endif
@ -260,7 +262,7 @@ QPrintPropertiesDialog::~QPrintPropertiesDialog()
void QPrintPropertiesDialog::applyPrinterProperties(QPrinter *p)
{
widget.pageSetup->setPrinter(p);
#ifndef QT_NO_CUPS
#if QT_CONFIG(cupsjobwidget)
m_jobOptions->setPrinter(p);
#endif
}
@ -268,7 +270,7 @@ void QPrintPropertiesDialog::applyPrinterProperties(QPrinter *p)
void QPrintPropertiesDialog::setupPrinter() const
{
widget.pageSetup->setupPrinter();
#ifndef QT_NO_CUPS
#if QT_CONFIG(cupsjobwidget)
m_jobOptions->setupPrinter();
#endif
}

View File

@ -53,5 +53,6 @@
#include <QtPrintSupport/qtprintsupportglobal.h>
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include <QtPrintSupport/private/qtprintsupport-config_p.h>
#endif // QTPRINTSUPPORTGLOBAL_P_H

View File

@ -56,7 +56,8 @@
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
#include <private/qcups_p.h>
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_CUPS) && !defined(QT_NO_DATETIMEEDIT)
QT_REQUIRE_CONFIG(cupsjobwidget);
#include <ui_qcupsjobwidget.h>
QT_BEGIN_NAMESPACE
@ -109,6 +110,4 @@ private:
QT_END_NAMESPACE
#endif // QT_NO_PRINTER / QT_NO_CUPS
#endif // QCUPSJOBWIDGET_P_H