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:
Tasuku Suzuki 2023-02-10 17:30:21 +09:00 committed by Qt Cherry-pick Bot
parent 85a8d986e7
commit dd76ed90ed
2 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@
#include <QtPrintSupport/QPrinterInfo>
#if QT_CONFIG(dialogbuttonbox)
#if QT_CONFIG(dialogbuttonbox) && QT_CONFIG(formlayout)
#include <QGuiApplication>
#include <QDialog>
#include <QDialogButtonBox>
@ -27,7 +27,7 @@
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*/)
{
// 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();
}
#endif // QT_CONFIG(dialogbuttonbox)
#endif // QT_CONFIG(dialogbuttonbox) && QT_CONFIG(formlayout)
QCupsPrinterSupport::QCupsPrinterSupport()
: QPlatformPrinterSupport()
{
#if QT_CONFIG(dialogbuttonbox)
#if QT_CONFIG(dialogbuttonbox) && QT_CONFIG(formlayout)
// Only show password dialog if GUI application
if (qobject_cast<QGuiApplication*>(QCoreApplication::instance()))
cupsSetPasswordCB2(getPasswordCB, nullptr /* user_data */ );
#endif // QT_CONFIG(dialogbuttonbox)
#endif // QT_CONFIG(dialogbuttonbox) && QT_CONFIG(formlayout)
}
QCupsPrinterSupport::~QCupsPrinterSupport()

View File

@ -49,7 +49,7 @@ qt_feature("printdialog" PUBLIC
SECTION "Dialogs"
LABEL "QPrintDialog"
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("printpreviewdialog" PUBLIC