Fix build with -no-feature-formlayout
Change-Id: I9f552942c206f16ef5e8b96cbf7255a54ff83470 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 34a0f2251a4041e9a77e65383fa97daa07294f19) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
85a8d986e7
commit
dd76ed90ed
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <QtPrintSupport/QPrinterInfo>
|
#include <QtPrintSupport/QPrinterInfo>
|
||||||
|
|
||||||
#if QT_CONFIG(dialogbuttonbox)
|
#if QT_CONFIG(dialogbuttonbox) && QT_CONFIG(formlayout)
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#if QT_CONFIG(dialogbuttonbox)
|
#if QT_CONFIG(dialogbuttonbox) && QT_CONFIG(formlayout)
|
||||||
static const char *getPasswordCB(const char */*prompt*/, http_t *http, const char */*method*/, const char *resource, void */*user_data*/)
|
static const char *getPasswordCB(const char */*prompt*/, http_t *http, const char */*method*/, const char *resource, void */*user_data*/)
|
||||||
{
|
{
|
||||||
// cups doesn't free the const char * we return so keep around
|
// cups doesn't free the const char * we return so keep around
|
||||||
@ -89,16 +89,16 @@ static const char *getPasswordCB(const char */*prompt*/, http_t *http, const cha
|
|||||||
|
|
||||||
return password.constData();
|
return password.constData();
|
||||||
}
|
}
|
||||||
#endif // QT_CONFIG(dialogbuttonbox)
|
#endif // QT_CONFIG(dialogbuttonbox) && QT_CONFIG(formlayout)
|
||||||
|
|
||||||
QCupsPrinterSupport::QCupsPrinterSupport()
|
QCupsPrinterSupport::QCupsPrinterSupport()
|
||||||
: QPlatformPrinterSupport()
|
: QPlatformPrinterSupport()
|
||||||
{
|
{
|
||||||
#if QT_CONFIG(dialogbuttonbox)
|
#if QT_CONFIG(dialogbuttonbox) && QT_CONFIG(formlayout)
|
||||||
// Only show password dialog if GUI application
|
// Only show password dialog if GUI application
|
||||||
if (qobject_cast<QGuiApplication*>(QCoreApplication::instance()))
|
if (qobject_cast<QGuiApplication*>(QCoreApplication::instance()))
|
||||||
cupsSetPasswordCB2(getPasswordCB, nullptr /* user_data */ );
|
cupsSetPasswordCB2(getPasswordCB, nullptr /* user_data */ );
|
||||||
#endif // QT_CONFIG(dialogbuttonbox)
|
#endif // QT_CONFIG(dialogbuttonbox) && QT_CONFIG(formlayout)
|
||||||
}
|
}
|
||||||
|
|
||||||
QCupsPrinterSupport::~QCupsPrinterSupport()
|
QCupsPrinterSupport::~QCupsPrinterSupport()
|
||||||
|
@ -49,7 +49,7 @@ qt_feature("printdialog" PUBLIC
|
|||||||
SECTION "Dialogs"
|
SECTION "Dialogs"
|
||||||
LABEL "QPrintDialog"
|
LABEL "QPrintDialog"
|
||||||
PURPOSE "Provides a dialog widget for specifying printer configuration."
|
PURPOSE "Provides a dialog widget for specifying printer configuration."
|
||||||
CONDITION ( QT_FEATURE_buttongroup ) AND ( QT_FEATURE_checkbox ) AND ( QT_FEATURE_combobox ) AND ( QT_FEATURE_dialog ) AND ( QT_FEATURE_datetimeedit ) AND ( QT_FEATURE_dialogbuttonbox ) AND ( QT_FEATURE_printer ) AND ( QT_FEATURE_radiobutton ) AND ( QT_FEATURE_spinbox ) AND ( QT_FEATURE_tabwidget ) AND ( QT_FEATURE_treeview )
|
CONDITION ( QT_FEATURE_buttongroup ) AND ( QT_FEATURE_checkbox ) AND ( QT_FEATURE_combobox ) AND ( QT_FEATURE_dialog ) AND ( QT_FEATURE_datetimeedit ) AND ( QT_FEATURE_dialogbuttonbox ) AND ( QT_FEATURE_formlayout ) AND ( QT_FEATURE_printer ) AND ( QT_FEATURE_radiobutton ) AND ( QT_FEATURE_spinbox ) AND ( QT_FEATURE_tabwidget ) AND ( QT_FEATURE_treeview )
|
||||||
)
|
)
|
||||||
qt_feature_definition("printdialog" "QT_NO_PRINTDIALOG" NEGATE VALUE "1")
|
qt_feature_definition("printdialog" "QT_NO_PRINTDIALOG" NEGATE VALUE "1")
|
||||||
qt_feature("printpreviewdialog" PUBLIC
|
qt_feature("printpreviewdialog" PUBLIC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user