From d82e23e775c74f9993f9b8599c928e56abde6808 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Fri, 20 Jan 2017 14:41:46 +0100 Subject: Make sure features are defined before testing them Include the file defining the feature before testing whether the feature exists. Also use the new feature macro to make sure this bug doesn't happen again. Change-Id: I204836fee59b143a7ce7d256a7aed223c4d0ceb1 Reviewed-by: Lars Knoll --- src/widgets/dialogs/qfontdialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widgets/dialogs') diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp index 3a833e85c0..955e93a26f 100644 --- a/src/widgets/dialogs/qfontdialog.cpp +++ b/src/widgets/dialogs/qfontdialog.cpp @@ -38,10 +38,10 @@ ****************************************************************************/ #include "qwindowdefs.h" +#include "qfontdialog.h" -#ifndef QT_NO_FONTDIALOG +#if QT_CONFIG(fontdialog) -#include "qfontdialog.h" #include "qfontdialog_p.h" #include @@ -1051,4 +1051,4 @@ QT_END_NAMESPACE #include "qfontdialog.moc" #include "moc_qfontdialog.cpp" -#endif // QT_NO_FONTDIALOG +#endif // QT_CONFIG(fontdialog) -- cgit v1.2.3 From 2bbeebf80c127979d1859c8486774df22be4c3f2 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Wed, 25 Jan 2017 10:10:07 +0100 Subject: Fix build with -no-feature-textedit Change-Id: I4a75c134803043180c57287ca352e26e3422204c Reviewed-by: Lars Knoll --- src/widgets/dialogs/qmessagebox.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/widgets/dialogs') diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 57b3f47863..98d070e493 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -336,8 +336,10 @@ void QMessageBoxPrivate::setupLayout() #else grid->addWidget(buttonBox, grid->rowCount(), 0, 1, grid->columnCount()); #endif +#if QT_CONFIG(textedit) if (detailsText) grid->addWidget(detailsText, grid->rowCount(), 0, 1, grid->columnCount()); +#endif grid->setSizeConstraint(QLayout::SetNoConstraint); q->setLayout(grid); @@ -2654,7 +2656,9 @@ void QMessageBoxPrivate::helperPrepareShow(QPlatformDialogHelper *) options->setWindowTitle(q->windowTitle()); options->setText(q->text()); options->setInformativeText(q->informativeText()); +#if QT_CONFIG(textedit) options->setDetailedText(q->detailedText()); +#endif options->setIcon(helperIcon(q->icon())); options->setStandardButtons(helperStandardButtons(q)); } -- cgit v1.2.3